diff --git a/DEPS b/DEPS
index ca8e5ac..6d0a04b9f 100644
--- a/DEPS
+++ b/DEPS
@@ -111,11 +111,11 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling Skia
   # and whatever else without interference from each other.
-  'skia_revision': 'c09dc8ac723f81554581562f5cef3f302ae17f31',
+  'skia_revision': '06a4ef497ff1b0986a8c9dd007fcbc91c00ddef6',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling V8
   # and whatever else without interference from each other.
-  'v8_revision': 'bb933756abe4cb9d3a94bca336db3a38b707ab0f',
+  'v8_revision': 'c3ca4c145653efa67b75f146285e7d6b5b33ca03',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling swarming_client
   # and whatever else without interference from each other.
@@ -123,7 +123,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': '0da64b5e1009a8d1b011fbb3c31ca52cecc71899',
+  'angle_revision': '3420dcb0cff13ac7aef8f512ca5becc9679aeb76',
   # 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 PDFium
   # and whatever else without interference from each other.
-  'pdfium_revision': 'ea08d171755bd4088d01261c55d1bfe0ff0f9f39',
+  'pdfium_revision': '06305f5d71c779a3fa2cd514ec34ee443bd0e5f9',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling openmax_dl
   # and whatever else without interference from each other.
@@ -171,7 +171,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': '25da2e8be18d819ef6b5223a8b9dbf2223344cda',
+  'catapult_revision': '36a23a7b2851af59ed8734145c92a2bb2eb243f2',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling libFuzzer
   # and whatever else without interference from each other.
@@ -1004,7 +1004,7 @@
   },
 
   'src/third_party/perfetto':
-    Var('android_git') + '/platform/external/perfetto.git' + '@' +  'acda68b0292e8c8283b45f999eb8e7d95281cac5',
+    Var('android_git') + '/platform/external/perfetto.git' + '@' +  'dc38c5209303e595a5bf8a81a5c8d80adda94e5b',
 
   'src/third_party/perl': {
       'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + 'ac0d98b5cee6c024b0cffeb4f8f45b6fc5ccdb78',
@@ -1156,7 +1156,7 @@
     Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '0d55c887e92b645f6effe753528323ab2ffd94c2',
 
   'src/third_party/webrtc':
-    Var('webrtc_git') + '/src.git' + '@' + '12048c71501a2b62225e65ba270cdcd0dcd691ee',
+    Var('webrtc_git') + '/src.git' + '@' + 'c640a936d166cd6a9fe5544ae7acc12f0e7ca1ce',
 
   'src/third_party/xdg-utils': {
       'url': Var('chromium_git') + '/chromium/deps/xdg-utils.git' + '@' + 'd80274d5869b17b8c9067a1022e4416ee7ed5e0d',
@@ -1187,7 +1187,7 @@
     Var('chromium_git') + '/v8/v8.git' + '@' +  Var('v8_revision'),
 
   'src-internal': {
-    'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@b0874f87a68d71e21e7b926ff2d17cf004ff8eb8',
+    'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@6cf33fa7deb48ea67cc7b9310118d83b3af58420',
     'condition': 'checkout_src_internal',
   },
 
diff --git a/android_webview/aapt2.config b/android_webview/aapt2.config
deleted file mode 100644
index 6e6b76b..0000000
--- a/android_webview/aapt2.config
+++ /dev/null
@@ -1 +0,0 @@
-string/license_activity_title#no_obfuscate
diff --git a/android_webview/apk/java/src/com/android/webview/chromium/LicenseActivity.java b/android_webview/apk/java/src/com/android/webview/chromium/LicenseActivity.java
index f7a4678..7427d0d 100644
--- a/android_webview/apk/java/src/com/android/webview/chromium/LicenseActivity.java
+++ b/android_webview/apk/java/src/com/android/webview/chromium/LicenseActivity.java
@@ -29,9 +29,6 @@
                 String.format("content://%s.%s", packageName, LICENSES_URI_SUFFIX);
         intent.setDataAndType(Uri.parse(licenseUri), LICENSES_CONTENT_TYPE);
         intent.addCategory(Intent.CATEGORY_DEFAULT);
-        // Resources are accessed via getIdentifier because resource ids in the standalone system
-        // webview apk have incorrect package_ids. Accessing resources via getIdentifier needs to be
-        // whitelisted in //android_webview/aapt2.config. see https://crbug.com/894208
         final int titleId =
                 getResources().getIdentifier("license_activity_title", "string", packageName);
         if (titleId != 0) {
diff --git a/ash/BUILD.gn b/ash/BUILD.gn
index 8c9daa6..1da818c 100644
--- a/ash/BUILD.gn
+++ b/ash/BUILD.gn
@@ -487,8 +487,12 @@
     "magnifier/magnifier_scale_utils.h",
     "magnifier/partial_magnification_controller.cc",
     "magnifier/partial_magnification_controller.h",
+    "media/media_notification_constants.cc",
+    "media/media_notification_constants.h",
     "media/media_notification_controller.cc",
     "media/media_notification_controller.h",
+    "media/media_notification_view.cc",
+    "media/media_notification_view.h",
     "media_controller.cc",
     "media_controller.h",
     "metrics/demo_session_metrics_recorder.cc",
@@ -1773,6 +1777,7 @@
     "magnifier/magnifier_test_utils.h",
     "magnifier/partial_magnification_controller_unittest.cc",
     "media/media_notification_controller_unittest.cc",
+    "media/media_notification_view_unittest.cc",
     "metrics/demo_session_metrics_recorder_unittest.cc",
     "metrics/desktop_task_switch_metric_recorder_unittest.cc",
     "metrics/login_metrics_recorder_unittest.cc",
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index 7f19638..0a9e7b9 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -965,7 +965,7 @@
     base::RecordAction(UserMetricsAction("Accel_VolumeMute_F8"));
 
   if (volume_controller)
-    volume_controller->VolumeMuteToggle();
+    volume_controller->VolumeMute();
 }
 
 void HandleVolumeUp(mojom::VolumeController* volume_controller,
diff --git a/ash/app_list/views/app_list_view.cc b/ash/app_list/views/app_list_view.cc
index 3f31b4f1..88ff037 100644
--- a/ash/app_list/views/app_list_view.cc
+++ b/ash/app_list/views/app_list_view.cc
@@ -96,6 +96,9 @@
 // home launcher gestures, if they can be processed.
 constexpr int kAppListHomeLaucherGesturesThreshold = 32;
 
+// Quality of the shield background blur.
+constexpr float kAppListBlurQuality = 0.25f;
+
 // Set animation durations to 0 for testing.
 static bool short_animations_for_testing;
 
@@ -507,6 +510,8 @@
         app_list_background_shield_mask_->layer());
     app_list_background_shield_->layer()->SetBackgroundBlur(
         AppListConfig::instance().blur_radius());
+    app_list_background_shield_->layer()->SetBackdropFilterQuality(
+        kAppListBlurQuality);
   }
   AddChildView(app_list_background_shield_);
   app_list_main_view_ = new AppListMainView(delegate_, this);
diff --git a/ash/autoclick/autoclick_controller.cc b/ash/autoclick/autoclick_controller.cc
index fa3cacef..8f90926f 100644
--- a/ash/autoclick/autoclick_controller.cc
+++ b/ash/autoclick/autoclick_controller.cc
@@ -36,30 +36,6 @@
          key_code == ui::VKEY_LMENU || key_code == ui::VKEY_RMENU;
 }
 
-void RecordUserAction(mojom::AutoclickEventType event_type) {
-  switch (event_type) {
-    case mojom::AutoclickEventType::kLeftClick:
-      base::RecordAction(
-          base::UserMetricsAction("Accessibility.Autoclick.LeftClick"));
-      return;
-    case mojom::AutoclickEventType::kRightClick:
-      base::RecordAction(
-          base::UserMetricsAction("Accessibility.Autoclick.RightClick"));
-      return;
-    case mojom::AutoclickEventType::kDoubleClick:
-      base::RecordAction(
-          base::UserMetricsAction("Accessibility.Autoclick.DoubleClick"));
-      return;
-    case mojom::AutoclickEventType::kDragAndDrop:
-      base::RecordAction(
-          base::UserMetricsAction("Accessibility.Autoclick.DragAndDrop"));
-      return;
-    case mojom::AutoclickEventType::kNoAction:
-      // No action shouldn't have a UserAction, so we return null.
-      return;
-  }
-}
-
 }  // namespace
 
 // static.
@@ -183,8 +159,7 @@
 
   bool drag_start = event_type_ == mojom::AutoclickEventType::kDragAndDrop &&
                     !drag_event_rewriter_->IsEnabled();
-  bool drag_stop = event_type_ == mojom::AutoclickEventType::kDragAndDrop &&
-                   drag_event_rewriter_->IsEnabled();
+  bool drag_stop = DragInProgress();
 
   if (event_type_ == mojom::AutoclickEventType::kLeftClick ||
       event_type_ == mojom::AutoclickEventType::kRightClick ||
@@ -248,6 +223,12 @@
     autoclick_timer_->Stop();
   }
   autoclick_ring_handler_->StopGesture();
+
+  // If we are dragging, complete the drag, so as not to leave the UI in a
+  // weird state.
+  if (DragInProgress()) {
+    DoAutoclickAction();
+  }
   drag_event_rewriter_->SetEnabled(false);
   SetTapDownTarget(nullptr);
 }
@@ -278,6 +259,42 @@
   }
 }
 
+bool AutoclickController::DragInProgress() const {
+  return event_type_ == mojom::AutoclickEventType::kDragAndDrop &&
+         drag_event_rewriter_->IsEnabled();
+}
+
+void AutoclickController::RecordUserAction(
+    mojom::AutoclickEventType event_type) const {
+  switch (event_type) {
+    case mojom::AutoclickEventType::kLeftClick:
+      base::RecordAction(
+          base::UserMetricsAction("Accessibility.Autoclick.LeftClick"));
+      return;
+    case mojom::AutoclickEventType::kRightClick:
+      base::RecordAction(
+          base::UserMetricsAction("Accessibility.Autoclick.RightClick"));
+      return;
+    case mojom::AutoclickEventType::kDoubleClick:
+      base::RecordAction(
+          base::UserMetricsAction("Accessibility.Autoclick.DoubleClick"));
+      return;
+    case mojom::AutoclickEventType::kDragAndDrop:
+      // Only log drag-and-drop once per drag-and-drop. It takes two "dwells"
+      // to complete a full drag-and-drop cycle, which could lead to double
+      // the events logged.
+      if (DragInProgress())
+        return;
+      LOG(ERROR) << "Recording a drag&drop";
+      base::RecordAction(
+          base::UserMetricsAction("Accessibility.Autoclick.DragAndDrop"));
+      return;
+    case mojom::AutoclickEventType::kNoAction:
+      // No action shouldn't have a UserAction, so we return null.
+      return;
+  }
+}
+
 void AutoclickController::OnMouseEvent(ui::MouseEvent* event) {
   DCHECK(event->target());
   if (event_type_ == mojom::AutoclickEventType::kNoAction)
diff --git a/ash/autoclick/autoclick_controller.h b/ash/autoclick/autoclick_controller.h
index 01eda9f..4636afff 100644
--- a/ash/autoclick/autoclick_controller.h
+++ b/ash/autoclick/autoclick_controller.h
@@ -67,6 +67,8 @@
   void OnActionCompleted();
   void InitClickTimer();
   void UpdateRingWidget(const gfx::Point& mouse_location);
+  void RecordUserAction(mojom::AutoclickEventType event_type) const;
+  bool DragInProgress() const;
 
   // ui::EventHandler overrides:
   void OnMouseEvent(ui::MouseEvent* event) override;
diff --git a/ash/autoclick/autoclick_drag_event_rewriter.cc b/ash/autoclick/autoclick_drag_event_rewriter.cc
index 19855b7..ae3bf27b 100644
--- a/ash/autoclick/autoclick_drag_event_rewriter.cc
+++ b/ash/autoclick/autoclick_drag_event_rewriter.cc
@@ -18,9 +18,19 @@
     const ui::Event& event,
     std::unique_ptr<ui::Event>* new_event) {
   // Only rewrite mouse moved events to drag events when enabled.
-  if (!enabled_ || event.type() != ui::ET_MOUSE_MOVED)
+  if (!enabled_)
     return ui::EVENT_REWRITE_CONTINUE;
-  // TODO(katie): Should this have an ui::EF_LEFT_MOUSE_BUTTON flag for drag?
+
+  // On touchpads, a SCROLL_FLING_CANCEL can also indicate the start of a drag.
+  // If this rewriter is enabled, a SCROLL_FLING_CANCEL should simply be
+  // ignored.
+  if (event.type() == ui::ET_SCROLL_FLING_CANCEL)
+    return ui::EVENT_REWRITE_DISCARD;
+
+  // Only rewrite move events, but any other type should still go through.
+  if (event.type() != ui::ET_MOUSE_MOVED)
+    return ui::EVENT_REWRITE_CONTINUE;
+
   const ui::MouseEvent* mouse_event = event.AsMouseEvent();
   ui::MouseEvent* rewritten_event = new ui::MouseEvent(
       ui::ET_MOUSE_DRAGGED, mouse_event->location(),
diff --git a/ash/first_run/first_run_helper.cc b/ash/first_run/first_run_helper.cc
index e188b8cf..3f0c9f8 100644
--- a/ash/first_run/first_run_helper.cc
+++ b/ash/first_run/first_run_helper.cc
@@ -70,10 +70,6 @@
       ->CloseBubble();
 }
 
-void FirstRunHelper::GetHelpButtonBounds(GetHelpButtonBoundsCallback cb) {
-  std::move(cb).Run(gfx::Rect());
-}
-
 void FirstRunHelper::OnLockStateChanged(bool locked) {
   Cancel();
 }
diff --git a/ash/first_run/first_run_helper.h b/ash/first_run/first_run_helper.h
index 22e3630..ca1f0da7 100644
--- a/ash/first_run/first_run_helper.h
+++ b/ash/first_run/first_run_helper.h
@@ -32,7 +32,6 @@
   void GetAppListButtonBounds(GetAppListButtonBoundsCallback cb) override;
   void OpenTrayBubble(OpenTrayBubbleCallback cb) override;
   void CloseTrayBubble() override;
-  void GetHelpButtonBounds(GetHelpButtonBoundsCallback cb) override;
 
   // SessionObserver:
   void OnLockStateChanged(bool locked) override;
diff --git a/ash/media/media_notification_constants.cc b/ash/media/media_notification_constants.cc
new file mode 100644
index 0000000..4aeed88
--- /dev/null
+++ b/ash/media/media_notification_constants.cc
@@ -0,0 +1,15 @@
+// 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/media/media_notification_constants.h"
+
+namespace ash {
+
+const char kMediaSessionNotificationId[] = "media-session";
+
+const char kMediaSessionNotificationCustomViewType[] = "media-session";
+
+const char kMediaSessionNotifierId[] = "media-session";
+
+}  // namespace ash
diff --git a/ash/media/media_notification_constants.h b/ash/media/media_notification_constants.h
new file mode 100644
index 0000000..f72a0ec7
--- /dev/null
+++ b/ash/media/media_notification_constants.h
@@ -0,0 +1,23 @@
+// 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_MEDIA_MEDIA_NOTIFICATION_CONSTANTS_H_
+#define ASH_MEDIA_MEDIA_NOTIFICATION_CONSTANTS_H_
+
+#include "ash/ash_export.h"
+
+namespace ash {
+
+// The notification ID for the media session notification.
+ASH_EXPORT extern const char kMediaSessionNotificationId[];
+
+// The custom view type that should be set on media session notifications.
+ASH_EXPORT extern const char kMediaSessionNotificationCustomViewType[];
+
+// The notifier ID associated with the media session service.
+ASH_EXPORT extern const char kMediaSessionNotifierId[];
+
+}  // namespace ash
+
+#endif  // ASH_MEDIA_MEDIA_NOTIFICATION_CONSTANTS_H_
diff --git a/ash/media/media_notification_controller.cc b/ash/media/media_notification_controller.cc
index 8407a36..1508534 100644
--- a/ash/media/media_notification_controller.cc
+++ b/ash/media/media_notification_controller.cc
@@ -4,6 +4,8 @@
 
 #include "ash/media/media_notification_controller.h"
 
+#include "ash/media/media_notification_constants.h"
+#include "ash/media/media_notification_view.h"
 #include "base/strings/string16.h"
 #include "services/media_session/public/mojom/constants.mojom.h"
 #include "services/service_manager/public/cpp/connector.h"
@@ -11,17 +13,19 @@
 #include "ui/message_center/public/cpp/notification.h"
 #include "ui/message_center/public/cpp/notification_delegate.h"
 #include "ui/message_center/public/cpp/notifier_id.h"
+#include "ui/message_center/views/message_view_factory.h"
 #include "url/gurl.h"
 
 namespace ash {
 
 namespace {
 
-// The ID associated with the media session notification.
-const char kMediaSessionNotificationId[] = "media-session";
-
-// The notifier ID associated with the media session service.
-const char kMediaSessionNotifierId[] = "media-session";
+std::unique_ptr<message_center::MessageView> CreateCustomMediaNotificationView(
+    const message_center::Notification& notification) {
+  DCHECK_EQ(kMediaSessionNotificationCustomViewType,
+            notification.custom_view_type());
+  return std::make_unique<MediaNotificationView>(notification);
+}
 
 bool IsMediaSessionNotificationVisible() {
   return message_center::MessageCenter::Get()->FindVisibleNotificationById(
@@ -32,6 +36,13 @@
 
 MediaNotificationController::MediaNotificationController(
     service_manager::Connector* connector) {
+  if (!message_center::MessageViewFactory::HasCustomNotificationViewFactory(
+          kMediaSessionNotificationCustomViewType)) {
+    message_center::MessageViewFactory::SetCustomNotificationViewFactory(
+        kMediaSessionNotificationCustomViewType,
+        base::BindRepeating(&CreateCustomMediaNotificationView));
+  }
+
   // |connector| can be null in tests.
   if (!connector)
     return;
@@ -55,7 +66,7 @@
 
   std::unique_ptr<message_center::Notification> notification =
       message_center::Notification::CreateSystemNotification(
-          message_center::NotificationType::NOTIFICATION_TYPE_SIMPLE,
+          message_center::NotificationType::NOTIFICATION_TYPE_CUSTOM,
           kMediaSessionNotificationId, base::string16(), base::string16(),
           base::string16(), GURL(),
           message_center::NotifierId(
@@ -69,12 +80,12 @@
           gfx::VectorIcon(),
           message_center::SystemNotificationWarningLevel::NORMAL);
 
-  notification->set_pinned(true);
-
   // Set the priority to low to prevent the notification showing as a popup and
   // keep it at the bottom of the list.
   notification->set_priority(message_center::LOW_PRIORITY);
 
+  notification->set_custom_view_type(kMediaSessionNotificationCustomViewType);
+
   message_center::MessageCenter::Get()->AddNotification(
       std::move(notification));
 }
diff --git a/ash/media/media_notification_controller_unittest.cc b/ash/media/media_notification_controller_unittest.cc
index 4d5a9e3..5e34807 100644
--- a/ash/media/media_notification_controller_unittest.cc
+++ b/ash/media/media_notification_controller_unittest.cc
@@ -6,6 +6,7 @@
 
 #include <memory>
 
+#include "ash/media/media_notification_constants.h"
 #include "ash/public/cpp/ash_features.h"
 #include "ash/shell.h"
 #include "ash/test/ash_test_base.h"
@@ -23,7 +24,7 @@
 
 bool IsMediaNotificationShown() {
   return message_center::MessageCenter::Get()->FindVisibleNotificationById(
-      "media-session");
+      kMediaSessionNotificationId);
 }
 
 int GetVisibleNotificationCount() {
@@ -87,4 +88,18 @@
   EXPECT_FALSE(IsMediaNotificationShown());
 }
 
+TEST_F(MediaNotificationControllerTest, NotificationHasCustomViewType) {
+  EXPECT_FALSE(IsMediaNotificationShown());
+
+  Shell::Get()->media_notification_controller()->OnFocusGained(
+      MediaSessionInfo::New(), AudioFocusType::kGain);
+  message_center::Notification* notification =
+      message_center::MessageCenter::Get()->FindVisibleNotificationById(
+          kMediaSessionNotificationId);
+  EXPECT_TRUE(notification);
+
+  EXPECT_EQ(kMediaSessionNotificationCustomViewType,
+            notification->custom_view_type());
+}
+
 }  // namespace ash
diff --git a/ash/media/media_notification_view.cc b/ash/media/media_notification_view.cc
new file mode 100644
index 0000000..4c62894
--- /dev/null
+++ b/ash/media/media_notification_view.cc
@@ -0,0 +1,94 @@
+// 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/media/media_notification_view.h"
+
+#include "ui/message_center/message_center.h"
+#include "ui/message_center/public/cpp/message_center_constants.h"
+#include "ui/message_center/views/notification_control_buttons_view.h"
+#include "ui/message_center/views/notification_header_view.h"
+#include "ui/views/layout/box_layout.h"
+
+namespace ash {
+
+MediaNotificationView::MediaNotificationView(
+    const message_center::Notification& notification)
+    : message_center::MessageView(notification) {
+  SetLayoutManager(std::make_unique<views::BoxLayout>(
+      views::BoxLayout::kVertical, gfx::Insets(), 0));
+
+  // |controls_button_view_| has the common notification control buttons.
+  control_buttons_view_ =
+      std::make_unique<message_center::NotificationControlButtonsView>(this);
+  control_buttons_view_->set_owned_by_client();
+
+  // |header_row_| contains app_icon, app_name, control buttons, etc...
+  header_row_ = new message_center::NotificationHeaderView(
+      control_buttons_view_.get(), this);
+  header_row_->SetExpandButtonEnabled(false);
+  header_row_->SetAppName(
+      message_center::MessageCenter::Get()->GetSystemNotificationAppName());
+  AddChildView(header_row_);
+
+  // TODO(beccahughes): Add remaining UI for notification.
+
+  UpdateControlButtonsVisibilityWithNotification(notification);
+  UpdateCornerRadius(message_center::kNotificationCornerRadius,
+                     message_center::kNotificationCornerRadius);
+}
+
+MediaNotificationView::~MediaNotificationView() = default;
+
+void MediaNotificationView::UpdateWithNotification(
+    const message_center::Notification& notification) {
+  MessageView::UpdateWithNotification(notification);
+
+  UpdateControlButtonsVisibilityWithNotification(notification);
+  Layout();
+  SchedulePaint();
+}
+
+message_center::NotificationControlButtonsView*
+MediaNotificationView::GetControlButtonsView() const {
+  return control_buttons_view_.get();
+}
+
+void MediaNotificationView::UpdateControlButtonsVisibility() {
+  const bool target_visibility =
+      (IsMouseHovered() || control_buttons_view_->IsCloseButtonFocused() ||
+       control_buttons_view_->IsSettingsButtonFocused()) &&
+      (GetMode() != Mode::SETTING);
+
+  control_buttons_view_->SetVisible(target_visibility);
+}
+
+void MediaNotificationView::OnMouseEvent(ui::MouseEvent* event) {
+  switch (event->type()) {
+    case ui::ET_MOUSE_ENTERED:
+    case ui::ET_MOUSE_EXITED:
+      UpdateControlButtonsVisibility();
+      break;
+    default:
+      break;
+  }
+
+  View::OnMouseEvent(event);
+}
+
+void MediaNotificationView::ButtonPressed(views::Button* sender,
+                                          const ui::Event& event) {
+  NOTIMPLEMENTED();
+}
+
+void MediaNotificationView::UpdateControlButtonsVisibilityWithNotification(
+    const message_center::Notification& notification) {
+  // Media notifications do not use the settings and snooze buttons.
+  DCHECK(!notification.should_show_settings_button());
+  DCHECK(!notification.should_show_snooze_button());
+
+  control_buttons_view_->ShowCloseButton(!notification.pinned());
+  UpdateControlButtonsVisibility();
+}
+
+}  // namespace ash
diff --git a/ash/media/media_notification_view.h b/ash/media/media_notification_view.h
new file mode 100644
index 0000000..fe1d6cf3
--- /dev/null
+++ b/ash/media/media_notification_view.h
@@ -0,0 +1,58 @@
+// 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_MEDIA_MEDIA_NOTIFICATION_VIEW_H_
+#define ASH_MEDIA_MEDIA_NOTIFICATION_VIEW_H_
+
+#include "ash/ash_export.h"
+#include "ui/message_center/views/message_view.h"
+#include "ui/views/controls/button/button.h"
+
+namespace message_center {
+class NotificationHeaderView;
+}  // namespace message_center
+
+namespace ash {
+
+// MediaNotificationView will show up as a custom notification. It will show the
+// currently playing media and provide playback controls. There will also be
+// control buttons (e.g. close) in the top right corner that will hide and show
+// if the notification is hovered.
+class ASH_EXPORT MediaNotificationView : public message_center::MessageView,
+                                         public views::ButtonListener {
+ public:
+  explicit MediaNotificationView(
+      const message_center::Notification& notification);
+  ~MediaNotificationView() override;
+
+  // message_center::MessageView:
+  void UpdateWithNotification(
+      const message_center::Notification& notification) override;
+  message_center::NotificationControlButtonsView* GetControlButtonsView()
+      const override;
+  void UpdateControlButtonsVisibility() override;
+
+  // views::View:
+  void OnMouseEvent(ui::MouseEvent* event) override;
+
+  // views::ButtonListener:
+  void ButtonPressed(views::Button* sender, const ui::Event& event) override;
+
+ private:
+  void UpdateControlButtonsVisibilityWithNotification(
+      const message_center::Notification& notification);
+
+  // View containing close and settings buttons.
+  std::unique_ptr<message_center::NotificationControlButtonsView>
+      control_buttons_view_;
+
+  // Container views directly attached to this view.
+  message_center::NotificationHeaderView* header_row_ = nullptr;
+
+  DISALLOW_COPY_AND_ASSIGN(MediaNotificationView);
+};
+
+}  // namespace ash
+
+#endif  // ASH_MEDIA_MEDIA_NOTIFICATION_VIEW_H_
diff --git a/ash/media/media_notification_view_unittest.cc b/ash/media/media_notification_view_unittest.cc
new file mode 100644
index 0000000..fe6acff2
--- /dev/null
+++ b/ash/media/media_notification_view_unittest.cc
@@ -0,0 +1,131 @@
+// 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/media/media_notification_view.h"
+
+#include <memory>
+
+#include "ash/media/media_notification_constants.h"
+#include "ash/media/media_notification_controller.h"
+#include "ash/public/cpp/ash_features.h"
+#include "ash/public/cpp/shell_window_ids.h"
+#include "ash/shell.h"
+#include "ash/system/message_center/message_center_view.h"
+#include "ash/system/status_area_widget.h"
+#include "ash/system/status_area_widget_test_helper.h"
+#include "ash/system/unified/unified_system_tray.h"
+#include "ash/test/ash_test_base.h"
+#include "base/macros.h"
+#include "base/test/scoped_feature_list.h"
+#include "services/media_session/public/mojom/audio_focus.mojom.h"
+#include "ui/events/base_event_utils.h"
+#include "ui/events/test/event_generator.h"
+#include "ui/message_center/message_center.h"
+#include "ui/message_center/views/message_view_factory.h"
+#include "ui/message_center/views/notification_control_buttons_view.h"
+
+namespace ash {
+
+class MediaNotificationViewTest : public AshTestBase {
+ public:
+  MediaNotificationViewTest() = default;
+  ~MediaNotificationViewTest() override = default;
+
+  // AshTestBase
+  void SetUp() override {
+    scoped_feature_list_.InitAndEnableFeature(
+        features::kMediaSessionNotification);
+
+    AshTestBase::SetUp();
+
+    MessageCenterView::disable_animation_for_testing = true;
+
+    // Set a custom view factory to create and capture the notification view.
+    message_center::MessageViewFactory::
+        ClearCustomNotificationViewFactoryForTest(
+            kMediaSessionNotificationCustomViewType);
+    message_center::MessageViewFactory::SetCustomNotificationViewFactory(
+        kMediaSessionNotificationCustomViewType,
+        base::BindRepeating(
+            &MediaNotificationViewTest::CreateAndCaptureCustomView,
+            base::Unretained(this)));
+
+    // Show the notification.
+    Shell::Get()->media_notification_controller()->OnFocusGained(
+        media_session::mojom::MediaSessionInfo::New(),
+        media_session::mojom::AudioFocusType::kGain);
+
+    message_center::Notification* notification =
+        message_center::MessageCenter::Get()->FindVisibleNotificationById(
+            kMediaSessionNotificationId);
+    ASSERT_TRUE(notification);
+
+    // Open the system tray. This will trigger the view to be created.
+    auto* unified_system_tray =
+        StatusAreaWidgetTestHelper::GetStatusAreaWidget()
+            ->unified_system_tray();
+    unified_system_tray->ShowBubble(false /* show_by_click */);
+    unified_system_tray->ActivateBubble();
+
+    // Check that the view was captured.
+    ASSERT_TRUE(view_);
+    view_->set_notify_enter_exit_on_child(true);
+  }
+
+  void TearDown() override {
+    MessageCenterView::disable_animation_for_testing = false;
+    view_ = nullptr;
+
+    message_center::MessageViewFactory::
+        ClearCustomNotificationViewFactoryForTest(
+            kMediaSessionNotificationCustomViewType);
+
+    AshTestBase::TearDown();
+  }
+
+  bool IsControlButtonsViewVisible() const {
+    return view()->GetControlButtonsView()->layer()->opacity() > 0;
+  }
+
+  MediaNotificationView* view() const { return view_; }
+
+ private:
+  std::unique_ptr<message_center::MessageView> CreateAndCaptureCustomView(
+      const message_center::Notification& notification) {
+    auto view = std::make_unique<MediaNotificationView>(notification);
+    view_ = view.get();
+    return view;
+  }
+
+  base::test::ScopedFeatureList scoped_feature_list_;
+
+  std::unique_ptr<views::Widget> widget_;
+  MediaNotificationView* view_ = nullptr;
+
+  DISALLOW_COPY_AND_ASSIGN(MediaNotificationViewTest);
+};
+
+TEST_F(MediaNotificationViewTest, ShowControlsOnHover) {
+  EXPECT_FALSE(IsControlButtonsViewVisible());
+
+  {
+    gfx::Point cursor_location(1, 1);
+    views::View::ConvertPointToScreen(view(), &cursor_location);
+    GetEventGenerator()->MoveMouseTo(cursor_location);
+    GetEventGenerator()->SendMouseEnter();
+  }
+
+  EXPECT_TRUE(IsControlButtonsViewVisible());
+
+  {
+    gfx::Point cursor_location(-1, -1);
+    views::View::ConvertPointToScreen(view(), &cursor_location);
+    GetEventGenerator()->MoveMouseTo(cursor_location.x(), cursor_location.y());
+    GetEventGenerator()->SendMouseExit();
+  }
+
+  EXPECT_FALSE(IsControlButtonsViewVisible());
+}
+
+}  // namespace ash
diff --git a/ash/public/interfaces/first_run_helper.mojom b/ash/public/interfaces/first_run_helper.mojom
index 001b39b8..5d7791b 100644
--- a/ash/public/interfaces/first_run_helper.mojom
+++ b/ash/public/interfaces/first_run_helper.mojom
@@ -30,10 +30,6 @@
   // Closes the system tray bubble menu. Does nothing if the bubble is already
   // closed.
   CloseTrayBubble();
-
-  // Returns the bounds of the help button on the system tray bubble menu in
-  // screen coordinates. Returns empty bounds if the bubble is not open.
-  GetHelpButtonBounds() => (gfx.mojom.Rect screen_bounds);
 };
 
 // The client for the FirstRunHelper interface, e.g. chrome.
diff --git a/ash/public/interfaces/volume.mojom b/ash/public/interfaces/volume.mojom
index 9d0d8fa4..3e5b1da7 100644
--- a/ash/public/interfaces/volume.mojom
+++ b/ash/public/interfaces/volume.mojom
@@ -11,10 +11,10 @@
 // control interface or both ash and chrome should directly access the
 // CrasAudioHandler volume control functions.
 interface VolumeController {
-  // Toggle the audio volume between muted and un-muted.
-  VolumeMuteToggle();
-  // Decrease the audio volume, may also mute or un-mute the volume.
+  // Mute the audio volume.
+  VolumeMute();
+  // Decrease the audio volume.
   VolumeDown();
-  // Increase the audio volume, may also un-mute the volume.
+  // Increase the audio volume.
   VolumeUp();
 };
diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc
index 563ad7d..2e20fe9 100644
--- a/ash/shelf/shelf_widget.cc
+++ b/ash/shelf/shelf_widget.cc
@@ -45,6 +45,7 @@
 
 constexpr int kShelfRoundedCornerRadius = 28;
 constexpr int kShelfBlurRadius = 10;
+constexpr float kShelfBlurQuality = 0.25f;
 
 // Return the first or last focusable child of |root|.
 views::View* FindFirstOrLastFocusableChild(views::View* root,
@@ -198,6 +199,7 @@
 
   opaque_background_.SetBackgroundBlur(should_blur_background ? kShelfBlurRadius
                                                               : 0);
+  opaque_background_.SetBackdropFilterQuality(kShelfBlurQuality);
 
   background_is_currently_blurred_ = should_blur_background;
 }
diff --git a/ash/system/date/tray_system_info.cc b/ash/system/date/tray_system_info.cc
index fc6d1e0..40e98837 100644
--- a/ash/system/date/tray_system_info.cc
+++ b/ash/system/date/tray_system_info.cc
@@ -17,8 +17,8 @@
 
 namespace tray {
 
-TimeTrayItemView::TimeTrayItemView(SystemTrayItem* owner, Shelf* shelf)
-    : TrayItemView(owner), session_observer_(this) {
+TimeTrayItemView::TimeTrayItemView(Shelf* shelf)
+    : TrayItemView(shelf), session_observer_(this) {
   tray::TimeView::ClockLayout clock_layout =
       shelf->IsHorizontalAlignment()
           ? tray::TimeView::ClockLayout::HORIZONTAL_CLOCK
@@ -56,7 +56,7 @@
 
 views::View* TraySystemInfo::CreateTrayView(LoginStatus status) {
   CHECK(tray_view_ == nullptr);
-  tray_view_ = new tray::TimeTrayItemView(this, system_tray()->shelf());
+  tray_view_ = new tray::TimeTrayItemView(system_tray()->shelf());
   return tray_view_;
 }
 
diff --git a/ash/system/date/tray_system_info.h b/ash/system/date/tray_system_info.h
index 2c6011eb..e1198e2 100644
--- a/ash/system/date/tray_system_info.h
+++ b/ash/system/date/tray_system_info.h
@@ -26,7 +26,7 @@
 
 class TimeTrayItemView : public TrayItemView, public SessionObserver {
  public:
-  TimeTrayItemView(SystemTrayItem* owner, Shelf* shelf);
+  explicit TimeTrayItemView(Shelf* shelf);
   ~TimeTrayItemView() override;
 
   void UpdateAlignmentForShelf(Shelf* shelf);
diff --git a/ash/system/message_center/arc/arc_notification_constants.h b/ash/system/message_center/arc/arc_notification_constants.h
index a793c17..a3cc847 100644
--- a/ash/system/message_center/arc/arc_notification_constants.h
+++ b/ash/system/message_center/arc/arc_notification_constants.h
@@ -15,6 +15,9 @@
 // world, from a notification key, which is used in Android.
 constexpr char kArcNotificationIdPrefix[] = "ARC_NOTIFICATION_";
 
+// The custom view type that should be set on ARC notifications.
+constexpr char kArcNotificationCustomViewType[] = "arc";
+
 }  // namespace ash
 
 #endif  // ASH_SYSTEM_MESSAGE_CENTER_ARC_ARC_NOTIFICATION_CONSTANTS_H_
diff --git a/ash/system/message_center/arc/arc_notification_content_view_unittest.cc b/ash/system/message_center/arc/arc_notification_content_view_unittest.cc
index b0e276c..5d260ea 100644
--- a/ash/system/message_center/arc/arc_notification_content_view_unittest.cc
+++ b/ash/system/message_center/arc/arc_notification_content_view_unittest.cc
@@ -9,6 +9,7 @@
 #include <utility>
 
 #include "ash/shell.h"
+#include "ash/system/message_center/arc/arc_notification_constants.h"
 #include "ash/system/message_center/arc/arc_notification_content_view.h"
 #include "ash/system/message_center/arc/arc_notification_delegate.h"
 #include "ash/system/message_center/arc/arc_notification_item.h"
@@ -120,6 +121,10 @@
     DCHECK(exo::WMHelper::HasInstance());
 
     surface_manager_ = std::make_unique<ArcNotificationSurfaceManagerImpl>();
+
+    message_center::MessageViewFactory::
+        ClearCustomNotificationViewFactoryForTest(
+            kArcNotificationCustomViewType);
     ArcNotificationManager::SetCustomNotificationViewFactory();
   }
 
@@ -207,7 +212,7 @@
     message_center::RichNotificationData optional_fields;
     optional_fields.settings_button_handler =
         message_center::SettingsButtonHandler::DELEGATE;
-    return Notification(
+    Notification notification(
         message_center::NOTIFICATION_TYPE_CUSTOM,
         notification_item->GetNotificationId(), base::UTF8ToUTF16("title"),
         base::UTF8ToUTF16("message"), gfx::Image(), base::UTF8ToUTF16("arc"),
@@ -216,6 +221,8 @@
                                    "ARC_NOTIFICATION"),
         optional_fields,
         new ArcNotificationDelegate(notification_item->GetWeakPtr()));
+    notification.set_custom_view_type(kArcNotificationCustomViewType);
+    return notification;
   }
 
   ArcNotificationSurfaceManagerImpl* surface_manager() {
@@ -327,10 +334,14 @@
 TEST_F(ArcNotificationContentViewTest, CloseButtonInMessageCenterView) {
   std::string notification_key("notification id");
 
+  message_center::MessageViewFactory::ClearCustomNotificationViewFactoryForTest(
+      kArcNotificationCustomViewType);
+
   // Override MessageView factory to capture the created notification view in
   // |notification_view|.
   ArcNotificationView* notification_view = nullptr;
   message_center::MessageViewFactory::SetCustomNotificationViewFactory(
+      kArcNotificationCustomViewType,
       base::BindLambdaForTesting(
           [&notification_view](const message_center::Notification& notification)
               -> std::unique_ptr<message_center::MessageView> {
diff --git a/ash/system/message_center/arc/arc_notification_item_impl.cc b/ash/system/message_center/arc/arc_notification_item_impl.cc
index b4ec956..636a35a 100644
--- a/ash/system/message_center/arc/arc_notification_item_impl.cc
+++ b/ash/system/message_center/arc/arc_notification_item_impl.cc
@@ -123,6 +123,7 @@
       notifier_id, rich_data,
       new ArcNotificationDelegate(weak_ptr_factory_.GetWeakPtr()));
   notification->set_timestamp(base::Time::FromJavaTime(data->time));
+  notification->set_custom_view_type(kArcNotificationCustomViewType);
 
   if (expand_state_ != ArcNotificationExpandState::FIXED_SIZE &&
       data->expand_state != ArcNotificationExpandState::FIXED_SIZE &&
diff --git a/ash/system/message_center/arc/arc_notification_manager.cc b/ash/system/message_center/arc/arc_notification_manager.cc
index 9456ed2d..d0e6f54 100644
--- a/ash/system/message_center/arc/arc_notification_manager.cc
+++ b/ash/system/message_center/arc/arc_notification_manager.cc
@@ -8,6 +8,7 @@
 #include <utility>
 
 #include "ash/public/cpp/ash_features.h"
+#include "ash/system/message_center/arc/arc_notification_constants.h"
 #include "ash/system/message_center/arc/arc_notification_delegate.h"
 #include "ash/system/message_center/arc/arc_notification_item_impl.h"
 #include "ash/system/message_center/arc/arc_notification_manager_delegate.h"
@@ -44,6 +45,7 @@
     const message_center::Notification& notification) {
   DCHECK_EQ(notification.notifier_id().type,
             message_center::NotifierId::ARC_APPLICATION);
+  DCHECK_EQ(kArcNotificationCustomViewType, notification.custom_view_type());
   auto* arc_delegate =
       static_cast<ArcNotificationDelegate*>(notification.delegate());
   return arc_delegate->CreateCustomMessageView(notification);
@@ -99,6 +101,7 @@
 // static
 void ArcNotificationManager::SetCustomNotificationViewFactory() {
   message_center::MessageViewFactory::SetCustomNotificationViewFactory(
+      kArcNotificationCustomViewType,
       base::BindRepeating(&CreateCustomMessageView));
 }
 
@@ -115,8 +118,10 @@
 
   instance_owner_->holder()->SetHost(this);
   instance_owner_->holder()->AddObserver(this);
-  if (!message_center::MessageViewFactory::HasCustomNotificationViewFactory())
+  if (!message_center::MessageViewFactory::HasCustomNotificationViewFactory(
+          kArcNotificationCustomViewType)) {
     SetCustomNotificationViewFactory();
+  }
 
   message_center_->AddObserver(do_not_disturb_manager_.get());
 }
diff --git a/ash/system/message_center/arc/arc_notification_view.cc b/ash/system/message_center/arc/arc_notification_view.cc
index e03fa64..47d23e6 100644
--- a/ash/system/message_center/arc/arc_notification_view.cc
+++ b/ash/system/message_center/arc/arc_notification_view.cc
@@ -6,6 +6,7 @@
 
 #include <algorithm>
 
+#include "ash/system/message_center/arc/arc_notification_constants.h"
 #include "ash/system/message_center/arc/arc_notification_content_view.h"
 #include "ash/system/message_center/arc/arc_notification_item.h"
 #include "ui/accessibility/ax_action_data.h"
@@ -41,6 +42,7 @@
       item_(item),
       content_view_(new ArcNotificationContentView(item_, notification, this)) {
   DCHECK_EQ(message_center::NOTIFICATION_TYPE_CUSTOM, notification.type());
+  DCHECK_EQ(kArcNotificationCustomViewType, notification.custom_view_type());
 
   SetProperty(kArcNotificationViewPropertyKey, this);
 
diff --git a/ash/system/message_center/arc/arc_notification_view_unittest.cc b/ash/system/message_center/arc/arc_notification_view_unittest.cc
index a2c048a2..1e6ac07 100644
--- a/ash/system/message_center/arc/arc_notification_view_unittest.cc
+++ b/ash/system/message_center/arc/arc_notification_view_unittest.cc
@@ -65,7 +65,12 @@
     AshTestBase::SetUp();
 
     item_ = std::make_unique<MockArcNotificationItem>(kDefaultNotificationKey);
+
+    message_center::MessageViewFactory::
+        ClearCustomNotificationViewFactoryForTest(
+            kArcNotificationCustomViewType);
     message_center::MessageViewFactory::SetCustomNotificationViewFactory(
+        kArcNotificationCustomViewType,
         base::BindRepeating(
             &ArcNotificationViewTest::CreateCustomMessageViewForTest,
             base::Unretained(this), item_.get()));
@@ -96,13 +101,16 @@
   }
 
   std::unique_ptr<Notification> CreateSimpleNotification() {
-    return std::make_unique<Notification>(
+    std::unique_ptr<Notification> notification = std::make_unique<Notification>(
         message_center::NOTIFICATION_TYPE_CUSTOM, kDefaultNotificationId,
         base::UTF8ToUTF16("title"), base::UTF8ToUTF16("message"), gfx::Image(),
         base::UTF8ToUTF16("display source"), GURL(),
         message_center::NotifierId(message_center::NotifierId::ARC_APPLICATION,
                                    "test_app_id"),
         message_center::RichNotificationData(), nullptr);
+
+    notification->set_custom_view_type(kArcNotificationCustomViewType);
+    return notification;
   }
 
   void TearDown() override {
diff --git a/ash/system/message_center/message_center_view.h b/ash/system/message_center/message_center_view.h
index bf98af0b..b812a22 100644
--- a/ash/system/message_center/message_center_view.h
+++ b/ash/system/message_center/message_center_view.h
@@ -103,6 +103,7 @@
 
  private:
   friend class ArcNotificationContentViewTest;
+  friend class MediaNotificationViewTest;
   friend class MessageCenterViewTest;
 
   // NOTIFICATIONS: Normal notification list (MessageListView) is shown.
diff --git a/ash/system/network/network_tray_view.cc b/ash/system/network/network_tray_view.cc
index 7b04afd..2a1593bc 100644
--- a/ash/system/network/network_tray_view.cc
+++ b/ash/system/network/network_tray_view.cc
@@ -30,8 +30,7 @@
   return handler->ConnectedNetworkByType(NetworkTypePattern::NonVirtual());
 }
 
-NetworkTrayView::NetworkTrayView(TrayNetwork* network_tray)
-    : TrayItemView(network_tray) {
+NetworkTrayView::NetworkTrayView(Shelf* shelf) : TrayItemView(shelf) {
   CreateImageView();
   UpdateNetworkStateHandlerIcon();
   UpdateConnectionStatus(GetConnectedNetwork(), true /* notify_a11y */);
diff --git a/ash/system/network/network_tray_view.h b/ash/system/network/network_tray_view.h
index bc5b69c7..f6e352a 100644
--- a/ash/system/network/network_tray_view.h
+++ b/ash/system/network/network_tray_view.h
@@ -15,8 +15,6 @@
 }  // namespace chromeos
 
 namespace ash {
-class TrayNetwork;
-
 namespace tray {
 
 // Returns the connected, non-virtual (aka VPN), network.
@@ -26,7 +24,7 @@
                         public network_icon::AnimationObserver,
                         public SessionObserver {
  public:
-  explicit NetworkTrayView(TrayNetwork* network_tray);
+  explicit NetworkTrayView(Shelf* shelf);
 
   ~NetworkTrayView() override;
 
diff --git a/ash/system/network/tray_network.cc b/ash/system/network/tray_network.cc
index 4ca46de0..ec9e695 100644
--- a/ash/system/network/tray_network.cc
+++ b/ash/system/network/tray_network.cc
@@ -116,7 +116,7 @@
   CHECK(tray_ == nullptr);
   if (!chromeos::NetworkHandler::IsInitialized())
     return nullptr;
-  tray_ = new tray::NetworkTrayView(this);
+  tray_ = new tray::NetworkTrayView(system_tray()->shelf());
   return tray_;
 }
 
diff --git a/ash/system/power/tray_power.cc b/ash/system/power/tray_power.cc
index 72ff350..dbf9c31f 100644
--- a/ash/system/power/tray_power.cc
+++ b/ash/system/power/tray_power.cc
@@ -15,6 +15,7 @@
 #include "ash/system/date/date_view.h"
 #include "ash/system/power/battery_notification.h"
 #include "ash/system/power/dual_role_notification.h"
+#include "ash/system/tray/system_tray.h"
 #include "ash/system/tray/tray_constants.h"
 #include "ash/system/tray/tray_item_view.h"
 #include "ash/system/tray/tray_utils.h"
@@ -40,7 +41,7 @@
 
 namespace tray {
 
-PowerTrayView::PowerTrayView(SystemTrayItem* owner) : TrayItemView(owner) {
+PowerTrayView::PowerTrayView(Shelf* shelf) : TrayItemView(shelf) {
   CreateImageView();
   UpdateImage();
   UpdateStatus();
@@ -101,7 +102,7 @@
   // there is a battery or not. So always create this, and adjust visibility as
   // necessary.
   CHECK(power_tray_ == nullptr);
-  power_tray_ = new tray::PowerTrayView(this);
+  power_tray_ = new tray::PowerTrayView(system_tray()->shelf());
   return power_tray_;
 }
 
diff --git a/ash/system/power/tray_power.h b/ash/system/power/tray_power.h
index b47b0084..8c8d70d9 100644
--- a/ash/system/power/tray_power.h
+++ b/ash/system/power/tray_power.h
@@ -21,7 +21,7 @@
                       public PowerStatus::Observer,
                       public SessionObserver {
  public:
-  explicit PowerTrayView(SystemTrayItem* owner);
+  explicit PowerTrayView(Shelf* shelf);
 
   ~PowerTrayView() override;
 
diff --git a/ash/system/tray/tray_item_view.cc b/ash/system/tray/tray_item_view.cc
index a7ce1f3..7230865 100644
--- a/ash/system/tray/tray_item_view.cc
+++ b/ash/system/tray/tray_item_view.cc
@@ -26,7 +26,11 @@
 }  // namespace
 
 TrayItemView::TrayItemView(SystemTrayItem* owner)
-    : owner_(owner), label_(NULL), image_view_(NULL) {
+    : shelf_(owner->system_tray()->shelf()) {}
+
+TrayItemView::TrayItemView(Shelf* shelf)
+    : shelf_(shelf), label_(NULL), image_view_(NULL) {
+  DCHECK(shelf_);
   SetPaintToLayer();
   layer()->SetFillsBoundsOpaquely(false);
   SetLayoutManager(std::make_unique<views::FillLayout>());
@@ -88,7 +92,7 @@
   gfx::Size size = rect.size();
   if (!animation_.get() || !animation_->is_animating())
     return size;
-  if (!owner() || owner()->system_tray()->shelf()->IsHorizontalAlignment()) {
+  if (shelf_->IsHorizontalAlignment()) {
     size.set_width(std::max(
         1, static_cast<int>(size.width() * animation_->GetCurrentValue())));
   } else {
@@ -108,7 +112,7 @@
 
 void TrayItemView::AnimationProgressed(const gfx::Animation* animation) {
   gfx::Transform transform;
-  if (!owner() || owner()->system_tray()->shelf()->IsHorizontalAlignment()) {
+  if (shelf_->IsHorizontalAlignment()) {
     transform.Translate(0, animation->CurrentValueBetween(
                                static_cast<double>(height()) / 2, 0.));
   } else {
diff --git a/ash/system/tray/tray_item_view.h b/ash/system/tray/tray_item_view.h
index ca3f4bd4..bc4faec3 100644
--- a/ash/system/tray/tray_item_view.h
+++ b/ash/system/tray/tray_item_view.h
@@ -23,6 +23,7 @@
 
 namespace ash {
 class SystemTrayItem;
+class Shelf;
 
 // Base-class for items in the tray. It makes sure the widget is updated
 // correctly when the visibility/size of the tray item changes. It also adds
@@ -30,7 +31,10 @@
 class ASH_EXPORT TrayItemView : public views::View,
                                 public gfx::AnimationDelegate {
  public:
+  // TODO(tetsui): Remove this with old SystemTray.  https://crbug.com/898419
   explicit TrayItemView(SystemTrayItem* owner);
+
+  explicit TrayItemView(Shelf* shelf);
   ~TrayItemView() override;
 
   // Convenience function for creating a child Label or ImageView.
@@ -38,7 +42,6 @@
   void CreateLabel();
   void CreateImageView();
 
-  SystemTrayItem* owner() const { return owner_; }
   views::Label* label() const { return label_; }
   views::ImageView* image_view() const { return image_view_; }
 
@@ -60,7 +63,7 @@
   void AnimationEnded(const gfx::Animation* animation) override;
   void AnimationCanceled(const gfx::Animation* animation) override;
 
-  SystemTrayItem* owner_;
+  Shelf* const shelf_;
   std::unique_ptr<gfx::SlideAnimation> animation_;
   // Only one of |label_| and |image_view_| should be non-null.
   views::Label* label_;
diff --git a/ash/system/unified/ime_mode_view.cc b/ash/system/unified/ime_mode_view.cc
index 873f874e..eb800d7 100644
--- a/ash/system/unified/ime_mode_view.cc
+++ b/ash/system/unified/ime_mode_view.cc
@@ -15,7 +15,7 @@
 
 namespace ash {
 
-ImeModeView::ImeModeView() : TrayItemView(nullptr) {
+ImeModeView::ImeModeView(Shelf* shelf) : TrayItemView(shelf) {
   SetVisible(false);
   CreateLabel();
   SetupLabelForTray(label());
diff --git a/ash/system/unified/ime_mode_view.h b/ash/system/unified/ime_mode_view.h
index 246b20e..6e97bbe 100644
--- a/ash/system/unified/ime_mode_view.h
+++ b/ash/system/unified/ime_mode_view.h
@@ -19,7 +19,7 @@
                     public TabletModeObserver,
                     public SessionObserver {
  public:
-  ImeModeView();
+  explicit ImeModeView(Shelf* shelf);
   ~ImeModeView() override;
 
   // IMEObserver:
diff --git a/ash/system/unified/managed_device_view.cc b/ash/system/unified/managed_device_view.cc
index d4b2eb5f..241bc16 100644
--- a/ash/system/unified/managed_device_view.cc
+++ b/ash/system/unified/managed_device_view.cc
@@ -16,7 +16,7 @@
 
 namespace ash {
 
-ManagedDeviceView::ManagedDeviceView() : TrayItemView(nullptr) {
+ManagedDeviceView::ManagedDeviceView(Shelf* shelf) : TrayItemView(shelf) {
   Shell::Get()->session_controller()->AddObserver(this);
   CreateImageView();
   OnLoginStatusChanged(Shell::Get()->session_controller()->login_status());
diff --git a/ash/system/unified/managed_device_view.h b/ash/system/unified/managed_device_view.h
index 5e09b2ea..89f27dad 100644
--- a/ash/system/unified/managed_device_view.h
+++ b/ash/system/unified/managed_device_view.h
@@ -17,7 +17,7 @@
 class ManagedDeviceView : public TrayItemView,
                           public SessionObserver {
  public:
-  ManagedDeviceView();
+  explicit ManagedDeviceView(Shelf* shelf);
   ~ManagedDeviceView() override;
 
   // SessionObserver:
diff --git a/ash/system/unified/notification_counter_view.cc b/ash/system/unified/notification_counter_view.cc
index 1ad947b..ee23bf7 100644
--- a/ash/system/unified/notification_counter_view.cc
+++ b/ash/system/unified/notification_counter_view.cc
@@ -89,7 +89,8 @@
 
 }  // namespace
 
-NotificationCounterView::NotificationCounterView() : TrayItemView(nullptr) {
+NotificationCounterView::NotificationCounterView(Shelf* shelf)
+    : TrayItemView(shelf) {
   CreateImageView();
   image_view()->set_tooltip_text(
       l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_NOTIFICATIONS_LABEL));
@@ -123,7 +124,7 @@
   Update();
 }
 
-QuietModeView::QuietModeView() : TrayItemView(nullptr) {
+QuietModeView::QuietModeView(Shelf* shelf) : TrayItemView(shelf) {
   CreateImageView();
   SetVisible(false);
   Shell::Get()->session_controller()->AddObserver(this);
diff --git a/ash/system/unified/notification_counter_view.h b/ash/system/unified/notification_counter_view.h
index e0a1d8cb..e1ca7cdc 100644
--- a/ash/system/unified/notification_counter_view.h
+++ b/ash/system/unified/notification_counter_view.h
@@ -14,7 +14,7 @@
 // A notification counter view in UnifiedSystemTray button.
 class NotificationCounterView : public TrayItemView, public SessionObserver {
  public:
-  NotificationCounterView();
+  explicit NotificationCounterView(Shelf* shelf);
   ~NotificationCounterView() override;
 
   void Update();
@@ -35,7 +35,7 @@
 // A do-not-distrub icon view in UnifiedSystemTray button.
 class QuietModeView : public TrayItemView, public SessionObserver {
  public:
-  QuietModeView();
+  explicit QuietModeView(Shelf* shelf);
   ~QuietModeView() override;
 
   void Update();
diff --git a/ash/system/unified/unified_system_tray.cc b/ash/system/unified/unified_system_tray.cc
index 818a780..db05e9c 100644
--- a/ash/system/unified/unified_system_tray.cc
+++ b/ash/system/unified/unified_system_tray.cc
@@ -150,11 +150,11 @@
       model_(std::make_unique<UnifiedSystemTrayModel>()),
       slider_bubble_controller_(
           std::make_unique<UnifiedSliderBubbleController>(this)),
-      ime_mode_view_(new ImeModeView()),
-      managed_device_view_(new ManagedDeviceView()),
-      notification_counter_item_(new NotificationCounterView()),
-      quiet_mode_view_(new QuietModeView()),
-      time_view_(new tray::TimeTrayItemView(nullptr, shelf)) {
+      ime_mode_view_(new ImeModeView(shelf)),
+      managed_device_view_(new ManagedDeviceView(shelf)),
+      notification_counter_item_(new NotificationCounterView(shelf)),
+      quiet_mode_view_(new QuietModeView(shelf)),
+      time_view_(new tray::TimeTrayItemView(shelf)) {
   tray_container()->SetMargin(kUnifiedTrayContentPadding, 0);
   tray_container()->AddChildView(ime_mode_view_);
   tray_container()->AddChildView(managed_device_view_);
@@ -163,13 +163,13 @@
 
   // It is possible in unit tests that it's missing.
   if (chromeos::NetworkHandler::IsInitialized()) {
-    tray::NetworkTrayView* network_item = new tray::NetworkTrayView(nullptr);
+    tray::NetworkTrayView* network_item = new tray::NetworkTrayView(shelf);
     network_state_delegate_ =
         std::make_unique<NetworkStateDelegate>(network_item);
     tray_container()->AddChildView(network_item);
   }
 
-  tray_container()->AddChildView(new tray::PowerTrayView(nullptr));
+  tray_container()->AddChildView(new tray::PowerTrayView(shelf));
   tray_container()->AddChildView(time_view_);
 
   SetInkDropMode(InkDropMode::ON);
diff --git a/ash/system/unified/user_chooser_view.cc b/ash/system/unified/user_chooser_view.cc
index 56aa212..f0085286 100644
--- a/ash/system/unified/user_chooser_view.cc
+++ b/ash/system/unified/user_chooser_view.cc
@@ -174,7 +174,9 @@
     : Button(this),
       user_index_(user_index),
       controller_(controller),
-      capture_icon_(new views::ImageView) {
+      capture_icon_(new views::ImageView),
+      name_(new views::Label),
+      email_(new views::Label) {
   auto* layout = SetLayoutManager(std::make_unique<views::BoxLayout>(
       views::BoxLayout::kHorizontal, gfx::Insets(0, kUnifiedTopShortcutSpacing),
       kUnifiedTopShortcutSpacing));
@@ -193,19 +195,17 @@
   const mojom::UserSession* const user_session =
       Shell::Get()->session_controller()->GetUserSession(user_index);
 
-  auto* name = new views::Label(
-      base::UTF8ToUTF16(user_session->user_info->display_name));
-  name->SetEnabledColor(kUnifiedMenuTextColor);
-  name->SetAutoColorReadabilityEnabled(false);
-  name->SetSubpixelRenderingEnabled(false);
-  vertical_labels->AddChildView(name);
+  name_->SetText(base::UTF8ToUTF16(user_session->user_info->display_name));
+  name_->SetEnabledColor(kUnifiedMenuTextColor);
+  name_->SetAutoColorReadabilityEnabled(false);
+  name_->SetSubpixelRenderingEnabled(false);
+  vertical_labels->AddChildView(name_);
 
-  auto* email = new views::Label(
-      base::UTF8ToUTF16(user_session->user_info->display_email));
-  email->SetEnabledColor(kUnifiedMenuSecondaryTextColor);
-  email->SetAutoColorReadabilityEnabled(false);
-  email->SetSubpixelRenderingEnabled(false);
-  vertical_labels->AddChildView(email);
+  email_->SetText(base::UTF8ToUTF16(user_session->user_info->display_email));
+  email_->SetEnabledColor(kUnifiedMenuSecondaryTextColor);
+  email_->SetAutoColorReadabilityEnabled(false);
+  email_->SetSubpixelRenderingEnabled(false);
+  vertical_labels->AddChildView(email_);
 
   AddChildView(vertical_labels);
   layout->SetFlexForView(vertical_labels, 1);
@@ -251,6 +251,16 @@
     capture_icon_->set_tooltip_text(l10n_util::GetStringUTF16(res_id));
 }
 
+bool UserItemButton::GetTooltipText(const gfx::Point& p,
+                                    base::string16* tooltip) const {
+  // If both of them are full shown, hide the tooltip.
+  if (name_->GetPreferredSize().width() <= name_->width() &&
+      email_->GetPreferredSize().width() <= email_->width()) {
+    return false;
+  }
+  return views::Button::GetTooltipText(p, tooltip);
+}
+
 void UserItemButton::ButtonPressed(views::Button* sender,
                                    const ui::Event& event) {
   if (user_index_ > 0)
diff --git a/ash/system/unified/user_chooser_view.h b/ash/system/unified/user_chooser_view.h
index 98c0907..33280c2 100644
--- a/ash/system/unified/user_chooser_view.h
+++ b/ash/system/unified/user_chooser_view.h
@@ -11,6 +11,7 @@
 
 namespace views {
 class ImageView;
+class Label;
 }  // namespace views
 
 namespace ash {
@@ -33,6 +34,10 @@
 
   void SetCaptureState(mojom::MediaCaptureState capture_states);
 
+  // views::Button:
+  bool GetTooltipText(const gfx::Point& p,
+                      base::string16* tooltip) const override;
+
   // views::ButtonListener:
   void ButtonPressed(views::Button* sender, const ui::Event& event) override;
 
@@ -40,6 +45,8 @@
   const int user_index_;
   UnifiedSystemTrayController* const controller_;
   views::ImageView* const capture_icon_;
+  views::Label* const name_;
+  views::Label* const email_;
 
   DISALLOW_COPY_AND_ASSIGN(UserItemButton);
 };
diff --git a/ash/wm/tablet_mode/tablet_mode_controller.cc b/ash/wm/tablet_mode/tablet_mode_controller.cc
index 5717061..cdb4b8b2 100644
--- a/ash/wm/tablet_mode/tablet_mode_controller.cc
+++ b/ash/wm/tablet_mode/tablet_mode_controller.cc
@@ -396,11 +396,15 @@
 }
 
 void TabletModeController::OnMouseDeviceConfigurationChanged() {
-  HandleMouseAddedOrRemoved();
+  HandlePointingDeviceAddedOrRemoved();
+}
+
+void TabletModeController::OnTouchpadDeviceConfigurationChanged() {
+  HandlePointingDeviceAddedOrRemoved();
 }
 
 void TabletModeController::OnDeviceListsComplete() {
-  HandleMouseAddedOrRemoved();
+  HandlePointingDeviceAddedOrRemoved();
 }
 
 void TabletModeController::HandleHingeRotation(
@@ -504,7 +508,7 @@
 }
 
 void TabletModeController::AttemptEnterTabletMode() {
-  if (IsTabletModeWindowManagerEnabled() || has_external_mouse_) {
+  if (IsTabletModeWindowManagerEnabled() || has_external_pointing_device_) {
     UpdateInternalMouseAndKeyboardEventBlocker();
     return;
   }
@@ -566,33 +570,47 @@
   return force_ui_mode_ == UiMode::kNone;
 }
 
-void TabletModeController::HandleMouseAddedOrRemoved() {
+void TabletModeController::HandlePointingDeviceAddedOrRemoved() {
   if (!AllowUiModeChange())
     return;
 
-  bool has_external_mouse = false;
+  bool has_external_pointing_device = false;
+  // Check if there is an external mouse device.
   for (const ui::InputDevice& mouse :
        ui::InputDeviceManager::GetInstance()->GetMouseDevices()) {
     if (mouse.type == ui::INPUT_DEVICE_USB ||
         (mouse.type == ui::INPUT_DEVICE_BLUETOOTH &&
          bluetooth_devices_observer_->IsConnectedBluetoothDevice(mouse))) {
-      has_external_mouse = true;
+      has_external_pointing_device = true;
       break;
     }
   }
+  // Check if there is an external touchpad device.
+  if (!has_external_pointing_device) {
+    for (const ui::InputDevice& touch_pad :
+         ui::InputDeviceManager::GetInstance()->GetTouchpadDevices()) {
+      if (touch_pad.type == ui::INPUT_DEVICE_USB ||
+          (touch_pad.type == ui::INPUT_DEVICE_BLUETOOTH &&
+           bluetooth_devices_observer_->IsConnectedBluetoothDevice(
+               touch_pad))) {
+        has_external_pointing_device = true;
+        break;
+      }
+    }
+  }
 
-  if (has_external_mouse_ == has_external_mouse)
+  if (has_external_pointing_device_ == has_external_pointing_device)
     return;
 
-  has_external_mouse_ = has_external_mouse;
+  has_external_pointing_device_ = has_external_pointing_device;
 
-  // Enter clamshell mode whenever an external mouse is attached.
-  if (has_external_mouse) {
+  // Enter clamshell mode whenever an external pointing device is attached.
+  if (has_external_pointing_device) {
     AttemptLeaveTabletMode();
   } else if (LidAngleIsInTabletModeRange() || tablet_mode_switch_is_on_) {
-    // If there is no external mouse, only enter tablet mode if 1) the lid angle
-    // can be detected and is in tablet mode angle range. or 2) if the lid angle
-    // can't be detected (e.g., tablet device or clamshell device) and
+    // If there is no external pointing device, only enter tablet mode if 1) the
+    // lid angle can be detected and is in tablet mode angle range. or 2) if the
+    // lid angle can't be detected (e.g., tablet device or clamshell device) and
     // |tablet_mode_switch_is_on_| is true (it can only happen for tablet device
     // as |tablet_mode_switch_is_on_| should never be true for a clamshell
     // device).
@@ -602,17 +620,18 @@
 
 void TabletModeController::UpdateBluetoothDevice(
     device::BluetoothDevice* device) {
-  // We only care about mouse type bluetooth device change. Note KEYBOARD
+  // We only care about pointing type bluetooth device change. Note KEYBOARD
   // type is also included here as sometimes a bluetooth keyboard comes with a
   // touch pad.
   if (device->GetDeviceType() != device::BluetoothDeviceType::MOUSE &&
       device->GetDeviceType() !=
           device::BluetoothDeviceType::KEYBOARD_MOUSE_COMBO &&
-      device->GetDeviceType() != device::BluetoothDeviceType::KEYBOARD) {
+      device->GetDeviceType() != device::BluetoothDeviceType::KEYBOARD &&
+      device->GetDeviceType() != device::BluetoothDeviceType::TABLET) {
     return;
   }
 
-  HandleMouseAddedOrRemoved();
+  HandlePointingDeviceAddedOrRemoved();
 }
 
 void TabletModeController::UpdateInternalMouseAndKeyboardEventBlocker() {
diff --git a/ash/wm/tablet_mode/tablet_mode_controller.h b/ash/wm/tablet_mode/tablet_mode_controller.h
index 70fc5d1..7e2487d 100644
--- a/ash/wm/tablet_mode/tablet_mode_controller.h
+++ b/ash/wm/tablet_mode/tablet_mode_controller.h
@@ -137,6 +137,7 @@
 
   // ui::InputDeviceEventObserver:
   void OnMouseDeviceConfigurationChanged() override;
+  void OnTouchpadDeviceConfigurationChanged() override;
   void OnDeviceListsComplete() override;
 
  private:
@@ -200,9 +201,9 @@
   // software to behave in a certain way regardless of configuration.
   bool AllowUiModeChange() const;
 
-  // Called when a mouse config is changed, or when a device list is
+  // Called when a pointing device config is changed, or when a device list is
   // sent from device manager. This will exit tablet mode if needed.
-  void HandleMouseAddedOrRemoved();
+  void HandlePointingDeviceAddedOrRemoved();
 
   // Callback function for |bluetooth_devices_observer_|. Called when |device|
   // changes.
@@ -261,9 +262,9 @@
   // Last computed lid angle.
   double lid_angle_ = 0.0f;
 
-  // Tracks if the device has an external mouse. The device will
+  // Tracks if the device has an external pointing device. The device will
   // not enter tablet mode if this is true.
-  bool has_external_mouse_ = false;
+  bool has_external_pointing_device_ = false;
 
   // Tracks smoothed accelerometer data over time. This is done when the hinge
   // is approaching vertical to remove abrupt acceleration that can lead to
diff --git a/ash/wm/tablet_mode/tablet_mode_controller_unittest.cc b/ash/wm/tablet_mode/tablet_mode_controller_unittest.cc
index 406374b..f443bf3b 100644
--- a/ash/wm/tablet_mode/tablet_mode_controller_unittest.cc
+++ b/ash/wm/tablet_mode/tablet_mode_controller_unittest.cc
@@ -896,6 +896,40 @@
   EXPECT_FALSE(AreEventsBlocked());
 }
 
+// Tests that when an external touchpad is connected, the device should exit
+// tablet mode and enter clamshell mode.
+TEST_F(TabletModeControllerTest, ExternalTouchPadTest) {
+  // Set the current list of devices to empty so that they don't interfere
+  // with the test.
+  base::RunLoop().RunUntilIdle();
+  ws::InputDeviceClientTestApi().SetTouchpadDevices({});
+  base::RunLoop().RunUntilIdle();
+
+  OpenLidToAngle(300.0f);
+  EXPECT_TRUE(IsTabletModeStarted());
+
+  OpenLidToAngle(30.0f);
+  EXPECT_FALSE(IsTabletModeStarted());
+
+  // Attach a external touchpad.
+  ws::InputDeviceClientTestApi().SetTouchpadDevices(
+      {ui::InputDevice(3, ui::InputDeviceType::INPUT_DEVICE_USB, "touchpad")});
+  base::RunLoop().RunUntilIdle();
+  EXPECT_FALSE(IsTabletModeStarted());
+  EXPECT_FALSE(AreEventsBlocked());
+
+  // Open lid to tent mode. Verify that tablet mode is not started.
+  OpenLidToAngle(300.0f);
+  EXPECT_FALSE(IsTabletModeStarted());
+  EXPECT_TRUE(AreEventsBlocked());
+
+  // Verify that after unplugging the touchpad, tablet mode will resume.
+  ws::InputDeviceClientTestApi().SetTouchpadDevices({});
+  base::RunLoop().RunUntilIdle();
+  EXPECT_TRUE(IsTabletModeStarted());
+  EXPECT_TRUE(AreEventsBlocked());
+}
+
 class TabletModeControllerForceTabletModeTest
     : public TabletModeControllerTest {
  public:
diff --git a/ash/ws/window_service_delegate_impl.cc b/ash/ws/window_service_delegate_impl.cc
index d76f159a..3231993a 100644
--- a/ash/ws/window_service_delegate_impl.cc
+++ b/ash/ws/window_service_delegate_impl.cc
@@ -218,13 +218,6 @@
   return system_input_injector_.get();
 }
 
-aura::WindowTreeHost* WindowServiceDelegateImpl::GetWindowTreeHostForDisplayId(
-    int64_t display_id) {
-  RootWindowController* root_window_controller =
-      Shell::GetRootWindowControllerWithDisplayId(display_id);
-  return root_window_controller ? root_window_controller->GetHost() : nullptr;
-}
-
 aura::Window* WindowServiceDelegateImpl::GetTopmostWindowAtPoint(
     const gfx::Point& location_in_screen,
     const std::set<aura::Window*>& ignore,
diff --git a/ash/ws/window_service_delegate_impl.h b/ash/ws/window_service_delegate_impl.h
index 9cfd1e0..eaefa3a 100644
--- a/ash/ws/window_service_delegate_impl.h
+++ b/ash/ws/window_service_delegate_impl.h
@@ -42,8 +42,6 @@
                            ui::mojom::TextInputStatePtr state) override;
   void SetModalType(aura::Window* window, ui::ModalType type) override;
   ui::SystemInputInjector* GetSystemInputInjector() override;
-  aura::WindowTreeHost* GetWindowTreeHostForDisplayId(
-      int64_t display_id) override;
   aura::Window* GetTopmostWindowAtPoint(const gfx::Point& location_in_screen,
                                         const std::set<aura::Window*>& ignores,
                                         aura::Window** real_topmost) override;
diff --git a/base/json/json_writer.cc b/base/json/json_writer.cc
index e4cbd28..e4f1e3c 100644
--- a/base/json/json_writer.cc
+++ b/base/json/json_writer.cc
@@ -57,34 +57,47 @@
 
 bool JSONWriter::BuildJSONString(const Value& node, size_t depth) {
   switch (node.type()) {
-    case Value::Type::NONE:
+    case Value::Type::NONE: {
       json_string_->append("null");
       return true;
+    }
 
-    case Value::Type::BOOLEAN:
-      json_string_->append(node.GetBool() ? "true" : "false");
-      return true;
+    case Value::Type::BOOLEAN: {
+      bool value;
+      bool result = node.GetAsBoolean(&value);
+      DCHECK(result);
+      json_string_->append(value ? "true" : "false");
+      return result;
+    }
 
-    case Value::Type::INTEGER:
-      json_string_->append(IntToString(node.GetInt()));
-      return true;
+    case Value::Type::INTEGER: {
+      int value;
+      bool result = node.GetAsInteger(&value);
+      DCHECK(result);
+      json_string_->append(IntToString(value));
+      return result;
+    }
 
     case Value::Type::DOUBLE: {
-      double value = node.GetDouble();
+      double value;
+      bool result = node.GetAsDouble(&value);
+      DCHECK(result);
       if (omit_double_type_preservation_ &&
           value <= std::numeric_limits<int64_t>::max() &&
           value >= std::numeric_limits<int64_t>::min() &&
           std::floor(value) == value) {
         json_string_->append(Int64ToString(static_cast<int64_t>(value)));
-        return true;
+        return result;
       }
       std::string real = NumberToString(value);
       // Ensure that the number has a .0 if there's no decimal or 'e'.  This
       // makes sure that when we read the JSON back, it's interpreted as a
       // real rather than an int.
-      if (real.find_first_of(".eE") == std::string::npos)
+      if (real.find('.') == std::string::npos &&
+          real.find('e') == std::string::npos &&
+          real.find('E') == std::string::npos) {
         real.append(".0");
-
+      }
       // The JSON spec requires that non-integer values in the range (-1,1)
       // have a zero before the decimal point - ".52" is not valid, "0.52" is.
       if (real[0] == '.') {
@@ -94,21 +107,27 @@
         real.insert(static_cast<size_t>(1), static_cast<size_t>(1), '0');
       }
       json_string_->append(real);
-      return true;
+      return result;
     }
 
-    case Value::Type::STRING:
-      EscapeJSONString(node.GetString(), true, json_string_);
-      return true;
+    case Value::Type::STRING: {
+      std::string value;
+      bool result = node.GetAsString(&value);
+      DCHECK(result);
+      EscapeJSONString(value, true, json_string_);
+      return result;
+    }
 
     case Value::Type::LIST: {
       json_string_->push_back('[');
       if (pretty_print_)
         json_string_->push_back(' ');
 
+      const ListValue* list = nullptr;
       bool first_value_has_been_output = false;
-      bool result = true;
-      for (const auto& value : node.GetList()) {
+      bool result = node.GetAsList(&list);
+      DCHECK(result);
+      for (const auto& value : *list) {
         if (omit_binary_values_ && value.type() == Value::Type::BINARY)
           continue;
 
@@ -135,13 +154,15 @@
       if (pretty_print_)
         json_string_->append(kPrettyPrintLineEnding);
 
+      const DictionaryValue* dict = nullptr;
       bool first_value_has_been_output = false;
-      bool result = true;
-      for (const auto& pair : node.DictItems()) {
-        const auto& key = pair.first;
-        const auto& value = pair.second;
-        if (omit_binary_values_ && value.type() == Value::Type::BINARY)
+      bool result = node.GetAsDictionary(&dict);
+      DCHECK(result);
+      for (DictionaryValue::Iterator itr(*dict); !itr.IsAtEnd();
+           itr.Advance()) {
+        if (omit_binary_values_ && itr.value().type() == Value::Type::BINARY) {
           continue;
+        }
 
         if (first_value_has_been_output) {
           json_string_->push_back(',');
@@ -152,12 +173,12 @@
         if (pretty_print_)
           IndentLine(depth + 1U);
 
-        EscapeJSONString(key, true, json_string_);
+        EscapeJSONString(itr.key(), true, json_string_);
         json_string_->push_back(':');
         if (pretty_print_)
           json_string_->push_back(' ');
 
-        if (!BuildJSONString(value, depth + 1U))
+        if (!BuildJSONString(itr.value(), depth + 1U))
           result = false;
 
         first_value_has_been_output = true;
@@ -177,9 +198,7 @@
       DLOG_IF(ERROR, !omit_binary_values_) << "Cannot serialize binary value.";
       return omit_binary_values_;
   }
-
-  // TODO(crbug.com/859477): Revert to NOTREACHED() after root cause is found.
-  CHECK(false);
+  NOTREACHED();
   return false;
 }
 
diff --git a/base/mac/mach_port_broker.h b/base/mac/mach_port_broker.h
index 4554b6ae..41e58200 100644
--- a/base/mac/mach_port_broker.h
+++ b/base/mac/mach_port_broker.h
@@ -78,11 +78,13 @@
   // incoming message needs to be received.
   void HandleRequest();
 
-  // Updates the mapping for |pid| to include the given |mach_info|.  Does
+  // Updates the mapping for |pid| to include the given |mach_info|. Does
   // nothing if PlaceholderForPid() has not already been called for the given
   // |pid|. Callers MUST acquire the lock given by GetLock() before calling
-  // this method (and release the lock afterwards).
-  void FinalizePid(base::ProcessHandle pid, mach_port_t task_port);
+  // this method (and release the lock afterwards). Returns true if the port
+  // was accepeted for the PID, or false if it was rejected (e.g. due to an
+  // unknown sender).
+  bool FinalizePid(base::ProcessHandle pid, mach_port_t task_port);
 
   // Name used to identify a particular port broker.
   const std::string name_;
diff --git a/base/mac/mach_port_broker.mm b/base/mac/mach_port_broker.mm
index 6d9fec5..21f5d18 100644
--- a/base/mac/mach_port_broker.mm
+++ b/base/mac/mach_port_broker.mm
@@ -10,6 +10,7 @@
 #include "base/logging.h"
 #include "base/mac/foundation_util.h"
 #include "base/mac/mach_logging.h"
+#include "base/mac/scoped_mach_msg_destroy.h"
 #include "base/strings/string_util.h"
 #include "base/strings/stringprintf.h"
 
@@ -17,6 +18,8 @@
 
 namespace {
 
+constexpr mach_msg_id_t kTaskPortMessageId = 'tskp';
+
 // Mach message structure used in the child as a sending message.
 struct MachPortBroker_ChildSendMsg {
   mach_msg_header_t header;
@@ -47,12 +50,12 @@
 
   // Create the check in message. This will copy a send right on this process'
   // (the child's) task port and send it to the parent.
-  MachPortBroker_ChildSendMsg msg;
-  bzero(&msg, sizeof(msg));
+  MachPortBroker_ChildSendMsg msg{};
   msg.header.msgh_bits = MACH_MSGH_BITS_REMOTE(MACH_MSG_TYPE_COPY_SEND) |
                          MACH_MSGH_BITS_COMPLEX;
-  msg.header.msgh_remote_port = parent_port;
   msg.header.msgh_size = sizeof(msg);
+  msg.header.msgh_remote_port = parent_port;
+  msg.header.msgh_id = kTaskPortMessageId;
   msg.body.msgh_descriptor_count = 1;
   msg.child_task_port.name = mach_task_self();
   msg.child_task_port.disposition = MACH_MSG_TYPE_PORT_SEND;
@@ -130,8 +133,7 @@
 }
 
 void MachPortBroker::HandleRequest() {
-  MachPortBroker_ParentRecvMsg msg;
-  bzero(&msg, sizeof(msg));
+  MachPortBroker_ParentRecvMsg msg{};
   msg.header.msgh_size = sizeof(msg);
   msg.header.msgh_local_port = server_port_.get();
 
@@ -151,6 +153,19 @@
     return;
   }
 
+  // Destroy any rights that this class does not take ownership of.
+  ScopedMachMsgDestroy scoped_msg(&msg.header);
+
+  // Validate that the received message is what is expected.
+  if ((msg.header.msgh_bits & MACH_MSGH_BITS_COMPLEX) == 0 ||
+      msg.header.msgh_id != kTaskPortMessageId ||
+      msg.header.msgh_size != sizeof(MachPortBroker_ChildSendMsg) ||
+      msg.child_task_port.disposition != MACH_MSG_TYPE_PORT_SEND ||
+      msg.child_task_port.type != MACH_MSG_PORT_DESCRIPTOR) {
+    LOG(ERROR) << "Received unexpected message";
+    return;
+  }
+
   // Use the kernel audit information to make sure this message is from
   // a task that this process spawned. The kernel audit token contains the
   // unspoofable pid of the task that sent the message.
@@ -160,12 +175,14 @@
   // Take the lock and update the broker information.
   {
     base::AutoLock lock(lock_);
-    FinalizePid(child_pid, child_task_port);
+    if (FinalizePid(child_pid, child_task_port)) {
+      scoped_msg.Disarm();
+    }
   }
   NotifyObservers(child_pid);
 }
 
-void MachPortBroker::FinalizePid(base::ProcessHandle pid,
+bool MachPortBroker::FinalizePid(base::ProcessHandle pid,
                                  mach_port_t task_port) {
   lock_.AssertAcquired();
 
@@ -173,12 +190,16 @@
   if (it == mach_map_.end()) {
     // Do nothing for unknown pids.
     LOG(ERROR) << "Unknown process " << pid << " is sending Mach IPC messages!";
-    return;
+    return false;
   }
 
-  DCHECK(it->second == MACH_PORT_NULL);
-  if (it->second == MACH_PORT_NULL)
-    it->second = task_port;
+  if (it->second != MACH_PORT_NULL) {
+    NOTREACHED();
+    return false;
+  }
+
+  it->second = task_port;
+  return true;
 }
 
 }  // namespace base
diff --git a/base/strings/string_split.cc b/base/strings/string_split.cc
index a8180b2..1456c3d 100644
--- a/base/strings/string_split.cc
+++ b/base/strings/string_split.cc
@@ -209,11 +209,20 @@
                                   char key_value_delimiter,
                                   char key_value_pair_delimiter,
                                   StringPairs* key_value_pairs) {
+  return SplitStringIntoKeyValuePairsUsingSubstr(
+      input, key_value_delimiter, StringPiece(&key_value_pair_delimiter, 1),
+      key_value_pairs);
+}
+
+bool SplitStringIntoKeyValuePairsUsingSubstr(
+    StringPiece input,
+    char key_value_delimiter,
+    StringPiece key_value_pair_delimiter,
+    StringPairs* key_value_pairs) {
   key_value_pairs->clear();
 
-  std::vector<StringPiece> pairs = SplitStringPiece(
-      input, std::string(1, key_value_pair_delimiter),
-      TRIM_WHITESPACE, SPLIT_WANT_NONEMPTY);
+  std::vector<StringPiece> pairs = SplitStringPieceUsingSubstr(
+      input, key_value_pair_delimiter, TRIM_WHITESPACE, SPLIT_WANT_NONEMPTY);
   key_value_pairs->reserve(pairs.size());
 
   bool success = true;
diff --git a/base/strings/string_split.h b/base/strings/string_split.h
index 24b9dfa..406dd2a 100644
--- a/base/strings/string_split.h
+++ b/base/strings/string_split.h
@@ -88,6 +88,14 @@
                                               char key_value_pair_delimiter,
                                               StringPairs* key_value_pairs);
 
+// Similar to SplitStringIntoKeyValuePairs, but use a substring
+// |key_value_pair_delimiter| instead of a single char.
+BASE_EXPORT bool SplitStringIntoKeyValuePairsUsingSubstr(
+    StringPiece input,
+    char key_value_delimiter,
+    StringPiece key_value_pair_delimiter,
+    StringPairs* key_value_pairs);
+
 // Similar to SplitString, but use a substring delimiter instead of a list of
 // characters that are all possible delimiters.
 BASE_EXPORT std::vector<string16> SplitStringUsingSubstr(
diff --git a/base/strings/string_split_unittest.cc b/base/strings/string_split_unittest.cc
index d022bef..022ec17 100644
--- a/base/strings/string_split_unittest.cc
+++ b/base/strings/string_split_unittest.cc
@@ -21,6 +21,68 @@
   base::StringPairs kv_pairs;
 };
 
+using SplitStringIntoKeyValuePairsUsingSubstrTest =
+    SplitStringIntoKeyValuePairsTest;
+
+TEST_F(SplitStringIntoKeyValuePairsUsingSubstrTest, EmptyString) {
+  EXPECT_TRUE(
+      SplitStringIntoKeyValuePairsUsingSubstr(std::string(),
+                                              ':',  // Key-value delimiter
+                                              ",",  // Key-value pair delimiter
+                                              &kv_pairs));
+  EXPECT_TRUE(kv_pairs.empty());
+}
+
+TEST_F(SplitStringIntoKeyValuePairsUsingSubstrTest, MissingKeyValueDelimiter) {
+  EXPECT_FALSE(
+      SplitStringIntoKeyValuePairsUsingSubstr("key1,,key2:value2",
+                                              ':',   // Key-value delimiter
+                                              ",,",  // Key-value pair delimiter
+                                              &kv_pairs));
+  ASSERT_EQ(2U, kv_pairs.size());
+  EXPECT_TRUE(kv_pairs[0].first.empty());
+  EXPECT_TRUE(kv_pairs[0].second.empty());
+  EXPECT_EQ("key2", kv_pairs[1].first);
+  EXPECT_EQ("value2", kv_pairs[1].second);
+}
+
+TEST_F(SplitStringIntoKeyValuePairsUsingSubstrTest,
+       MissingKeyValuePairDelimeter) {
+  EXPECT_TRUE(SplitStringIntoKeyValuePairsUsingSubstr(
+      "key1:value1,,key3:value3",
+      ':',    // Key-value delimiter
+      ",,,",  // Key-value pair delimiter
+      &kv_pairs));
+  ASSERT_EQ(1U, kv_pairs.size());
+  EXPECT_EQ("key1", kv_pairs[0].first);
+  EXPECT_EQ("value1,,key3:value3", kv_pairs[0].second);
+}
+
+TEST_F(SplitStringIntoKeyValuePairsUsingSubstrTest, UntrimmedWhitespace) {
+  EXPECT_TRUE(
+      SplitStringIntoKeyValuePairsUsingSubstr("key1 : value1",
+                                              ':',  // Key-value delimiter
+                                              ",",  // Key-value pair delimiter
+                                              &kv_pairs));
+  ASSERT_EQ(1U, kv_pairs.size());
+  EXPECT_EQ("key1 ", kv_pairs[0].first);
+  EXPECT_EQ(" value1", kv_pairs[0].second);
+}
+
+TEST_F(SplitStringIntoKeyValuePairsUsingSubstrTest, OnlySplitAtGivenSeparator) {
+  std::string a("a ?!@#$%^&*()_+:/{}\\\t\nb");
+  EXPECT_TRUE(
+      SplitStringIntoKeyValuePairsUsingSubstr(a + "X" + a + "XY" + a + "YX" + a,
+                                              'X',   // Key-value delimiter
+                                              "XY",  // Key-value pair delimiter
+                                              &kv_pairs));
+  ASSERT_EQ(2U, kv_pairs.size());
+  EXPECT_EQ(a, kv_pairs[0].first);
+  EXPECT_EQ(a, kv_pairs[0].second);
+  EXPECT_EQ(a + 'Y', kv_pairs[1].first);
+  EXPECT_EQ(a, kv_pairs[1].second);
+}
+
 TEST_F(SplitStringIntoKeyValuePairsTest, EmptyString) {
   EXPECT_TRUE(SplitStringIntoKeyValuePairs(std::string(),
                                            ':',  // Key-value delimiter
@@ -29,18 +91,6 @@
   EXPECT_TRUE(kv_pairs.empty());
 }
 
-TEST_F(SplitStringIntoKeyValuePairsTest, MissingKeyValueDelimiter) {
-  EXPECT_FALSE(SplitStringIntoKeyValuePairs("key1,key2:value2",
-                                            ':',  // Key-value delimiter
-                                            ',',  // Key-value pair delimiter
-                                            &kv_pairs));
-  ASSERT_EQ(2U, kv_pairs.size());
-  EXPECT_TRUE(kv_pairs[0].first.empty());
-  EXPECT_TRUE(kv_pairs[0].second.empty());
-  EXPECT_EQ("key2", kv_pairs[1].first);
-  EXPECT_EQ("value2", kv_pairs[1].second);
-}
-
 TEST_F(SplitStringIntoKeyValuePairsTest, EmptyKeyWithKeyValueDelimiter) {
   EXPECT_TRUE(SplitStringIntoKeyValuePairs(":value1,key2:value2",
                                            ':',  // Key-value delimiter
diff --git a/base/threading/sequence_bound_unittest.cc b/base/threading/sequence_bound_unittest.cc
index 9288b06a..d468aa32 100644
--- a/base/threading/sequence_bound_unittest.cc
+++ b/base/threading/sequence_bound_unittest.cc
@@ -7,6 +7,7 @@
 #include "base/run_loop.h"
 #include "base/test/scoped_task_environment.h"
 #include "base/threading/thread_task_runner_handle.h"
+#include "build/build_config.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace base {
@@ -70,7 +71,13 @@
   Value value = kInitialValue;
 };
 
-TEST_F(SequenceBoundTest, ConstructThenPostThenReset) {
+#if defined(OS_IOS) && !TARGET_OS_SIMULATOR
+#define MAYBE_ConstructThenPostThenReset FLAKY_ConstructThenPostThenReset
+#else
+#define MAYBE_ConstructThenPostThenReset ConstructThenPostThenReset
+#endif
+// https://crbug.com/899779 tracks test flakiness on iOS.
+TEST_F(SequenceBoundTest, MAYBE_ConstructThenPostThenReset) {
   auto derived = SequenceBound<Derived>(task_runner_, &value);
   EXPECT_FALSE(derived.is_null());
 
diff --git a/build/android/gyp/apkbuilder.py b/build/android/gyp/apkbuilder.py
index 39c06d5..ce61e756 100755
--- a/build/android/gyp/apkbuilder.py
+++ b/build/android/gyp/apkbuilder.py
@@ -327,9 +327,8 @@
         resource_infos = resource_apk.infolist()
 
         # 1. AndroidManifest.xml
-        copy_resource(
-            resource_apk.getinfo('AndroidManifest.xml'),
-            out_dir=apk_manifest_dir)
+        assert resource_infos[0].filename == 'AndroidManifest.xml'
+        copy_resource(resource_infos[0], out_dir=apk_manifest_dir)
 
         # 2. Assets
         if options.write_asset_list:
@@ -377,9 +376,8 @@
           build_utils.AddToZipHermetic(out_apk, apk_path, data='')
 
         # 5. Resources
-        for info in resource_infos:
-          if info.filename != 'AndroidManifest.xml':
-            copy_resource(info)
+        for info in resource_infos[1:]:
+          copy_resource(info)
 
         # 6. Java resources that should be accessible via
         # Class.getResourceAsStream(), in particular parts of Emma jar.
diff --git a/build/android/gyp/compile_resources.py b/build/android/gyp/compile_resources.py
index 2876e20..cbc2930 100755
--- a/build/android/gyp/compile_resources.py
+++ b/build/android/gyp/compile_resources.py
@@ -141,17 +141,6 @@
                           action='store_true',
                           help='Whether to strip xml namespaces from processed '
                                'xml resources')
-  input_opts.add_argument(
-      '--resources-config-path', help='Path to aapt2 resources config file.')
-  input_opts.add_argument(
-      '--optimize-resources',
-      default=False,
-      action='store_true',
-      help='Whether to run the `aapt2 optimize` step on the resources.')
-  input_opts.add_argument(
-      '--unoptimized-resources-path',
-      help='Path to output the intermediate apk before running '
-      '`aapt2 optimize`.')
 
   input_opts.add_argument(
       '--check-resources-pkg-id', type=_PackageIdArgument,
@@ -317,6 +306,7 @@
     '--version-name', options.version_name,
     '--auto-add-overlay',
     '--no-version-vectors',
+    '-o', options.apk_path,
   ]
 
   for j in options.include_resources:
@@ -491,11 +481,7 @@
     partial_path = os.path.join(partials_dir, dirname + '.zip')
     compile_command = (partial_compile_command +
                        ['--dir', directory, '-o', partial_path])
-    build_utils.CheckOutput(
-        compile_command,
-        stderr_filter=lambda output:
-            build_utils.FilterLines(
-                output, r'ignoring configuration .* for styleable'))
+    build_utils.CheckOutput(compile_command)
 
     # Sorting the files in the partial ensures deterministic output from the
     # aapt2 link step which uses order of files in the partial.
@@ -555,15 +541,7 @@
   for directory in dep_subdirs:
     renamed_paths.update(_MoveImagesToNonMdpiFolders(directory))
 
-  if options.optimize_resources:
-    if options.unoptimized_resources_path:
-      unoptimized_apk_path = options.unoptimized_resources_path
-    else:
-      unoptimized_apk_path = os.path.join(gen_dir, 'intermediate.ap_')
-  else:
-    unoptimized_apk_path = options.apk_path
   link_command = _CreateLinkApkArgs(options)
-  link_command += ['-o', unoptimized_apk_path]
   link_command += ['--output-text-symbols', r_txt_path]
   # TODO(digit): Is this below actually required for R.txt generation?
   link_command += ['--java', gen_dir]
@@ -579,26 +557,6 @@
   # Also creates R.txt
   build_utils.CheckOutput(
       link_command, print_stdout=False, print_stderr=False)
-
-  if options.optimize_resources:
-    # Optimize the resources.arsc file by obfuscating resource names and only
-    # allow usage via R.java constant.
-    optimize_command = [
-        options.aapt2_path,
-        'optimize',
-        '--enable-resource-obfuscation',
-        '-o',
-        options.apk_path,
-        unoptimized_apk_path,
-    ]
-    if options.resources_config_path:
-      optimize_command += [
-          '--resources-config-path',
-          options.resources_config_path,
-      ]
-    build_utils.CheckOutput(
-        optimize_command, print_stdout=False, print_stderr=False)
-
   _CreateResourceInfoFile(
       renamed_paths, options.apk_info_path, options.dependencies_res_zips)
 
@@ -681,27 +639,25 @@
   # Order of these must match order specified in GN so that the correct one
   # appears first in the depfile.
   possible_output_paths = [
-      options.apk_path,
-      options.apk_path + '.info',
-      options.r_text_out,
-      options.srcjar_out,
-      options.proguard_file,
-      options.proguard_file_main_dex,
-      options.unoptimized_resources_path,
+    options.apk_path,
+    options.apk_path + '.info',
+    options.r_text_out,
+    options.srcjar_out,
+    options.proguard_file,
+    options.proguard_file_main_dex,
   ]
   output_paths = [x for x in possible_output_paths if x]
 
   # List python deps in input_strings rather than input_paths since the contents
   # of them does not change what gets written to the depsfile.
   input_strings = options.extra_res_packages + [
-      options.shared_resources,
-      options.resource_blacklist_regex,
-      options.resource_blacklist_exceptions,
-      str(options.debuggable),
-      str(options.png_to_webp),
-      str(options.support_zh_hk),
-      str(options.no_xml_namespaces),
-      str(options.optimize_resources),
+    options.shared_resources,
+    options.resource_blacklist_regex,
+    options.resource_blacklist_exceptions,
+    str(options.debuggable),
+    str(options.png_to_webp),
+    str(options.support_zh_hk),
+    str(options.no_xml_namespaces),
   ]
 
   input_strings.extend(_CreateLinkApkArgs(options))
@@ -713,12 +669,11 @@
 
 
   possible_input_paths = [
-      options.aapt_path,
-      options.aapt2_path,
-      options.android_manifest,
-      debug_temp_resources_dir,
-      options.shared_resources_whitelist,
-      options.resources_config_path,
+    options.aapt_path,
+    options.aapt2_path,
+    options.android_manifest,
+    debug_temp_resources_dir,
+    options.shared_resources_whitelist,
   ]
   possible_input_paths += options.include_resources
   input_paths = [x for x in possible_input_paths if x]
diff --git a/build/android/gyp/create_app_bundle.py b/build/android/gyp/create_app_bundle.py
index 8f24717..d58bf30 100755
--- a/build/android/gyp/create_app_bundle.py
+++ b/build/android/gyp/create_app_bundle.py
@@ -50,10 +50,6 @@
                       help='Output bundle zip archive.')
   parser.add_argument('--module-zips', required=True,
                       help='GN-list of module zip archives.')
-  parser.add_argument(
-      '--rtxt-in-paths', action='append', help='GN-list of module R.txt files.')
-  parser.add_argument(
-      '--rtxt-out-path', help='Path to combined R.txt file for bundle.')
   parser.add_argument('--uncompressed-assets', action='append',
                       help='GN-list of uncompressed assets.')
   parser.add_argument('--uncompress-shared-libraries', action='append',
@@ -67,7 +63,6 @@
 
   options = parser.parse_args(args)
   options.module_zips = build_utils.ParseGnList(options.module_zips)
-  options.rtxt_in_paths = build_utils.ExpandFileArgs(options.rtxt_in_paths)
 
   if len(options.module_zips) == 0:
     raise Exception('The module zip list cannot be empty.')
@@ -290,14 +285,6 @@
 
     shutil.move(tmp_bundle, options.out_bundle)
 
-  if options.rtxt_out_path:
-    with open(options.rtxt_out_path, 'w') as rtxt_out:
-      for rtxt_in_path in options.rtxt_in_paths:
-        with open(rtxt_in_path, 'r') as rtxt_in:
-          rtxt_out.write('-- Contents of {}\n'.format(
-              os.path.basename(rtxt_in_path)))
-          rtxt_out.write(rtxt_in.read())
-
 
 if __name__ == '__main__':
   main(sys.argv[1:])
diff --git a/build/android/gyp/write_build_config.py b/build/android/gyp/write_build_config.py
index b87e551c..f4d25bf 100755
--- a/build/android/gyp/write_build_config.py
+++ b/build/android/gyp/write_build_config.py
@@ -348,10 +348,6 @@
 The path of an zip archive containing the APK's resources compiled to the
 protocol buffer format (instead of regular binary xml + resources.arsc).
 
-* `deps_info['module_rtxt_path']`:
-The path of the R.txt file generated when compiling the resources for the bundle
-module.
-
 * `native['libraries']`
 List of native libraries for the primary ABI to be embedded in this APK.
 E.g. [ "libchrome.so" ] (i.e. this doesn't include any ABI sub-directory
@@ -875,9 +871,6 @@
   parser.add_option('--apk-proto-resources',
                     help='Path to resources compiled in protocol buffer format '
                          ' for this apk.')
-  parser.add_option(
-      '--module-rtxt-path',
-      help='Path to R.txt file for resources in a bundle module.')
 
   parser.add_option('--generate-markdown-format-doc', action='store_true',
                     help='Dump the Markdown .build_config format documentation '
@@ -891,7 +884,7 @@
   if options.generate_markdown_format_doc:
     doc_lines = _ExtractMarkdownDocumentation(__doc__)
     for line in doc_lines:
-      print(line)
+        print(line)
     return 0
 
   if options.fail:
@@ -926,10 +919,6 @@
     if options.type != 'android_app_bundle_module':
       raise Exception('--apk-proto-resources can only be used with '
                       '--type=android_app_bundle_module')
-  if options.module_rtxt_path:
-    if options.type != 'android_app_bundle_module':
-      raise Exception('--module-rxt-path can only be used with '
-                      '--type=android_app_bundle_module')
 
   is_apk_or_module_target = options.type in ('android_apk',
       'android_app_bundle_module')
@@ -1039,9 +1028,6 @@
     if options.apk_proto_resources:
       deps_info['proto_resources_path'] = options.apk_proto_resources
 
-    if options.module_rtxt_path:
-      deps_info['module_rtxt_path'] = options.module_rtxt_path
-
   if is_java_target:
     deps_info['requires_android'] = bool(options.requires_android)
     deps_info['supports_android'] = bool(options.supports_android)
diff --git a/build/config/android/BUILD.gn b/build/config/android/BUILD.gn
index f21001c6..5ebde213 100644
--- a/build/config/android/BUILD.gn
+++ b/build/config/android/BUILD.gn
@@ -203,12 +203,6 @@
   ldflags = [ "-Wl,--pack-dyn-relocs=android" ]
 }
 
-# Pack relocations with Android-specific relocations and RELR relocations that
-# are only supported by the crazy linker and Android P+.
-config("lld_pack_relocations_with_relr") {
-  ldflags = [ "-Wl,--pack-dyn-relocs=android+relr,--use-android-relr-tags" ]
-}
-
 # Used for instrumented build to generate the orderfile.
 config("default_orderfile_instrumentation") {
   if (use_order_profiling) {
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni
index 41dd23c..1250e05f 100644
--- a/build/config/android/internal_rules.gni
+++ b/build/config/android/internal_rules.gni
@@ -320,11 +320,6 @@
       args += [ "--apk-proto-resources=$_rebased_proto_resources" ]
     }
 
-    if (defined(invoker.module_rtxt_path)) {
-      _rebased_rtxt_path = rebase_path(invoker.module_rtxt_path, root_build_dir)
-      args += [ "--module-rtxt-path=$_rebased_rtxt_path" ]
-    }
-
     if (defined(invoker.shared_libraries_runtime_deps_file)) {
       # Don't list shared_libraries_runtime_deps_file as an input in order to
       # avoid having to depend on the runtime_deps target. See comment in
@@ -1981,15 +1976,14 @@
       outputs = []
 
       _android_aapt_path = android_default_aapt_path
-      _android_aapt2_path = android_sdk_tools_bundle_aapt2
       if (_proto_format) {
+        _android_aapt2_path = android_sdk_tools_bundle_aapt2
         depfile = "$target_gen_dir/${invoker.target_name}_3.d"
       }
 
       inputs = [
         invoker.build_config,
         _android_aapt_path,
-        _android_aapt2_path,
       ]
 
       _rebased_build_config = rebase_path(invoker.build_config, root_build_dir)
@@ -2000,13 +1994,19 @@
         "--include-resources=@FileArg($_rebased_build_config:android:sdk_jars)",
         "--aapt-path",
         rebase_path(_android_aapt_path, root_build_dir),
-        "--aapt2-path",
-        rebase_path(_android_aapt2_path, root_build_dir),
         "--dependencies-res-zips=@FileArg($_rebased_build_config:resources:dependency_zips)",
         "--extra-res-packages=@FileArg($_rebased_build_config:resources:extra_package_names)",
         "--extra-r-text-files=@FileArg($_rebased_build_config:resources:extra_r_text_files)",
       ]
 
+      if (_proto_format) {
+        inputs += [ _android_aapt2_path ]
+        args += [
+          "--aapt2-path",
+          rebase_path(_android_aapt2_path, root_build_dir),
+        ]
+      }
+
       inputs += [ invoker.android_manifest ]
       args += [
         "--android-manifest",
@@ -2043,25 +2043,6 @@
         ]
       }
 
-      if (defined(invoker.optimize_resources) && invoker.optimize_resources) {
-        args += [ "--optimize-resources" ]
-        if (defined(invoker.resources_config_path)) {
-          inputs += [ invoker.resources_config_path ]
-          args += [
-            "--resources-config-path",
-            rebase_path(invoker.resources_config_path, root_build_dir),
-          ]
-        }
-
-        if (defined(invoker.unoptimized_resources_path)) {
-          args += [
-            "--unoptimized-resources-path",
-            rebase_path(invoker.unoptimized_resources_path, root_build_dir),
-          ]
-          outputs += [ invoker.unoptimized_resources_path ]
-        }
-      }
-
       # Useful to have android:debuggable in the manifest even for Release
       # builds. Just omit it for officai
       if (debuggable_apks) {
@@ -2511,13 +2492,6 @@
           get_label_info(_incremental_compile_resources_target_name,
                          "target_gen_dir") + "/AndroidManifest.xml"
 
-      if (defined(invoker.unoptimized_resources_path)) {
-        _incremental_packaged_resources_path =
-            invoker.unoptimized_resources_path
-      } else {
-        _incremental_packaged_resources_path = invoker.packaged_resources_path
-      }
-
       _rebased_build_config =
           rebase_path(invoker.assets_build_config, root_build_dir)
 
@@ -2528,7 +2502,7 @@
         inputs = [
           _android_manifest,
           invoker.assets_build_config,
-          _incremental_packaged_resources_path,
+          invoker.packaged_resources_path,
         ]
         outputs = [
           # Output the non-compiled manifest for easy debugging (as opposed to
@@ -2543,7 +2517,7 @@
           "--out-manifest",
           rebase_path(_incremental_android_manifest, root_build_dir),
           "--in-apk",
-          rebase_path(_incremental_packaged_resources_path, root_build_dir),
+          rebase_path(invoker.packaged_resources_path, root_build_dir),
           "--out-apk",
           rebase_path(_incremental_compiled_resources_path, root_build_dir),
           "--aapt-path",
@@ -3155,11 +3129,7 @@
                                ])
       }
       if (type == "android_app_bundle_module") {
-        forward_variables_from(invoker,
-                               [
-                                 "proto_resources_path",
-                                 "module_rtxt_path",
-                               ])
+        forward_variables_from(invoker, [ "proto_resources_path" ])
       }
       build_config = _build_config
       is_prebuilt = _is_prebuilt
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
index a390a56..d7e92f0a 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -1884,10 +1884,6 @@
   #   uncompress_shared_libraries: True if shared libraries should be stored
   #     uncompressed in the APK. Must be unset or true if load_library_from_apk
   #     is set to true.
-  #   optimize_resources: True if resource names should be stripped from the
-  #     resources.arsc file in the apk or module.
-  #   resources_config_path: Path to the aapt2 optimize config file that tags
-  #     resources with acceptable/non-acceptable optimizations.
   template("android_apk_or_module") {
     forward_variables_from(invoker, [ "testonly" ])
 
@@ -1917,11 +1913,10 @@
 
     if (defined(invoker.final_apk_path)) {
       _final_apk_path = invoker.final_apk_path
-    } else {
+    } else if (!_is_bundle_module) {
       _final_apk_path = "$root_build_dir/apks/${invoker.name}.apk"
-    }
-    if (!_is_bundle_module) {
-      _final_rtxt_path = "${_final_apk_path}.R.txt"
+    } else {
+      _final_apk_path = "$root_build_dir/bundle_modules/${invoker.name}"
     }
     _final_apk_path_no_ext_list =
         process_file_template([ _final_apk_path ],
@@ -2128,16 +2123,7 @@
       _android_sdk_dep = "//third_party/android_tools:android_sdk_java"
     }
 
-    _optimize_resources =
-        defined(invoker.optimize_resources) && invoker.optimize_resources
-    if (_optimize_resources) {
-      _unoptimized_resources_path =
-          "$target_out_dir/$_template_name.unoptimized.ap_"
-    }
-
     _compile_resources_target = "${_template_name}__compile_resources"
-    _compile_resources_rtxt_out =
-        "${target_gen_dir}/${_compile_resources_target}_R.txt"
     compile_resources(_compile_resources_target) {
       forward_variables_from(invoker,
                              [
@@ -2147,7 +2133,6 @@
                                "aapt_locale_whitelist",
                                "resource_blacklist_regex",
                                "resource_blacklist_exceptions",
-                               "resources_config_path",
                                "png_to_webp",
                                "no_xml_namespaces",
                              ])
@@ -2159,16 +2144,12 @@
         post_process_script = invoker.post_process_package_resources_script
       }
       srcjar_path = "${target_gen_dir}/${target_name}.srcjar"
-      r_text_out_path = _compile_resources_rtxt_out
+      r_text_out_path = "${target_gen_dir}/${target_name}_R.txt"
       proguard_file = _generated_proguard_config
       if (_enable_multidex) {
         proguard_file_main_dex = _generated_proguard_main_dex_config
       }
       output = _packaged_resources_path
-      if (_optimize_resources) {
-        optimize_resources = true
-        unoptimized_resources_path = _unoptimized_resources_path
-      }
 
       build_config = _build_config
       deps = _deps + [
@@ -2201,28 +2182,6 @@
       }
     }
 
-    if (!_is_bundle_module) {
-      # Output the R.txt file to a more easily discoverable location for
-      # archiving. This is necessary when stripping resource names so that we
-      # have an archive of resource names to ids for shipped apks (for
-      # debugging purposes). We copy the file rather than change the location
-      # of the original because other targets rely on the location of the R.txt
-      # file.
-      _copy_rtxt_target = "${_template_name}__copy_rtxt"
-      copy(_copy_rtxt_target) {
-        deps = [
-          ":$_compile_resources_target",
-        ]
-        sources = [
-          _compile_resources_rtxt_out,
-        ]
-        outputs = [
-          _final_rtxt_path,
-        ]
-      }
-      _final_deps += [ ":$_copy_rtxt_target" ]
-    }
-
     if (_is_base_module && _is_bundle_module) {
       # Bundle modules have to reference resources from the base module.
       # However, to compile the bundle module's resources we have to give it an
@@ -2406,7 +2365,6 @@
 
       if (_is_bundle_module) {
         proto_resources_path = _packaged_resources_path
-        module_rtxt_path = _compile_resources_rtxt_out
       }
 
       if (!_is_bundle_module) {
@@ -2604,9 +2562,6 @@
         if (_incremental_allowed) {
           android_manifest = _android_manifest
           base_path = _base_path
-          if (_optimize_resources) {
-            unoptimized_resources_path = _unoptimized_resources_path
-          }
         }
 
         # Incremental apk does not use native libs nor final dex.
@@ -2880,7 +2835,6 @@
                                "never_incremental",
                                "no_build_hooks",
                                "no_xml_namespaces",
-                               "optimize_resources",
                                "png_to_webp",
                                "post_process_package_resources_script",
                                "product_version_resources_dep",
@@ -2889,7 +2843,6 @@
                                "proguard_jar_path",
                                "resource_blacklist_regex",
                                "resource_blacklist_exceptions",
-                               "resources_config_path",
                                "secondary_abi_loadable_modules",
                                "secondary_abi_shared_libraries",
                                "secondary_native_lib_placeholders",
@@ -2979,7 +2932,6 @@
                                "native_lib_version_rule",
                                "negative_main_dex_globs",
                                "no_xml_namespaces",
-                               "optimize_resources",
                                "png_to_webp",
                                "product_version_resources_dep",
                                "proguard_configs",
@@ -2987,7 +2939,6 @@
                                "proguard_jar_path",
                                "resource_blacklist_regex",
                                "resource_blacklist_exceptions",
-                               "resources_config_path",
                                "secondary_abi_loadable_modules",
                                "secondary_abi_shared_libraries",
                                "secondary_native_lib_placeholders",
@@ -3905,7 +3856,6 @@
       _all_create_module_targets += [
         ":$_create_module_target",
         _module_build_config_target,
-        "${_module_target}__compile_resources",
       ]
       _all_module_zip_paths += [ _module_zip_path ]
       _all_module_build_configs += [ _module_build_config ]
@@ -3964,7 +3914,6 @@
       deps = _all_create_module_targets + [ ":$_build_config_target" ]
       args = [
         "--out-bundle=$_rebased_bundle_path",
-        "--rtxt-out-path=$_rebased_bundle_path.R.txt",
         "--module-zips=$_all_rebased_module_zip_paths",
       ]
       if (_sign_bundle) {
@@ -3987,8 +3936,6 @@
               "$_rebased_build_config:uncompressed_assets)",
           "--uncompress-shared-libraries=@FileArg(" +
               "$_rebased_build_config:native:uncompress_shared_libraries)",
-          "--rtxt-in-paths=@FileArg(" +
-              "$_rebased_build_config:deps_info:module_rtxt_path)",
         ]
       }
     }
diff --git a/cc/layers/heads_up_display_layer_impl.cc b/cc/layers/heads_up_display_layer_impl.cc
index 7dcb64d..2885493 100644
--- a/cc/layers/heads_up_display_layer_impl.cc
+++ b/cc/layers/heads_up_display_layer_impl.cc
@@ -359,7 +359,8 @@
 
   // Exports the backing to the ResourceProvider, giving it a ResourceId that
   // can be used in a DrawQuad.
-  pool_->PrepareForExport(pool_resource);
+  bool exported = pool_->PrepareForExport(pool_resource);
+  DCHECK(exported);
   viz::ResourceId resource_id = pool_resource.resource_id_for_export();
 
   // Save the resource to prevent reuse until it is exported to the display
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index d2dbd42..f976fa6 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -53,6 +53,7 @@
       sorting_context_id(0),
       use_parent_backface_visibility(false),
       background_color(0),
+      backdrop_filter_quality(1.0f),
       scrollable(false),
       is_scrollbar(false),
       user_scrollable_horizontal(true),
@@ -554,6 +555,10 @@
   SetNeedsCommit();
 }
 
+void Layer::SetBackdropFilterQuality(const float quality) {
+  inputs_.backdrop_filter_quality = quality;
+}
+
 void Layer::SetFiltersOrigin(const gfx::PointF& filters_origin) {
   DCHECK(IsPropertyChangeAllowed());
   if (inputs_.filters_origin == filters_origin)
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index 8a4094ca..b90f455 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -283,6 +283,11 @@
     return inputs_.backdrop_filters;
   }
 
+  void SetBackdropFilterQuality(const float quality);
+  float backdrop_filter_quality() const {
+    return inputs_.backdrop_filter_quality;
+  }
+
   // Set or get an optimization hint that the contents of this layer are fully
   // opaque or not. If true, every pixel of content inside the layer's bounds
   // must be opaque or visual errors can occur. This applies only to this layer
@@ -897,6 +902,7 @@
     FilterOperations filters;
     FilterOperations backdrop_filters;
     gfx::PointF filters_origin;
+    float backdrop_filter_quality;
 
     gfx::ScrollOffset scroll_offset;
 
diff --git a/cc/layers/layer_impl_test_properties.h b/cc/layers/layer_impl_test_properties.h
index 31cebf4..c931d45 100644
--- a/cc/layers/layer_impl_test_properties.h
+++ b/cc/layers/layer_impl_test_properties.h
@@ -48,6 +48,7 @@
   float opacity;
   FilterOperations filters;
   FilterOperations backdrop_filters;
+  float backdrop_filter_quality;
   gfx::PointF filters_origin;
   SkBlendMode blend_mode;
   LayerPositionConstraint position_constraint;
diff --git a/cc/layers/render_surface_impl.cc b/cc/layers/render_surface_impl.cc
index 4e90999..d4a0e72f 100644
--- a/cc/layers/render_surface_impl.cc
+++ b/cc/layers/render_surface_impl.cc
@@ -464,7 +464,8 @@
   quad->SetNew(shared_quad_state, content_rect(), unoccluded_content_rect, id(),
                mask_resource_id, mask_uv_rect, mask_texture_size,
                surface_contents_scale, FiltersOrigin(), tex_coord_rect,
-               !layer_tree_impl_->settings().enable_edge_anti_aliasing);
+               !layer_tree_impl_->settings().enable_edge_anti_aliasing,
+               OwningEffectNode()->backdrop_filter_quality);
 }
 
 void RenderSurfaceImpl::TileMaskLayer(
@@ -576,6 +577,7 @@
         quad_space_to_surface_space_transform, gfx::RectF(quad_rect));
     tex_coord_rect.Offset(-content_rect().OffsetFromOrigin());
 
+    constexpr float backdrop_filter_quality = 1.0;
     switch (temp_quad->material) {
       case viz::DrawQuad::TILED_CONTENT: {
         DCHECK_EQ(1U, temp_quad->resources.count);
@@ -623,7 +625,8 @@
                      temp_quad->resources.ids[0], mask_uv_rect,
                      mask_texture_size, owning_layer_to_surface_contents_scale,
                      FiltersOrigin(), tex_coord_rect,
-                     !layer_tree_impl_->settings().enable_edge_anti_aliasing);
+                     !layer_tree_impl_->settings().enable_edge_anti_aliasing,
+                     backdrop_filter_quality);
       } break;
       case viz::DrawQuad::SOLID_COLOR: {
         SkColor temp_color =
@@ -642,7 +645,8 @@
                      gfx::RectF(), gfx::Size(),
                      owning_layer_to_surface_contents_scale, FiltersOrigin(),
                      tex_coord_rect,
-                     !layer_tree_impl_->settings().enable_edge_anti_aliasing);
+                     !layer_tree_impl_->settings().enable_edge_anti_aliasing,
+                     backdrop_filter_quality);
       } break;
       case viz::DrawQuad::DEBUG_BORDER:
         NOTIMPLEMENTED();
diff --git a/cc/raster/zero_copy_raster_buffer_provider.cc b/cc/raster/zero_copy_raster_buffer_provider.cc
index 7007959..bde805a 100644
--- a/cc/raster/zero_copy_raster_buffer_provider.cc
+++ b/cc/raster/zero_copy_raster_buffer_provider.cc
@@ -81,6 +81,14 @@
         gpu_memory_buffer_(std::move(backing_->gpu_memory_buffer)) {}
 
   ~ZeroCopyRasterBufferImpl() override {
+    // If GpuMemoryBuffer allocation failed (https://crbug.com/554541), then
+    // we don't have anything to give to the display compositor, so we report a
+    // zero mailbox that will result in checkerboarding.
+    if (!gpu_memory_buffer_) {
+      DCHECK(backing_->mailbox.IsZero());
+      return;
+    }
+
     // This is destroyed on the compositor thread when raster is complete, but
     // before the backing is prepared for export to the display compositor. So
     // we can set up the texture and SyncToken here.
@@ -125,19 +133,10 @@
     }
 
     if (!backing_->image_id) {
-      // If GpuMemoryBuffer allocation failed (https://crbug.com/554541), then
-      // we don't have anything to give to the display compositor, but also no
-      // way to report an error, so we just make a texture but don't bind
-      // anything to it. Many blink layout tests on macOS fail to have no
-      // |gpu_memory_buffer_| here, so any error reporting will spam console
-      // logs (https://crbug.com/871031).
-      if (gpu_memory_buffer_) {
-        backing_->image_id = gl->CreateImageCHROMIUM(
-            gpu_memory_buffer_->AsClientBuffer(), resource_size_.width(),
-            resource_size_.height(), viz::GLInternalFormat(resource_format_));
-        gl->BindTexImage2DCHROMIUM(backing_->texture_target,
-                                   backing_->image_id);
-      }
+      backing_->image_id = gl->CreateImageCHROMIUM(
+          gpu_memory_buffer_->AsClientBuffer(), resource_size_.width(),
+          resource_size_.height(), viz::GLInternalFormat(resource_format_));
+      gl->BindTexImage2DCHROMIUM(backing_->texture_target, backing_->image_id);
     } else {
       gl->ReleaseTexImage2DCHROMIUM(backing_->texture_target,
                                     backing_->image_id);
diff --git a/cc/resources/resource_pool.cc b/cc/resources/resource_pool.cc
index 8b13ac2..1dfbe0a 100644
--- a/cc/resources/resource_pool.cc
+++ b/cc/resources/resource_pool.cc
@@ -302,34 +302,40 @@
   busy_resources_.erase(busy_it);
 }
 
-void ResourcePool::PrepareForExport(const InUsePoolResource& resource) {
+bool ResourcePool::PrepareForExport(const InUsePoolResource& in_use_resource) {
+  PoolResource* resource = in_use_resource.resource_;
   // Exactly one of gpu or software backing should exist.
-  DCHECK(resource.resource_->gpu_backing() ||
-         resource.resource_->software_backing());
-  DCHECK(!resource.resource_->gpu_backing() ||
-         !resource.resource_->software_backing());
+  DCHECK(resource->gpu_backing() || resource->software_backing());
+  DCHECK(!resource->gpu_backing() || !resource->software_backing());
   viz::TransferableResource transferable;
-  if (resource.resource_->gpu_backing()) {
+  if (resource->gpu_backing()) {
+    GpuBacking* gpu_backing = resource->gpu_backing();
+    if (gpu_backing->mailbox.IsZero()) {
+      // This can happen if we failed to allocate a GpuMemoryBuffer. Avoid
+      // sending an invalid resource to the parent in that case, and avoid
+      // caching/reusing the resource.
+      resource->set_resource_id(0);
+      resource->mark_avoid_reuse();
+      return false;
+    }
     transferable = viz::TransferableResource::MakeGLOverlay(
-        resource.resource_->gpu_backing()->mailbox, GL_LINEAR,
-        resource.resource_->gpu_backing()->texture_target,
-        resource.resource_->gpu_backing()->mailbox_sync_token,
-        resource.resource_->size(),
-        resource.resource_->gpu_backing()->overlay_candidate);
-    transferable.read_lock_fences_enabled =
-        resource.resource_->gpu_backing()->wait_on_fence_required;
+        gpu_backing->mailbox, GL_LINEAR, gpu_backing->texture_target,
+        gpu_backing->mailbox_sync_token, resource->size(),
+        gpu_backing->overlay_candidate);
+    transferable.read_lock_fences_enabled = gpu_backing->wait_on_fence_required;
   } else {
     transferable = viz::TransferableResource::MakeSoftware(
-        resource.resource_->software_backing()->shared_bitmap_id,
-        resource.resource_->size(), resource.resource_->format());
+        resource->software_backing()->shared_bitmap_id, resource->size(),
+        resource->format());
   }
-  transferable.format = resource.resource_->format();
-  transferable.color_space = resource.resource_->color_space();
-  resource.resource_->set_resource_id(resource_provider_->ImportResource(
+  transferable.format = resource->format();
+  transferable.color_space = resource->color_space();
+  resource->set_resource_id(resource_provider_->ImportResource(
       std::move(transferable),
       viz::SingleReleaseCallback::Create(base::BindOnce(
           &ResourcePool::OnResourceReleased, weak_ptr_factory_.GetWeakPtr(),
-          resource.resource_->unique_id()))));
+          resource->unique_id()))));
+  return true;
 }
 
 void ResourcePool::InvalidateResources() {
diff --git a/cc/resources/resource_pool.h b/cc/resources/resource_pool.h
index 6e2cae3b..31708ce6 100644
--- a/cc/resources/resource_pool.h
+++ b/cc/resources/resource_pool.h
@@ -220,7 +220,10 @@
   // acquired InUsePoolResource will be only metadata, and the backing is given
   // to it by code which is aware of the expected backing type - currently by
   // RasterBufferProvider::AcquireBufferForRaster().
-  void PrepareForExport(const InUsePoolResource& resource);
+  // Returns false if the backing does not contain valid data, in particular
+  // a zero mailbox for GpuBacking, in which case the resource is not exported,
+  // and true otherwise.
+  bool PrepareForExport(const InUsePoolResource& resource);
 
   // Marks any resources in the pool as invalid, preventing their reuse. Call if
   // previous resources were allocated in one way, but future resources should
diff --git a/cc/resources/resource_pool_unittest.cc b/cc/resources/resource_pool_unittest.cc
index ef0ba34c..36d1e9b 100644
--- a/cc/resources/resource_pool_unittest.cc
+++ b/cc/resources/resource_pool_unittest.cc
@@ -46,6 +46,7 @@
 
   void SetBackingOnResource(const ResourcePool::InUsePoolResource& resource) {
     auto backing = std::make_unique<StubGpuBacking>();
+    backing->mailbox = gpu::Mailbox::Generate();
     backing->mailbox_sync_token.Set(
         gpu::GPU_IO, gpu::CommandBufferId::FromUnsafeValue(1), 1);
     resource.set_gpu_backing(std::move(backing));
@@ -165,7 +166,7 @@
       resource_pool_->AcquireResource(size, format, color_space);
 
   SetBackingOnResource(resource);
-  resource_pool_->PrepareForExport(resource);
+  EXPECT_TRUE(resource_pool_->PrepareForExport(resource));
 
   std::vector<viz::ResourceId> export_ids = {resource.resource_id_for_export()};
   std::vector<viz::TransferableResource> transferable_resources;
@@ -204,7 +205,7 @@
   EXPECT_EQ(1u, resource_pool_->resource_count());
 
   SetBackingOnResource(resource);
-  resource_pool_->PrepareForExport(resource);
+  EXPECT_TRUE(resource_pool_->PrepareForExport(resource));
 
   std::vector<viz::TransferableResource> transfers;
   resource_provider_->PrepareSendToParent({resource.resource_id_for_export()},
@@ -254,7 +255,7 @@
 
   // Export the resource to the display compositor.
   SetBackingOnResource(resource);
-  resource_pool_->PrepareForExport(resource);
+  EXPECT_TRUE(resource_pool_->PrepareForExport(resource));
   std::vector<viz::TransferableResource> transfers;
   resource_provider_->PrepareSendToParent({resource.resource_id_for_export()},
                                           &transfers, context_provider_.get());
@@ -463,7 +464,7 @@
   ResourcePool::InUsePoolResource resource =
       resource_pool_->AcquireResource(size, format, color_space);
   SetBackingOnResource(resource);
-  resource_pool_->PrepareForExport(resource);
+  EXPECT_TRUE(resource_pool_->PrepareForExport(resource));
 
   EXPECT_EQ(1u, resource_pool_->GetTotalResourceCountForTesting());
   EXPECT_EQ(0u, resource_pool_->GetBusyResourceCountForTesting());
@@ -516,7 +517,7 @@
   ResourcePool::InUsePoolResource busy_resource =
       resource_pool_->AcquireResource(size, format, color_space);
   SetBackingOnResource(busy_resource);
-  resource_pool_->PrepareForExport(busy_resource);
+  EXPECT_TRUE(resource_pool_->PrepareForExport(busy_resource));
   EXPECT_EQ(1u, resource_pool_->GetTotalResourceCountForTesting());
   EXPECT_EQ(0u, resource_pool_->GetBusyResourceCountForTesting());
   EXPECT_EQ(1u, resource_pool_->resource_count());
@@ -635,7 +636,7 @@
   resource.gpu_backing()->wait_on_fence_required = true;
   resource.gpu_backing()->overlay_candidate = true;
 
-  resource_pool_->PrepareForExport(resource);
+  EXPECT_TRUE(resource_pool_->PrepareForExport(resource));
 
   std::vector<viz::TransferableResource> transfer;
   resource_provider_->PrepareSendToParent({resource.resource_id_for_export()},
@@ -657,4 +658,37 @@
   resource_pool_->ReleaseResource(std::move(resource));
 }
 
+TEST_F(ResourcePoolTest, InvalidResource) {
+  // Limits high enough to not be hit by this test.
+  size_t bytes_limit = 10 * 1024 * 1024;
+  size_t count_limit = 100;
+  resource_pool_->SetResourceUsageLimits(bytes_limit, count_limit);
+
+  // These values are all non-default values so we can tell they are propagated.
+  gfx::Size size(100, 101);
+  viz::ResourceFormat format = viz::RGBA_4444;
+  EXPECT_NE(gfx::BufferFormat::RGBA_8888, viz::BufferFormat(format));
+  gfx::ColorSpace color_space = gfx::ColorSpace::CreateSRGB();
+  uint32_t target = 5;
+
+  ResourcePool::InUsePoolResource resource =
+      resource_pool_->AcquireResource(size, format, color_space);
+
+  // Keep a zero mailbox
+  auto backing = std::make_unique<StubGpuBacking>();
+  backing->texture_target = target;
+  backing->wait_on_fence_required = true;
+  backing->overlay_candidate = true;
+  resource.set_gpu_backing(std::move(backing));
+
+  EXPECT_FALSE(resource_pool_->PrepareForExport(resource));
+
+  resource_pool_->ReleaseResource(std::move(resource));
+
+  // Acquire another resource. The resource should not be reused.
+  resource = resource_pool_->AcquireResource(size, format, color_space);
+  EXPECT_FALSE(resource.gpu_backing());
+  resource_pool_->ReleaseResource(std::move(resource));
+}
+
 }  // namespace cc
diff --git a/cc/test/render_pass_test_utils.cc b/cc/test/render_pass_test_utils.cc
index e1f83fa..17a2047 100644
--- a/cc/test/render_pass_test_utils.cc
+++ b/cc/test/render_pass_test_utils.cc
@@ -114,7 +114,7 @@
   auto* quad = to_pass->CreateAndAppendDrawQuad<viz::RenderPassDrawQuad>();
   quad->SetNew(shared_state, output_rect, output_rect, contributing_pass->id, 0,
                gfx::RectF(), gfx::Size(), gfx::Vector2dF(), gfx::PointF(),
-               gfx::RectF(), false);
+               gfx::RectF(), false, 1.0f);
 }
 
 void AddRenderPassQuad(viz::RenderPass* to_pass,
@@ -132,7 +132,7 @@
   quad->SetNew(shared_state, output_rect, output_rect, contributing_pass->id,
                mask_resource_id, gfx::RectF(output_rect),
                arbitrary_nonzero_size, gfx::Vector2dF(), gfx::PointF(),
-               gfx::RectF(), false);
+               gfx::RectF(), false, 1.0f);
 }
 
 std::vector<viz::ResourceId> AddOneOfEveryQuadType(
@@ -184,7 +184,7 @@
     render_pass_quad->SetNew(shared_state, rect, visible_rect, child_pass_id,
                              resource5, gfx::RectF(rect), gfx::Size(73, 26),
                              gfx::Vector2dF(), gfx::PointF(), gfx::RectF(),
-                             false);
+                             false, 1.0f);
   }
 
   auto* solid_color_quad =
@@ -360,7 +360,7 @@
     render_pass_quad->SetNew(shared_state, rect, visible_rect, child_pass_id,
                              mapped_resource5, gfx::RectF(rect),
                              gfx::Size(73, 26), gfx::Vector2dF(), gfx::PointF(),
-                             gfx::RectF(), false);
+                             gfx::RectF(), false, 1.0f);
   }
 
   viz::SolidColorDrawQuad* solid_color_quad =
diff --git a/cc/tiles/tile_manager.cc b/cc/tiles/tile_manager.cc
index e9b1a799..b1ffd0b 100644
--- a/cc/tiles/tile_manager.cc
+++ b/cc/tiles/tile_manager.cc
@@ -1301,7 +1301,7 @@
 
   // Once raster is done, allow the resource to be exported to the display
   // compositor, by giving it a ResourceId.
-  resource_pool_->PrepareForExport(resource);
+  bool exported = resource_pool_->PrepareForExport(resource);
 
   // In SMOOTHNESS_TAKES_PRIORITY mode, we wait for GPU work to complete for a
   // tile before setting it as ready to draw.
@@ -1312,11 +1312,16 @@
   }
 
   TileDrawInfo& draw_info = tile->draw_info();
-  bool needs_swizzle = raster_buffer_provider_->IsResourceSwizzleRequired();
-  bool is_premultiplied = raster_buffer_provider_->IsResourcePremultiplied();
-  draw_info.SetResource(std::move(resource),
-                        raster_task_was_scheduled_with_checker_images,
-                        needs_swizzle, is_premultiplied);
+  if (exported) {
+    bool needs_swizzle = raster_buffer_provider_->IsResourceSwizzleRequired();
+    bool is_premultiplied = raster_buffer_provider_->IsResourcePremultiplied();
+    draw_info.SetResource(std::move(resource),
+                          raster_task_was_scheduled_with_checker_images,
+                          needs_swizzle, is_premultiplied);
+  } else {
+    resource_pool_->ReleaseResource(std::move(resource));
+    draw_info.set_oom();
+  }
   if (raster_task_was_scheduled_with_checker_images)
     num_of_tiles_with_checker_images_++;
 
diff --git a/cc/tiles/tile_manager.h b/cc/tiles/tile_manager.h
index e475cdf..35efee34 100644
--- a/cc/tiles/tile_manager.h
+++ b/cc/tiles/tile_manager.h
@@ -201,10 +201,12 @@
       // The raster here never really happened, cuz tests. So just add an
       // arbitrary sync token.
       if (resource.gpu_backing()) {
+        resource.gpu_backing()->mailbox = gpu::Mailbox::Generate();
         resource.gpu_backing()->mailbox_sync_token.Set(
             gpu::GPU_IO, gpu::CommandBufferId::FromUnsafeValue(1), 1);
       }
-      resource_pool_->PrepareForExport(resource);
+      bool exported = resource_pool_->PrepareForExport(resource);
+      DCHECK(exported);
       draw_info.SetResource(std::move(resource), false, false, false);
       draw_info.set_resource_ready_for_draw();
     }
diff --git a/cc/tiles/tile_manager_unittest.cc b/cc/tiles/tile_manager_unittest.cc
index 6c7fe877..52c0a974 100644
--- a/cc/tiles/tile_manager_unittest.cc
+++ b/cc/tiles/tile_manager_unittest.cc
@@ -2169,6 +2169,91 @@
   RunPartialRasterCheck(TakeHostImpl(), false /* partial_raster_enabled */);
 }
 
+class InvalidResourceRasterBufferProvider
+    : public FakeRasterBufferProviderImpl {
+ public:
+  std::unique_ptr<RasterBuffer> AcquireBufferForRaster(
+      const ResourcePool::InUsePoolResource& resource,
+      uint64_t resource_content_id,
+      uint64_t previous_content_id) override {
+    if (!resource.gpu_backing()) {
+      auto backing = std::make_unique<StubGpuBacking>();
+      // Don't set a mailbox to signal invalid resource.
+      backing->texture_target = 5;
+      resource.set_gpu_backing(std::move(backing));
+    }
+    return std::make_unique<FakeRasterBuffer>();
+  }
+
+ private:
+  class StubGpuBacking : public ResourcePool::GpuBacking {
+   public:
+    void OnMemoryDump(
+        base::trace_event::ProcessMemoryDump* pmd,
+        const base::trace_event::MemoryAllocatorDumpGuid& buffer_dump_guid,
+        uint64_t tracing_process_id,
+        int importance) const override {}
+  };
+
+  class FakeRasterBuffer : public RasterBuffer {
+   public:
+    void Playback(const RasterSource* raster_source,
+                  const gfx::Rect& raster_full_rect,
+                  const gfx::Rect& raster_dirty_rect,
+                  uint64_t new_content_id,
+                  const gfx::AxisTransform2d& transform,
+                  const RasterSource::PlaybackSettings& playback_settings,
+                  const GURL& url) override {}
+  };
+};
+
+class InvalidResourceTileManagerTest : public TileManagerTest {
+ protected:
+  std::unique_ptr<LayerTreeFrameSink> CreateLayerTreeFrameSink() override {
+    return FakeLayerTreeFrameSink::Create3d();
+  }
+};
+
+TEST_F(InvalidResourceTileManagerTest, InvalidResource) {
+  auto* tile_manager = host_impl()->tile_manager();
+  InvalidResourceRasterBufferProvider raster_buffer_provider;
+  tile_manager->SetRasterBufferProviderForTesting(&raster_buffer_provider);
+
+  gfx::Size size(10, 12);
+  FakePictureLayerTilingClient tiling_client;
+  tiling_client.SetTileSize(size);
+
+  std::unique_ptr<PictureLayerImpl> layer = PictureLayerImpl::Create(
+      host_impl()->active_tree(), 1, Layer::LayerMaskType::NOT_MASK);
+  layer->set_contributes_to_drawn_render_surface(true);
+
+  auto* tiling = layer->picture_layer_tiling_set()->AddTiling(
+      gfx::AxisTransform2d(), FakeRasterSource::CreateFilled(size));
+  tiling->set_resolution(HIGH_RESOLUTION);
+  tiling->CreateAllTilesForTesting();
+  tiling->SetTilePriorityRectsForTesting(gfx::Rect(size),   // Visible rect.
+                                         gfx::Rect(size),   // Skewport rect.
+                                         gfx::Rect(size),   // Soon rect.
+                                         gfx::Rect(size));  // Eventually rect.
+
+  base::RunLoop run_loop;
+  EXPECT_CALL(MockHostImpl(), NotifyAllTileTasksCompleted())
+      .WillOnce(testing::Invoke([&run_loop]() { run_loop.Quit(); }));
+  tile_manager->PrepareTiles(host_impl()->global_tile_state());
+  run_loop.Run();
+  tile_manager->CheckForCompletedTasks();
+
+  Tile* tile = tiling->TileAt(0, 0);
+  ASSERT_TRUE(tile);
+  // The tile in the tiling was rastered, but didn't get a resource.
+  EXPECT_TRUE(tile->draw_info().IsReadyToDraw());
+  EXPECT_EQ(TileDrawInfo::OOM_MODE, tile->draw_info().mode());
+
+  // Ensure that the host impl doesn't outlive |raster_buffer_provider|.
+  layer = nullptr;
+  TakeHostImpl();
+}
+
 // FakeRasterBufferProviderImpl that allows us to mock ready to draw
 // functionality.
 class MockReadyToDrawRasterBufferProviderImpl
diff --git a/cc/trees/effect_node.h b/cc/trees/effect_node.h
index 61fb30a..0f8bf33 100644
--- a/cc/trees/effect_node.h
+++ b/cc/trees/effect_node.h
@@ -40,6 +40,7 @@
 
   FilterOperations filters;
   FilterOperations backdrop_filters;
+  float backdrop_filter_quality;
   gfx::PointF filters_origin;
 
   SkBlendMode blend_mode;
diff --git a/cc/trees/property_tree_builder.cc b/cc/trees/property_tree_builder.cc
index cf98d8e8..674b121 100644
--- a/cc/trees/property_tree_builder.cc
+++ b/cc/trees/property_tree_builder.cc
@@ -748,6 +748,14 @@
   return layer->test_properties()->backdrop_filters;
 }
 
+static inline float BackdropFilterQuality(Layer* layer) {
+  return layer->backdrop_filter_quality();
+}
+
+static inline float BackdropFilterQuality(LayerImpl* layer) {
+  return layer->test_properties()->backdrop_filter_quality;
+}
+
 static inline bool HideLayerAndSubtree(Layer* layer) {
   return layer->hide_layer_and_subtree();
 }
@@ -984,6 +992,7 @@
   node->has_copy_request = HasCopyRequest(layer);
   node->filters = Filters(layer);
   node->backdrop_filters = BackdropFilters(layer);
+  node->backdrop_filter_quality = BackdropFilterQuality(layer);
   node->filters_origin = FiltersOrigin(layer);
   node->trilinear_filtering = TrilinearFiltering(layer);
   node->has_potential_opacity_animation = has_potential_opacity_animation;
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
index 21d5115..0b561c8 100644
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -1010,7 +1010,7 @@
     }
 
     if (chromium_linker_supported && use_lld) {
-      configs += [ "//build/config/android:lld_pack_relocations_with_relr" ]
+      configs += [ "//build/config/android:lld_pack_relocations" ]
     }
     if (chromium_linker_supported && target_cpu != "mipsel" &&
         target_cpu != "mipsel64") {
@@ -1273,7 +1273,7 @@
     "//components/sync:test_support_fake_server_android",
   ]
   if (chromium_linker_supported && use_lld) {
-    configs += [ "//build/config/android:lld_pack_relocations_with_relr" ]
+    configs += [ "//build/config/android:lld_pack_relocations" ]
   }
   if (enable_vr) {
     sources += [ "../browser/android/vr/register_jni.cc" ]
diff --git a/chrome/android/chrome_public_apk_tmpl.gni b/chrome/android/chrome_public_apk_tmpl.gni
index 299c20c..1b99225 100644
--- a/chrome/android/chrome_public_apk_tmpl.gni
+++ b/chrome/android/chrome_public_apk_tmpl.gni
@@ -107,8 +107,6 @@
     # Use zh-TW strings for zh-HK (https://crbug.com/780847).
     support_zh_hk = true
 
-    optimize_resources = true
-
     if (defined(shared_libraries) && shared_libraries != []) {
       _native_lib_file =
           rebase_path("$root_gen_dir/CHROME_VERSION.json", root_out_dir)
@@ -229,9 +227,6 @@
     # Webview supports all locales (has no omitted ones).
     aapt_locale_whitelist = locales
 
-    # Resources config for blocklisting resource names from obfuscation
-    resources_config_path = "//android_webview/aapt2.config"
-
     if (!defined(invoker.target_type) || invoker.target_type == "android_apk") {
       # Incremental install doesn't work for monochrome. See crbug.com/663492.
       never_incremental = true
diff --git a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedNewTabPage.java b/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedNewTabPage.java
index 3e10924..2b1bd37 100644
--- a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedNewTabPage.java
+++ b/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedNewTabPage.java
@@ -418,6 +418,11 @@
     }
 
     @VisibleForTesting
+    public static boolean isDummy() {
+        return false;
+    }
+
+    @VisibleForTesting
     FeedNewTabPageMediator getMediatorForTesting() {
         return mMediator;
     }
diff --git a/chrome/android/feed/dummy/java/src/org/chromium/chrome/browser/feed/FeedNewTabPage.java b/chrome/android/feed/dummy/java/src/org/chromium/chrome/browser/feed/FeedNewTabPage.java
index f337291..e386ef0 100644
--- a/chrome/android/feed/dummy/java/src/org/chromium/chrome/browser/feed/FeedNewTabPage.java
+++ b/chrome/android/feed/dummy/java/src/org/chromium/chrome/browser/feed/FeedNewTabPage.java
@@ -4,6 +4,7 @@
 
 package org.chromium.chrome.browser.feed;
 
+import org.chromium.base.VisibleForTesting;
 import org.chromium.chrome.browser.ChromeActivity;
 import org.chromium.chrome.browser.native_page.NativePageHost;
 import org.chromium.chrome.browser.ntp.NewTabPage;
@@ -23,4 +24,9 @@
             TabModelSelector tabModelSelector) {
         super(activity, nativePageHost, tabModelSelector);
     }
+
+    @VisibleForTesting
+    public static boolean isDummy() {
+        return true;
+    }
 }
diff --git a/chrome/android/java/res/layout/contextual_suggestions_card_modern.xml b/chrome/android/java/res/layout/contextual_suggestions_card_modern.xml
index 7dec5a1c..47b69ad3 100644
--- a/chrome/android/java/res/layout/contextual_suggestions_card_modern.xml
+++ b/chrome/android/java/res/layout/contextual_suggestions_card_modern.xml
@@ -12,93 +12,92 @@
     android:layout_height="wrap_content"
     android:padding="@dimen/snippets_padding">
 
-        <LinearLayout
-            android:id="@+id/text_layout"
-            android:layout_alignParentStart="true"
-            android:layout_alignParentTop="true"
-            android:layout_toStartOf="@+id/article_thumbnail"
-            android:layout_alignWithParentIfMissing="true"
+    <LinearLayout
+        tools:ignore="UseCompoundDrawables"
+        android:id="@+id/publisher_bar"
+        android:layout_alignParentTop="true"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginBottom="@dimen/contextual_suggestions_publisher_margin"
+        android:orientation="horizontal">
+
+        <!-- The following attributes:
+             - publisher_bar's android:layout_width="wrap_content"
+             - article_publisher's android:layout_width="0dp"
+             - article_publisher's android:layout_weight="1"
+             - article_publisher's android:ellipsize="end"
+             - article_age's android:layout_width="wrap_content"
+             All ensure that when the publisher string is long, it starts to ellipsize
+             before pushing the article age string and the offline icon off the screen.
+             See: https://crbug.com/625775 and https://crbug.com/678568 -->
+        <TextView
+            android:id="@+id/article_publisher"
+            android:layout_width="0dp"
+            android:layout_weight="1"
             android:layout_height="wrap_content"
+            android:drawablePadding="8dp"
+            android:maxLines="1"
+            android:singleLine="true"
+            android:ellipsize="end"
+            android:textAppearance="@style/BlackCaption"
+            android:textDirection="locale"
+            tools:text="chromium.org"/>
+
+        <TextView
+            android:id="@+id/article_age"
             android:layout_width="wrap_content"
-            android:orientation="vertical">
+            android:layout_height="wrap_content"
+            android:maxLines="1"
+            android:textAppearance="@style/BlackCaption"
+            android:textDirection="locale"
+            tools:text=" - 3 hours ago" />
 
-            <org.chromium.ui.widget.TextViewWithLeading
-                style="@style/SuggestionCardTitleModern"
-                android:id="@+id/article_headline"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                tools:text="Article headline" />
-
-           <org.chromium.ui.widget.TextViewWithLeading
-                style="@style/SuggestionCardBodyModern"
-                android:id="@+id/article_snippet"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                tools:text="Article snippet" />
-        </LinearLayout>
-
+        <!-- We can't add this ImageView as a CompoundDrawable to the TextView because we want to
+              have different paddings between the favicon (which is a compound drawable on the
+              TextView) and the offline icon. -->
         <ImageView
-            android:id="@+id/article_thumbnail"
-            android:layout_marginStart="@dimen/snippets_padding"
-            android:layout_width="@dimen/snippets_thumbnail_size_small"
-            android:layout_height="@dimen/snippets_thumbnail_size_small"
-            android:layout_alignParentTop="true"
-            android:layout_alignParentEnd="true"
-            android:scaleType="centerCrop"
-            tools:ignore="ContentDescription"
-            android:src="@null" />
+            android:id="@+id/offline_icon"
+            android:layout_width="@dimen/snippets_offline_icon_size"
+            android:layout_height="@dimen/snippets_offline_icon_size"
+            android:layout_marginStart="6dp"
+            android:contentDescription="@string/accessibility_ntp_offline_badge"
+            android:visibility="gone"
+            android:src="@drawable/offline_pin_round" />
+    </LinearLayout>
 
-        <LinearLayout
-            tools:ignore="UseCompoundDrawables"
-            android:id="@+id/publisher_bar"
-            android:layout_alignParentBottom="true"
-            android:layout_below="@+id/text_layout"
-            android:layout_width="wrap_content"
+    <LinearLayout
+        android:id="@+id/text_layout"
+        android:layout_alignParentStart="true"
+        android:layout_below="@+id/publisher_bar"
+        android:layout_toStartOf="@+id/article_thumbnail"
+        android:layout_alignWithParentIfMissing="true"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:orientation="vertical">
+
+        <org.chromium.ui.widget.TextViewWithLeading
+            style="@style/ContextualSuggestionCardTitleModern"
+            android:id="@+id/article_headline"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginTop="@dimen/contextual_suggestions_publisher_margin_top"
-            android:orientation="horizontal">
+            tools:text="Article headline" />
 
-            <!-- The following attributes:
-                 - publisher_bar's android:layout_width="wrap_content"
-                 - article_publisher's android:layout_width="0dp"
-                 - article_publisher's android:layout_weight="1"
-                 - article_publisher's android:ellipsize="end"
-                 - article_age's android:layout_width="wrap_content"
-                 All ensure that when the publisher string is long, it starts to ellipsize
-                 before pushing the article age string and the offline icon off the screen.
-                 See: https://crbug.com/625775 and https://crbug.com/678568 -->
-            <TextView
-                android:id="@+id/article_publisher"
-                android:layout_width="0dp"
-                android:layout_weight="1"
-                android:layout_height="wrap_content"
-                android:drawablePadding="8dp"
-                android:maxLines="1"
-                android:singleLine="true"
-                android:ellipsize="end"
-                android:textAppearance="@style/BlackCaption"
-                android:textDirection="locale"
-                tools:text="chromium.org"/>
+       <org.chromium.ui.widget.TextViewWithLeading
+            style="@style/ContextualSuggestionCardBodyModern"
+            android:id="@+id/article_snippet"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            tools:text="Article snippet" />
+    </LinearLayout>
 
-            <TextView
-                android:id="@+id/article_age"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:maxLines="1"
-                android:textAppearance="@style/BlackCaption"
-                android:textDirection="locale"
-                tools:text=" - 3 hours ago" />
-
-           <!-- We can't add this ImageView as a CompoundDrawable to the TextView because we want to
-                 have different paddings between the favicon (which is a compound drawable on the
-                 TextView) and the offline icon. -->
-            <ImageView
-                android:id="@+id/offline_icon"
-                android:layout_width="@dimen/snippets_offline_icon_size"
-                android:layout_height="@dimen/snippets_offline_icon_size"
-                android:layout_marginStart="6dp"
-                android:contentDescription="@string/accessibility_ntp_offline_badge"
-                android:visibility="gone"
-                android:src="@drawable/offline_pin_round" />
-        </LinearLayout>
+    <ImageView
+        android:id="@+id/article_thumbnail"
+        android:layout_marginStart="@dimen/snippets_padding"
+        android:layout_width="@dimen/snippets_thumbnail_size_small"
+        android:layout_height="@dimen/snippets_thumbnail_size_small"
+        android:layout_below="@+id/publisher_bar"
+        android:layout_alignParentEnd="true"
+        android:scaleType="centerCrop"
+        tools:ignore="ContentDescription"
+        android:src="@null" />
 </RelativeLayout>
diff --git a/chrome/android/java/res/layout/contextual_suggestions_card_modern_alternate.xml b/chrome/android/java/res/layout/contextual_suggestions_card_modern_alternate.xml
index 22d1da9..4b71b0a 100644
--- a/chrome/android/java/res/layout/contextual_suggestions_card_modern_alternate.xml
+++ b/chrome/android/java/res/layout/contextual_suggestions_card_modern_alternate.xml
@@ -80,7 +80,7 @@
         android:orientation="vertical">
 
         <org.chromium.ui.widget.TextViewWithLeading
-            style="@style/SuggestionCardTitleModern"
+            style="@style/ContextualSuggestionCardTitleModern"
             app:leading="27dp"
             android:id="@+id/article_headline"
             android:layout_width="match_parent"
@@ -88,7 +88,7 @@
             tools:text="Article headline" />
 
        <org.chromium.ui.widget.TextViewWithLeading
-            style="@style/SuggestionCardBodyModern"
+            style="@style/ContextualSuggestionCardBodyModern"
             app:leading="23dp"
             android:id="@+id/article_snippet"
             android:layout_width="match_parent"
diff --git a/chrome/android/java/res/values-v17/styles.xml b/chrome/android/java/res/values-v17/styles.xml
index 2486261..df66cf9 100644
--- a/chrome/android/java/res/values-v17/styles.xml
+++ b/chrome/android/java/res/values-v17/styles.xml
@@ -715,15 +715,23 @@
         <item name="android:background">@drawable/content_card_modern_background</item>
         <item name="android:foreground">@drawable/button_borderless_compat</item>
     </style>
+    <!-- TODO(twellington): Use standard line height for SuggestionsCard*. Updating the leading
+     for these requires updating the NTP article suggestions thumbnail size as well. -->
     <style name="SuggestionCardTitleModern" parent="BlackTitle1">
         <item name="android:ellipsize">end</item>
         <item name="leading">20sp</item>
     </style>
+    <style name="ContextualSuggestionCardTitleModern" parent="SuggestionCardTitleModern">
+        <item name="leading">@dimen/text_size_large_leading</item>
+    </style>
     <style name="SuggestionCardBodyModern" parent="BlackBody">
         <item name="android:layout_marginTop">8dp</item>
         <item name="android:ellipsize">end</item>
         <item name="leading">16sp</item>
     </style>
+    <style name="ContextualSuggestionCardBodyModern" parent="SuggestionCardBodyModern">
+        <item name="leading">@dimen/text_size_medium_leading</item>
+    </style>
     <style name="SuggestionCardAction" parent="@style/TextButton">
         <item name="android:minHeight">48dp</item>
     </style>
diff --git a/chrome/android/java/res/values/dimens.xml b/chrome/android/java/res/values/dimens.xml
index f7a34a9..877f97e 100644
--- a/chrome/android/java/res/values/dimens.xml
+++ b/chrome/android/java/res/values/dimens.xml
@@ -493,8 +493,9 @@
     <dimen name="selectable_list_search_icon_end_padding">4dp</dimen>
     <dimen name="selectable_list_toolbar_shadow_height">4dp</dimen>
 
-    <!-- Chrome Home dimensions -->
-    <dimen name="chrome_home_min_full_half_distance">160dp</dimen>
+    <!-- Bottom Sheet dimensions -->
+    <dimen name="bottom_sheet_min_full_half_distance">140dp</dimen>
+    <dimen name="bottom_sheet_peek_height">56dp</dimen>
 
     <!-- TextBubble dimensions -->
     <dimen name="text_bubble_margin">4dp</dimen>
@@ -509,7 +510,6 @@
     <dimen name="clear_text_button_end_padding">10dp</dimen>
     <dimen name="sync_promo_view_padding">16dp</dimen>
     <dimen name="open_new_tab_animation_y_translation">-20dp</dimen>
-    <dimen name="bottom_sheet_peek_height">56dp</dimen>
 
     <!-- Context Menu Dimensions -->
     <dimen name="context_menu_header_image_width_padding">15dp</dimen>
@@ -525,7 +525,7 @@
     <dimen name="reader_mode_infobar_text_padding">8dp</dimen>
 
     <!-- Contextual Suggestions Dimensions -->
-    <dimen name="contextual_suggestions_publisher_margin_top">12dp</dimen>
+    <dimen name="contextual_suggestions_publisher_margin">12dp</dimen>
     <dimen name="contextual_suggestions_toolbar_icon_size">48dp</dimen>
 
     <!-- Defaults for TabbedModeFirstRunActivity values. -->
@@ -567,5 +567,5 @@
     <dimen name="explicit_ask_checkbox_end_padding">4dp</dimen>
 
     <!-- Autofill Assistant dimensions -->
-    <dimen name="autofill_assistant_details_image_size">60dp</dimen>
+    <dimen name="autofill_assistant_details_image_size">48dp</dimen>
 </resources>
diff --git a/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_chip_bg.xml b/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_button_filled_bg.xml
similarity index 67%
copy from chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_chip_bg.xml
copy to chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_button_filled_bg.xml
index 86aa4759..ab2f5df 100644
--- a/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_chip_bg.xml
+++ b/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_button_filled_bg.xml
@@ -5,7 +5,7 @@
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
   <item
       android:state_pressed="true"
-      android:drawable="@drawable/autofill_assistant_chip_bg_pressed" />
+      android:drawable="@drawable/autofill_assistant_button_filled_bg_pressed" />
   <item
-      android:drawable="@drawable/autofill_assistant_chip_bg_normal" />
+      android:drawable="@drawable/autofill_assistant_button_filled_bg_normal" />
 </selector>
diff --git a/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_button_filled_bg_normal.xml b/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_button_filled_bg_normal.xml
new file mode 100644
index 0000000..d3c247a9
--- /dev/null
+++ b/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_button_filled_bg_normal.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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. -->
+<shape
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+  <corners
+      android:radius="4dp" />
+  <solid
+      android:color="@color/modern_blue_600" />
+</shape>
diff --git a/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_button_filled_bg_pressed.xml b/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_button_filled_bg_pressed.xml
new file mode 100644
index 0000000..4812cdc
--- /dev/null
+++ b/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_button_filled_bg_pressed.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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. -->
+<shape
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+  <corners
+      android:radius="4dp" />
+  <solid
+      android:color="@color/modern_blue_300" />
+</shape>
diff --git a/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_chip_bg.xml b/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_button_hairline_bg.xml
similarity index 67%
rename from chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_chip_bg.xml
rename to chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_button_hairline_bg.xml
index 86aa4759..58aa77e 100644
--- a/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_chip_bg.xml
+++ b/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_button_hairline_bg.xml
@@ -5,7 +5,7 @@
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
   <item
       android:state_pressed="true"
-      android:drawable="@drawable/autofill_assistant_chip_bg_pressed" />
+      android:drawable="@drawable/autofill_assistant_button_hairline_bg_pressed" />
   <item
-      android:drawable="@drawable/autofill_assistant_chip_bg_normal" />
+      android:drawable="@drawable/autofill_assistant_button_hairline_bg_normal" />
 </selector>
diff --git a/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_button_hairline_bg_normal.xml b/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_button_hairline_bg_normal.xml
new file mode 100644
index 0000000..23ff1e4
--- /dev/null
+++ b/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_button_hairline_bg_normal.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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. -->
+<shape
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+  <corners
+      android:radius="4dp" />
+  <solid
+      android:color="@color/white_mode_tint" />
+  <stroke
+      android:width="1dp"
+      android:color="@color/hairline_stroke_color" />
+</shape>
diff --git a/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_button_hairline_bg_pressed.xml b/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_button_hairline_bg_pressed.xml
new file mode 100644
index 0000000..5974917
--- /dev/null
+++ b/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_button_hairline_bg_pressed.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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. -->
+<shape
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+  <corners
+      android:radius="4dp" />
+  <solid
+      android:color="@color/modern_blue_600_alpha_38_opaque" />
+  <stroke
+      android:width="1dp"
+      android:color="@color/hairline_stroke_color" />
+</shape>
diff --git a/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_chip_bg.xml b/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_chip_assistive_bg.xml
similarity index 67%
copy from chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_chip_bg.xml
copy to chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_chip_assistive_bg.xml
index 86aa4759..905094f 100644
--- a/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_chip_bg.xml
+++ b/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_chip_assistive_bg.xml
@@ -5,7 +5,7 @@
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
   <item
       android:state_pressed="true"
-      android:drawable="@drawable/autofill_assistant_chip_bg_pressed" />
+      android:drawable="@drawable/autofill_assistant_chip_assistive_bg_pressed" />
   <item
-      android:drawable="@drawable/autofill_assistant_chip_bg_normal" />
+      android:drawable="@drawable/autofill_assistant_chip_assistive_bg_normal" />
 </selector>
diff --git a/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_chip_bg_normal.xml b/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_chip_assistive_bg_normal.xml
similarity index 100%
rename from chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_chip_bg_normal.xml
rename to chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_chip_assistive_bg_normal.xml
diff --git a/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_chip_bg_pressed.xml b/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_chip_assistive_bg_pressed.xml
similarity index 100%
rename from chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_chip_bg_pressed.xml
rename to chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_chip_assistive_bg_pressed.xml
diff --git a/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_details_bg.xml b/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_details_bg.xml
new file mode 100644
index 0000000..9ce233e
--- /dev/null
+++ b/chrome/android/java/res_autofill_assistant/drawable/autofill_assistant_details_bg.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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. -->
+<shape
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <corners
+        android:radius="8dp" />
+    <stroke
+        android:width="1dp"
+        android:color="@color/hairline_stroke_color" />
+</shape>
diff --git a/chrome/android/java/res_autofill_assistant/layout/autofill_assistant_chip.xml b/chrome/android/java/res_autofill_assistant/layout/autofill_assistant_button_filled.xml
similarity index 67%
copy from chrome/android/java/res_autofill_assistant/layout/autofill_assistant_chip.xml
copy to chrome/android/java/res_autofill_assistant/layout/autofill_assistant_button_filled.xml
index ea7c4f9..d0f7f53 100644
--- a/chrome/android/java/res_autofill_assistant/layout/autofill_assistant_chip.xml
+++ b/chrome/android/java/res_autofill_assistant/layout/autofill_assistant_button_filled.xml
@@ -6,10 +6,10 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
-    android:paddingStart="16dp"
-    android:paddingEnd="16dp"
-    android:textAppearance="@style/BlackBodyDefault"
+    android:paddingStart="24dp"
+    android:paddingEnd="24dp"
+    android:textAppearance="@style/WhiteTitle2"
     android:gravity="center_vertical"
-    android:minHeight="40dp"
+    android:minHeight="36dp"
     android:singleLine="true"
-    android:background="@drawable/autofill_assistant_chip_bg" />
+    android:background="@drawable/autofill_assistant_button_filled_bg" />
diff --git a/chrome/android/java/res_autofill_assistant/layout/autofill_assistant_chip.xml b/chrome/android/java/res_autofill_assistant/layout/autofill_assistant_button_hairline.xml
similarity index 63%
copy from chrome/android/java/res_autofill_assistant/layout/autofill_assistant_chip.xml
copy to chrome/android/java/res_autofill_assistant/layout/autofill_assistant_button_hairline.xml
index ea7c4f9..492a8ae 100644
--- a/chrome/android/java/res_autofill_assistant/layout/autofill_assistant_chip.xml
+++ b/chrome/android/java/res_autofill_assistant/layout/autofill_assistant_button_hairline.xml
@@ -6,10 +6,10 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
-    android:paddingStart="16dp"
-    android:paddingEnd="16dp"
-    android:textAppearance="@style/BlackBodyDefault"
+    android:paddingStart="24dp"
+    android:paddingEnd="24dp"
+    android:textAppearance="@style/TextAppearance.AutofillAssistantButtonHairline"
     android:gravity="center_vertical"
-    android:minHeight="40dp"
+    android:minHeight="36dp"
     android:singleLine="true"
-    android:background="@drawable/autofill_assistant_chip_bg" />
+    android:background="@drawable/autofill_assistant_button_hairline_bg" />
diff --git a/chrome/android/java/res_autofill_assistant/layout/autofill_assistant_chip.xml b/chrome/android/java/res_autofill_assistant/layout/autofill_assistant_chip_assistive.xml
similarity index 76%
rename from chrome/android/java/res_autofill_assistant/layout/autofill_assistant_chip.xml
rename to chrome/android/java/res_autofill_assistant/layout/autofill_assistant_chip_assistive.xml
index ea7c4f9..1a2f60f 100644
--- a/chrome/android/java/res_autofill_assistant/layout/autofill_assistant_chip.xml
+++ b/chrome/android/java/res_autofill_assistant/layout/autofill_assistant_chip_assistive.xml
@@ -8,8 +8,8 @@
     android:layout_height="wrap_content"
     android:paddingStart="16dp"
     android:paddingEnd="16dp"
-    android:textAppearance="@style/BlackBodyDefault"
+    android:textAppearance="@style/BlackTitle2"
     android:gravity="center_vertical"
-    android:minHeight="40dp"
+    android:minHeight="32dp"
     android:singleLine="true"
-    android:background="@drawable/autofill_assistant_chip_bg" />
+    android:background="@drawable/autofill_assistant_chip_assistive_bg" />
diff --git a/chrome/android/java/res_autofill_assistant/layout/autofill_assistant_sheet.xml b/chrome/android/java/res_autofill_assistant/layout/autofill_assistant_sheet.xml
index 10fba98..3b6d3fc0 100644
--- a/chrome/android/java/res_autofill_assistant/layout/autofill_assistant_sheet.xml
+++ b/chrome/android/java/res_autofill_assistant/layout/autofill_assistant_sheet.xml
@@ -85,60 +85,53 @@
             app:colorProgress="@color/modern_blue_600"
             android:visibility="invisible" />
 
-        <RelativeLayout
+        <LinearLayout
             android:id="@+id/details"
             android:layout_width="match_parent"
-            android:layout_height="@dimen/autofill_assistant_details_image_size"
-            android:layout_marginTop="8dp"
+            android:layout_height="60dp"
+            android:layout_marginTop="24dp"
             android:layout_marginStart="24dp"
             android:layout_marginEnd="24dp"
-            android:layout_marginBottom="8dp"
-            android:visibility="gone">
-            <TextView
-                android:id="@+id/details_title"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_alignParentTop="true"
-                android:layout_alignParentStart="true"
-                android:layout_toStartOf="@+id/details_image"
-                android:gravity="center_vertical"
-                android:textAppearance="@style/BlackTitle2"
-                android:maxLines="1"
-                android:ellipsize="end"/>
-            <TextView
-                android:id="@+id/details_text"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_below="@+id/details_title"
-                android:layout_above="@+id/details_time"
-                android:layout_alignParentStart="true"
-                android:layout_toStartOf="@+id/details_image"
-                android:gravity="center_vertical"
-                android:textAppearance="@style/BlackBody"
-                android:maxLines="1"
-                android:ellipsize="end"/>
-            <TextView
-                android:id="@+id/details_time"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_alignParentBottom="true"
-                android:layout_alignParentStart="true"
-                android:gravity="center_vertical"
-                android:textAppearance="@style/TextAppearance.AutofillAssistantDetailsTime"
-                android:maxLines="1"
-                android:ellipsize="end"/>
+            android:layout_marginBottom="24dp"
+            android:background="@drawable/autofill_assistant_details_bg"
+            android:padding="8dp"
+            android:visibility="gone"
+            android:orientation="horizontal">
             <android.support.v7.widget.AppCompatImageView
                 android:id="@+id/details_image"
                 android:layout_width="@dimen/autofill_assistant_details_image_size"
                 android:layout_height="@dimen/autofill_assistant_details_image_size"
-                android:layout_alignParentEnd="true"
-                android:layout_marginStart="24dp"
+                android:layout_marginEnd="16dp"
                 android:scaleType="centerCrop">
             </android.support.v7.widget.AppCompatImageView>
-        </RelativeLayout>
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:orientation="vertical">
+                <TextView
+                    android:id="@+id/details_title"
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:layout_weight="1"
+                    android:gravity="bottom"
+                    android:textAppearance="@style/BlackTitle2"
+                    android:maxLines="1"
+                    android:ellipsize="end"/>
+                <TextView
+                    android:id="@+id/details_text"
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:layout_weight="1"
+                    android:gravity="top"
+                    android:textAppearance="@style/BlackBody"
+                    android:maxLines="1"
+                    android:ellipsize="end"/>
+            </LinearLayout>
+        </LinearLayout>
 
         <HorizontalScrollView
-            android:layout_width="match_parent"
+            android:id="@+id/carousel_scroll"
+            android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:animateLayoutChanges="true"
             android:scrollbars="none">
@@ -146,7 +139,6 @@
                 android:id="@+id/carousel"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:paddingTop="8dp"
                 android:paddingBottom="8dp"
                 android:paddingStart="24dp"
                 android:paddingEnd="24dp"
diff --git a/chrome/android/java/res_autofill_assistant/values-v17/styles.xml b/chrome/android/java/res_autofill_assistant/values-v17/styles.xml
index 41c86a2b..0e9dd09 100644
--- a/chrome/android/java/res_autofill_assistant/values-v17/styles.xml
+++ b/chrome/android/java/res_autofill_assistant/values-v17/styles.xml
@@ -16,9 +16,8 @@
             the generated style resources under res_v14_compatibility/values/ (crbug.com/243952).
     -->
 
-    <style
-        name="TextAppearance.AutofillAssistantDetailsTime"
-        parent="@style/BlackBodyDefault">
-        <item name="android:textColor">@color/google_green_700</item>
+    <style name="TextAppearance.AutofillAssistantButtonHairline" parent="RobotoMediumStyle">
+        <item name="android:textColor">@color/modern_blue_600</item>
+        <item name="android:textSize">@dimen/text_size_medium</item>
     </style>
 </resources>
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
index 9f3afae..fafbf242 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
@@ -229,6 +229,8 @@
     public static final String HORIZONTAL_TAB_SWITCHER_ANDROID = "HorizontalTabSwitcherAndroid";
     public static final String INCOGNITO_STRINGS = "IncognitoStrings";
     public static final String INFLATE_TOOLBAR_ON_BACKGROUND_THREAD = "BackgroundToolbarInflation";
+    public static final String INTENT_BLOCK_EXTERNAL_FORM_REDIRECT_NO_GESTURE =
+            "IntentBlockExternalFormRedirectsNoGesture";
     public static final String INTEREST_FEED_CONTENT_SUGGESTIONS = "InterestFeedContentSuggestions";
     public static final String LANGUAGES_PREFERENCE = "LanguagesPreference";
     public static final String JELLY_BEAN_SUPPORTED = "JellyBeanSupported";
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantUiController.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantUiController.java
index 6f4f94d..21ca9c3 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantUiController.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantUiController.java
@@ -8,8 +8,7 @@
 import android.os.Bundle;
 import android.support.annotation.Nullable;
 
-import com.google.android.libraries.feed.common.functional.Consumer;
-
+import org.chromium.base.Callback;
 import org.chromium.base.annotations.CalledByNative;
 import org.chromium.base.annotations.JNINamespace;
 import org.chromium.chrome.browser.autofill.PersonalDataManager;
@@ -317,7 +316,7 @@
         private final AutofillAssistantUiDelegate mUiDelegate;
 
         private boolean mShouldQueueUiOperations = false;
-        private final ArrayList<Consumer<AutofillAssistantUiDelegate>> mPendingUiOperations =
+        private final ArrayList<Callback<AutofillAssistantUiDelegate>> mPendingUiOperations =
                 new ArrayList<>();
 
         private UiDelegateHolder(AutofillAssistantUiDelegate uiDelegate) {
@@ -333,13 +332,13 @@
         }
 
         /**
-         * Unpause and trigger all UI operations received by {@link #performUiOperation(Consumer)}
+         * Unpause and trigger all UI operations received by {@link #performUiOperation(Callback)}
          * since the last {@link #pauseUiOperations()}.
          */
         public void unpauseUiOperations() {
             mShouldQueueUiOperations = false;
             for (int i = 0; i < mPendingUiOperations.size(); i++) {
-                mPendingUiOperations.get(i).accept(mUiDelegate);
+                mPendingUiOperations.get(i).onResult(mUiDelegate);
             }
             mPendingUiOperations.clear();
         }
@@ -350,13 +349,13 @@
          *  - later if the shutdown is cancelled.
          *  - never if Autofill Assistant is shut down.
          */
-        public void performUiOperation(Consumer<AutofillAssistantUiDelegate> operation) {
+        public void performUiOperation(Callback<AutofillAssistantUiDelegate> operation) {
             if (mShouldQueueUiOperations) {
                 mPendingUiOperations.add(operation);
                 return;
             }
 
-            operation.accept(mUiDelegate);
+            operation.onResult(mUiDelegate);
         }
     }
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantUiDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantUiDelegate.java
index b8e930e..69d3cfc 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantUiDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantUiDelegate.java
@@ -7,7 +7,6 @@
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
 import android.graphics.drawable.Drawable;
-import android.graphics.drawable.GradientDrawable;
 import android.media.ThumbnailUtils;
 import android.os.AsyncTask;
 import android.support.annotation.Nullable;
@@ -16,9 +15,11 @@
 import android.support.v7.widget.AppCompatImageView;
 import android.text.TextUtils;
 import android.util.TypedValue;
+import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.HorizontalScrollView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
@@ -57,6 +58,7 @@
     private final View mFullContainer;
     private final View mOverlay;
     private final LinearLayout mBottomBar;
+    private final HorizontalScrollView mCarouselScroll;
     private final ViewGroup mChipsViewContainer;
     private final TextView mStatusMessageView;
     private final MaterialProgressBar mProgressBar;
@@ -65,7 +67,6 @@
     private final AppCompatImageView mDetailsImage;
     private final TextView mDetailsTitle;
     private final TextView mDetailsText;
-    private final TextView mDetailsTime;
     private final int mDetailsImageWidth;
     private final int mDetailsImageHeight;
 
@@ -176,6 +177,11 @@
         }
     }
 
+    // Names borrowed from :
+    // - https://guidelines.googleplex.com/googlematerial/components/chips.html
+    // - https://guidelines.googleplex.com/googlematerial/components/buttons.html
+    private enum ChipStyle { CHIP_ASSISTIVE, BUTTON_FILLED, BUTTON_HAIRLINE }
+
     /**
      * Constructs an assistant UI delegate.
      *
@@ -201,7 +207,8 @@
                         -> HelpAndFeedback.getInstance(mActivity).showFeedback(mActivity,
                                 Profile.getLastUsedProfile(), mActivity.getActivityTab().getUrl(),
                                 FEEDBACK_CATEGORY_TAG));
-        mChipsViewContainer = mBottomBar.findViewById(R.id.carousel);
+        mCarouselScroll = mBottomBar.findViewById(R.id.carousel_scroll);
+        mChipsViewContainer = mCarouselScroll.findViewById(R.id.carousel);
         mStatusMessageView = mBottomBar.findViewById(R.id.status_message);
         mProgressBar = mBottomBar.findViewById(R.id.progress_bar);
 
@@ -209,7 +216,6 @@
         mDetailsImage = (AppCompatImageView) mDetails.findViewById(R.id.details_image);
         mDetailsTitle = (TextView) mDetails.findViewById(R.id.details_title);
         mDetailsText = (TextView) mDetails.findViewById(R.id.details_text);
-        mDetailsTime = (TextView) mDetails.findViewById(R.id.details_time);
         mDetailsImageWidth = mActivity.getResources().getDimensionPixelSize(
                 R.dimen.autofill_assistant_details_image_size);
         mDetailsImageHeight = mActivity.getResources().getDimensionPixelSize(
@@ -245,30 +251,49 @@
             return;
         }
 
+        boolean hasHighlightedScript = hasHighlightedScript(scriptHandles);
+        ChipStyle nonHighlightStyle =
+                hasHighlightedScript ? ChipStyle.BUTTON_HAIRLINE : ChipStyle.CHIP_ASSISTIVE;
+
         for (int i = 0; i < scriptHandles.size(); i++) {
-            ScriptHandle scriptHandle = scriptHandles.get(i);
-            TextView chipView = createChipView(scriptHandle.getName());
+            // Add scripts in reverse order if the chips are right aligned.
+            int j = hasHighlightedScript ? scriptHandles.size() - i - 1 : i;
+            ScriptHandle scriptHandle = scriptHandles.get(j);
+            ChipStyle chipStyle =
+                    scriptHandle.isHighlight() ? ChipStyle.BUTTON_FILLED : nonHighlightStyle;
+            TextView chipView = createChipView(scriptHandle.getName(), chipStyle);
             chipView.setOnClickListener((unusedView) -> {
                 clearChipsViewContainer();
                 mClient.onScriptSelected(scriptHandle.getPath());
             });
 
-            if (scriptHandle.isHighlight()) {
-                int highlightColor = mActivity.getResources().getColor(
-                        org.chromium.chrome.R.color.modern_blue_600);
-                int strokeWidth = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 1,
-                        mActivity.getResources().getDisplayMetrics());
-                ((GradientDrawable) chipView.getBackground().getCurrent())
-                        .setStroke(strokeWidth, highlightColor);
-                chipView.setTextColor(highlightColor);
-            }
-
             addChipViewToContainer(chipView);
         }
 
+        setChipViewContainerGravity(hasHighlightedScript);
         ensureFullContainerIsShown();
     }
 
+    private boolean hasHighlightedScript(ArrayList<ScriptHandle> scripts) {
+        for (int i = 0; i < scripts.size(); i++) {
+            if (scripts.get(i).isHighlight()) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private void setChipViewContainerGravity(boolean alignRight) {
+        ViewGroup.LayoutParams currentLayoutParams = mCarouselScroll.getLayoutParams();
+        LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(currentLayoutParams);
+        layoutParams.gravity = alignRight ? Gravity.END : Gravity.START;
+        mCarouselScroll.setLayoutParams(layoutParams);
+
+        // Reset the scroll position.
+        mCarouselScroll.post(
+                () -> mCarouselScroll.fullScroll(alignRight ? View.FOCUS_RIGHT : View.FOCUS_LEFT));
+    }
+
     private void addChipViewToContainer(TextView newChild) {
         // Add a left margin if it's not the first child.
         if (mChipsViewContainer.getChildCount() > 0) {
@@ -284,9 +309,22 @@
         mChipsViewContainer.setVisibility(View.VISIBLE);
     }
 
-    private TextView createChipView(String text) {
+    private TextView createChipView(String text, ChipStyle style) {
+        int resId = -1;
+        switch (style) {
+            case CHIP_ASSISTIVE:
+                resId = R.layout.autofill_assistant_chip_assistive;
+                break;
+            case BUTTON_FILLED:
+                resId = R.layout.autofill_assistant_button_filled;
+                break;
+            case BUTTON_HAIRLINE:
+                resId = R.layout.autofill_assistant_button_hairline;
+                break;
+        }
+
         TextView chipView = (TextView) (LayoutInflater.from(mActivity).inflate(
-                R.layout.autofill_assistant_chip, mChipsViewContainer, false));
+                resId, mChipsViewContainer, false));
         chipView.setText(text);
         return chipView;
     }
@@ -324,16 +362,17 @@
 
     public void hideDetails() {
         mDetails.setVisibility(View.GONE);
+        setCarouselTopPadding();
     }
 
     /** Called to show contextual information. */
     public void showDetails(Details details) {
         mDetailsTitle.setText(details.getTitle());
         mDetailsText.setText(getDetailsText(details));
-        mDetailsTime.setText(getDetailsTime(details.getDate()));
 
         mDetailsImage.setVisibility(View.INVISIBLE);
         mDetails.setVisibility(View.VISIBLE);
+        setCarouselTopPadding();
         ensureFullContainerIsShown();
 
         String url = details.getUrl();
@@ -347,10 +386,21 @@
         }
     }
 
+    private void setCarouselTopPadding() {
+        int topPadding = 0;
+        if (mDetails.getVisibility() != View.VISIBLE) {
+            topPadding = (int) TypedValue.applyDimension(
+                    TypedValue.COMPLEX_UNIT_DIP, 8, mActivity.getResources().getDisplayMetrics());
+        }
+        mChipsViewContainer.setPadding(mChipsViewContainer.getPaddingLeft(), topPadding,
+                mChipsViewContainer.getPaddingRight(), mChipsViewContainer.getPaddingBottom());
+    }
+
     private String getDetailsText(Details details) {
         List<String> parts = new ArrayList<>();
         Date date = details.getDate();
         if (date != null) {
+            parts.add(sDetailsTimeFormat.format(date).toLowerCase(Locale.getDefault()));
             parts.add(sDetailsDateFormat.format(date));
         }
 
@@ -363,16 +413,12 @@
         return TextUtils.join(" • ", parts);
     }
 
-    private String getDetailsTime(@Nullable Date date) {
-        return date != null ? sDetailsTimeFormat.format(date).toLowerCase(Locale.getDefault()) : "";
-    }
-
     private Drawable getRoundedImage(Bitmap bitmap) {
         RoundedBitmapDrawable roundedBitmap = RoundedBitmapDrawableFactory.create(
                 mActivity.getResources(),
                 ThumbnailUtils.extractThumbnail(bitmap, mDetailsImageWidth, mDetailsImageHeight));
-        // TODO(crbug.com/806868): Get radius from resources dimensions.
-        roundedBitmap.setCornerRadius(10);
+        roundedBitmap.setCornerRadius(TypedValue.applyDimension(
+                TypedValue.COMPLEX_UNIT_DIP, 4, mActivity.getResources().getDisplayMetrics()));
         return roundedBitmap;
     }
 
@@ -407,7 +453,8 @@
         for (int i = 0; i < profiles.size(); i++) {
             AutofillProfile profile = profiles.get(i);
             // TODO(crbug.com/806868): Show more information than the street.
-            TextView chipView = createChipView(profile.getStreetAddress());
+            TextView chipView =
+                    createChipView(profile.getStreetAddress(), ChipStyle.CHIP_ASSISTIVE);
             chipView.setOnClickListener((unusedView) -> {
                 clearChipsViewContainer();
                 mClient.onAddressSelected(profile.getGUID());
@@ -415,6 +462,7 @@
             addChipViewToContainer(chipView);
         }
 
+        setChipViewContainerGravity(false);
         ensureFullContainerIsShown();
     }
 
@@ -439,7 +487,8 @@
         for (int i = 0; i < cards.size(); i++) {
             CreditCard card = cards.get(i);
             // TODO(crbug.com/806868): Show more information than the card number.
-            TextView chipView = createChipView(card.getObfuscatedNumber());
+            TextView chipView =
+                    createChipView(card.getObfuscatedNumber(), ChipStyle.CHIP_ASSISTIVE);
             chipView.setOnClickListener((unusedView) -> {
                 clearChipsViewContainer();
                 mClient.onCardSelected(card.getGUID());
@@ -447,6 +496,7 @@
             addChipViewToContainer(chipView);
         }
 
+        setChipViewContainerGravity(false);
         ensureFullContainerIsShown();
     }
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
index 88caab5..67551c28 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
@@ -24,6 +24,7 @@
 import org.chromium.base.VisibleForTesting;
 import org.chromium.base.metrics.RecordHistogram;
 import org.chromium.base.metrics.RecordUserAction;
+import org.chromium.chrome.browser.ChromeFeatureList;
 import org.chromium.chrome.browser.ChromeSwitches;
 import org.chromium.chrome.browser.IntentHandler;
 import org.chromium.chrome.browser.UrlConstants;
@@ -311,6 +312,20 @@
                 if (DEBUG) Log.i(TAG, "NO_OVERRIDE: Incoming intent (not a redirect)");
                 return OverrideUrlLoadingResult.NO_OVERRIDE;
             }
+            // http://crbug.com/839751: Require user gestures for form submits to external
+            //                          protocols.
+            // TODO(tedchoc): Remove the ChromeFeatureList check once we verify this change does
+            //                not break the world.
+            if (isRedirectFromFormSubmit && !params.hasUserGesture()
+                    && ChromeFeatureList.isEnabled(
+                               ChromeFeatureList.INTENT_BLOCK_EXTERNAL_FORM_REDIRECT_NO_GESTURE)) {
+                if (DEBUG) {
+                    Log.i(TAG,
+                            "NO_OVERRIDE: Incoming form intent attempting to redirect without "
+                                    + "user gesture");
+                }
+                return OverrideUrlLoadingResult.NO_OVERRIDE;
+            }
             if (params.getRedirectHandler() != null
                     && params.getRedirectHandler().isNavigationFromUserTyping()) {
                 if (DEBUG) Log.i(TAG, "NO_OVERRIDE: Navigation from user typing");
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarTablet.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarTablet.java
index 5bc8243c..96f486a88 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarTablet.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarTablet.java
@@ -260,6 +260,18 @@
     }
 
     @Override
+    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+        int measuredWidth = getMeasuredWidth();
+
+        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+
+        if (getMeasuredWidth() != measuredWidth) {
+            setUnfocusedWidth(getMeasuredWidth());
+            super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+        }
+    }
+
+    @Override
     protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
         super.onLayout(changed, left, top, right, bottom);
         mLayoutLeft = left;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsBinder.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsBinder.java
index 3a2c327..2cc26f17 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsBinder.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsBinder.java
@@ -146,7 +146,7 @@
         ViewGroup.MarginLayoutParams publisherBarParams =
                 (ViewGroup.MarginLayoutParams) mPublisherBar.getLayoutParams();
 
-        if (showHeadline && !mUseContextualAlternateCardLayout) {
+        if (showHeadline && !mIsContextual) {
             // When we show a headline and not a description, we reduce the top margin of the
             // publisher bar.
             publisherBarParams.topMargin = mPublisherBar.getResources().getDimensionPixelSize(
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
index 060a9bd..8c52c16 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
@@ -1290,6 +1290,7 @@
             }
         });
         mAppMenuButtonHelper = new AppMenuButtonHelper(menuHandler);
+        mAppMenuButtonHelper.setMenuShowsFromBottom(mBottomToolbarCoordinator != null);
         mAppMenuButtonHelper.setOnAppMenuShownListener(() -> {
             RecordUserAction.record("MobileToolbarShowMenu");
             mToolbar.onMenuShown();
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/vr/ArCoreJavaUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/vr/ArCoreJavaUtils.java
index 8b54fee..f35ac63 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/vr/ArCoreJavaUtils.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/vr/ArCoreJavaUtils.java
@@ -17,6 +17,7 @@
 import dalvik.system.BaseDexClassLoader;
 
 import org.chromium.base.ContextUtils;
+import org.chromium.base.StrictModeContext;
 import org.chromium.base.ThreadUtils;
 import org.chromium.base.annotations.CalledByNative;
 import org.chromium.base.annotations.JNINamespace;
@@ -91,8 +92,10 @@
 
     @CalledByNative
     private static String getArCoreShimLibraryPath() {
-        return ((BaseDexClassLoader) ContextUtils.getApplicationContext().getClassLoader())
-                .findLibrary("arcore_sdk_c_minimal");
+        try (StrictModeContext unused = StrictModeContext.allowDiskReads()) {
+            return ((BaseDexClassLoader) ContextUtils.getApplicationContext().getClassLoader())
+                    .findLibrary("arcore_sdk_c_minimal");
+        }
     }
 
     private ArCoreJavaUtils(long nativeArCoreJavaUtils) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java b/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java
index 99c3066..2631599 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java
@@ -129,7 +129,7 @@
     private static final float THRESHOLD_TO_NEXT_STATE_2 = 0.3f;
 
     /** The height ratio for the sheet in the SheetState.HALF state. */
-    private static final float HALF_HEIGHT_RATIO = 0.65f;
+    private static final float HALF_HEIGHT_RATIO = 0.75f;
 
     /** The fraction of the width of the screen that, when swiped, will cause the sheet to move. */
     private static final float SWIPE_ALLOWED_FRACTION = 0.2f;
@@ -422,7 +422,7 @@
         super(context, atts);
 
         mMinHalfFullDistance =
-                getResources().getDimensionPixelSize(R.dimen.chrome_home_min_full_half_distance);
+                getResources().getDimensionPixelSize(R.dimen.bottom_sheet_min_full_half_distance);
         mToolbarShadowHeight =
                 getResources().getDimensionPixelOffset(R.dimen.toolbar_shadow_height);
 
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java
index c720fbf..fc5ba2a 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java
@@ -137,6 +137,7 @@
 
         HashMap<String, Boolean> features = new HashMap<String, Boolean>();
         features.put(ChromeFeatureList.CCT_EXTERNAL_LINK_HANDLING, true);
+        features.put(ChromeFeatureList.INTENT_BLOCK_EXTERNAL_FORM_REDIRECT_NO_GESTURE, true);
         ChromeFeatureList.setTestFeatures(features);
 
         mNativeLibraryTestRule.loadNativeLibraryNoBrowserProcess();
@@ -216,11 +217,13 @@
         checkUrl("market://1234")
                 .withPageTransition(PageTransition.FORM_SUBMIT)
                 .withIsRedirect(true)
+                .withHasUserGesture(true)
                 .expecting(OverrideUrlLoadingResult.OVERRIDE_WITH_EXTERNAL_INTENT,
                         START_OTHER_ACTIVITY);
         checkUrl("http://youtube.com://")
                 .withPageTransition(PageTransition.FORM_SUBMIT)
                 .withIsRedirect(true)
+                .withHasUserGesture(true)
                 .expecting(OverrideUrlLoadingResult.OVERRIDE_WITH_EXTERNAL_INTENT,
                         START_OTHER_ACTIVITY);
 
@@ -229,6 +232,7 @@
                 .withReferrer(YOUTUBE_URL)
                 .withPageTransition(PageTransition.FORM_SUBMIT)
                 .withIsRedirect(true)
+                .withHasUserGesture(true)
                 .expecting(OverrideUrlLoadingResult.NO_OVERRIDE, IGNORE);
 
         // If the page does not match the referrer, then prompt an intent.
@@ -236,14 +240,28 @@
                 .withReferrer("http://google.com")
                 .withPageTransition(PageTransition.FORM_SUBMIT)
                 .withIsRedirect(true)
+                .withHasUserGesture(true)
                 .expecting(OverrideUrlLoadingResult.OVERRIDE_WITH_EXTERNAL_INTENT,
                         START_OTHER_ACTIVITY);
 
+        // If the redirect is not associated with a user gesture, then continue loading in Chrome.
+        checkUrl("market://1234")
+                .withPageTransition(PageTransition.FORM_SUBMIT)
+                .withIsRedirect(true)
+                .withHasUserGesture(false)
+                .expecting(OverrideUrlLoadingResult.NO_OVERRIDE, IGNORE);
+        checkUrl("http://youtube.com://")
+                .withPageTransition(PageTransition.FORM_SUBMIT)
+                .withIsRedirect(true)
+                .withHasUserGesture(false)
+                .expecting(OverrideUrlLoadingResult.NO_OVERRIDE, IGNORE);
+
         // It doesn't make sense to allow intent picker without redirect, since form data
         // is not encoded in the intent (although, in theory, it could be passed in as
         // an extra data in the intent).
         checkUrl("http://youtube.com://")
                 .withPageTransition(PageTransition.FORM_SUBMIT)
+                .withHasUserGesture(true)
                 .expecting(OverrideUrlLoadingResult.NO_OVERRIDE, IGNORE);
     }
 
@@ -1162,6 +1180,7 @@
                 .withReferrer(referrer)
                 .withPageTransition(PageTransition.FORM_SUBMIT)
                 .withIsRedirect(true)
+                .withHasUserGesture(true)
                 .expecting(OverrideUrlLoadingResult.OVERRIDE_WITH_EXTERNAL_INTENT,
                         START_OTHER_ACTIVITY);
         Assert.assertEquals(Uri.parse(referrer),
@@ -1827,6 +1846,11 @@
             return this;
         }
 
+        public ExternalNavigationTestParams withHasUserGesture(boolean hasGesture) {
+            mHasUserGesture = hasGesture;
+            return this;
+        }
+
         public ExternalNavigationTestParams withChromeAppInForegroundRequired(
                 boolean foregroundRequired) {
             mChromeAppInForegroundRequired = foregroundRequired;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/NewTabPageTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/NewTabPageTest.java
index 453fe37..ace862b7 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/NewTabPageTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/NewTabPageTest.java
@@ -51,6 +51,7 @@
 import org.chromium.chrome.browser.ChromeFeatureList;
 import org.chromium.chrome.browser.ChromeSwitches;
 import org.chromium.chrome.browser.UrlConstants;
+import org.chromium.chrome.browser.feed.FeedNewTabPage;
 import org.chromium.chrome.browser.feed.FeedProcessScopeFactory;
 import org.chromium.chrome.browser.feed.TestNetworkClient;
 import org.chromium.chrome.browser.native_page.ContextMenuManager;
@@ -94,6 +95,7 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutionException;
@@ -121,8 +123,15 @@
     public static class InterestFeedParams implements ParameterProvider {
         @Override
         public Iterable<ParameterSet> getParameters() {
-            return Arrays.asList(new ParameterSet().value(false).name("DisableInterestFeed"),
-                    new ParameterSet().value(true).name("EnableInterestFeed"));
+            // Don't run tests for the dummy version of the FeedNewTabPage because content
+            // suggestions dependencies may not be initialized.
+            if (FeedNewTabPage.isDummy()) {
+                return Collections.singletonList(
+                        new ParameterSet().value(false).name("DisableInterestFeed"));
+            } else {
+                return Arrays.asList(new ParameterSet().value(false).name("DisableInterestFeed"),
+                        new ParameterSet().value(true).name("EnableInterestFeed"));
+            }
         }
     }
 
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 844cf52..764fb25 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -78,7 +78,6 @@
 #include "components/offline_pages/core/offline_page_feature.h"
 #include "components/omnibox/browser/omnibox_field_trial.h"
 #include "components/omnibox/browser/omnibox_switches.h"
-#include "components/omnibox/browser/toolbar_field_trial.h"
 #include "components/password_manager/core/common/password_manager_features.h"
 #include "components/payments/core/features.h"
 #include "components/previews/core/previews_features.h"
@@ -1166,17 +1165,17 @@
      arraysize(kUnifiedConsentShowBump), nullptr}};
 
 const FeatureEntry::FeatureParam kSimplifyHttpsIndicatorEvToSecure[] = {
-    {toolbar::features::kSimplifyHttpsIndicatorParameterName,
-     toolbar::features::kSimplifyHttpsIndicatorParameterEvToSecure}};
+    {OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterName,
+     OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterEvToSecure}};
 const FeatureEntry::FeatureParam kSimplifyHttpsIndicatorSecureToLock[] = {
-    {toolbar::features::kSimplifyHttpsIndicatorParameterName,
-     toolbar::features::kSimplifyHttpsIndicatorParameterSecureToLock}};
+    {OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterName,
+     OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterSecureToLock}};
 const FeatureEntry::FeatureParam kSimplifyHttpsIndicatorBothToLock[] = {
-    {toolbar::features::kSimplifyHttpsIndicatorParameterName,
-     toolbar::features::kSimplifyHttpsIndicatorParameterBothToLock}};
+    {OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterName,
+     OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterBothToLock}};
 const FeatureEntry::FeatureParam kSimplifyHttpsIndicatorKeepSecureChip[] = {
-    {toolbar::features::kSimplifyHttpsIndicatorParameterName,
-     toolbar::features::kSimplifyHttpsIndicatorParameterKeepSecureChip}};
+    {OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterName,
+     OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterKeepSecureChip}};
 
 const FeatureEntry::FeatureVariation kSimplifyHttpsIndicatorVariations[] = {
     {"(show Secure chip for EV pages)", kSimplifyHttpsIndicatorEvToSecure,
@@ -3228,9 +3227,6 @@
      FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kOmniboxPedalSuggestions,
                                     kPedalSuggestionVariations,
                                     "PedalSuggestionVariations")},
-    {"enable-new-app-menu-icon", flag_descriptions::kEnableNewAppMenuIconName,
-     flag_descriptions::kEnableNewAppMenuIconDescription, kOsDesktop,
-     FEATURE_VALUE_TYPE(features::kAnimatedAppMenuIcon)},
     {"omnibox-drive-suggestions",
      flag_descriptions::kOmniboxDriveSuggestionsName,
      flag_descriptions::kOmniboxDriveSuggestionsDescriptions, kOsDesktop,
@@ -3368,21 +3364,18 @@
     {"omnibox-ui-hide-steady-state-url-scheme",
      flag_descriptions::kOmniboxUIHideSteadyStateUrlSchemeName,
      flag_descriptions::kOmniboxUIHideSteadyStateUrlSchemeDescription, kOsAll,
-     FEATURE_VALUE_TYPE(toolbar::features::kHideSteadyStateUrlScheme)},
+     FEATURE_VALUE_TYPE(omnibox::kHideSteadyStateUrlScheme)},
 
     {"omnibox-ui-hide-steady-state-url-trivial-subdomains",
      flag_descriptions::kOmniboxUIHideSteadyStateUrlTrivialSubdomainsName,
      flag_descriptions::
          kOmniboxUIHideSteadyStateUrlTrivialSubdomainsDescription,
-     kOsAll,
-     FEATURE_VALUE_TYPE(
-         toolbar::features::kHideSteadyStateUrlTrivialSubdomains)},
+     kOsAll, FEATURE_VALUE_TYPE(omnibox::kHideSteadyStateUrlTrivialSubdomains)},
 
     {"omnibox-ui-hide-steady-state-url-path-query-and-ref",
      flag_descriptions::kOmniboxUIHideSteadyStateUrlPathQueryAndRefName,
      flag_descriptions::kOmniboxUIHideSteadyStateUrlPathQueryAndRefDescription,
-     kOsAll,
-     FEATURE_VALUE_TYPE(toolbar::features::kHideSteadyStateUrlPathQueryAndRef)},
+     kOsAll, FEATURE_VALUE_TYPE(omnibox::kHideSteadyStateUrlPathQueryAndRef)},
 
     {"omnibox-ui-jog-textfield-on-popup",
      flag_descriptions::kOmniboxUIJogTextfieldOnPopupName,
@@ -3807,7 +3800,7 @@
 
     {"simplify-https-indicator", flag_descriptions::kSimplifyHttpsIndicatorName,
      flag_descriptions::kSimplifyHttpsIndicatorDescription, kOsDesktop,
-     FEATURE_WITH_PARAMS_VALUE_TYPE(toolbar::features::kSimplifyHttpsIndicator,
+     FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kSimplifyHttpsIndicator,
                                     kSimplifyHttpsIndicatorVariations,
                                     "SimplifyHttpsIndicator")},
 
@@ -4344,12 +4337,6 @@
      flag_descriptions::kEnableHomeLauncherGesturesDescription, kOsCrOS,
      FEATURE_VALUE_TYPE(app_list_features::kEnableHomeLauncherGestures)},
 #endif
-#if defined(OS_WIN)
-    {"calculate-native-win-occlusion",
-     flag_descriptions::kCalculateNativeWinOcclusionName,
-     flag_descriptions::kCalculateNativeWinOcclusionDescription, kOsWin,
-     FEATURE_VALUE_TYPE(features::kCalculateNativeWinOcclusion)},
-#endif  // OS_WIN
 
 #if !defined(OS_ANDROID)
     {"happiness-tarcking-surveys-for-desktop",
diff --git a/chrome/browser/android/chrome_feature_list.cc b/chrome/browser/android/chrome_feature_list.cc
index 04bdd90..2ae41250 100644
--- a/chrome/browser/android/chrome_feature_list.cc
+++ b/chrome/browser/android/chrome_feature_list.cc
@@ -23,7 +23,6 @@
 #include "components/ntp_tiles/constants.h"
 #include "components/offline_pages/core/offline_page_feature.h"
 #include "components/omnibox/browser/omnibox_field_trial.h"
-#include "components/omnibox/browser/toolbar_field_trial.h"
 #include "components/password_manager/core/common/password_manager_features.h"
 #include "components/payments/core/features.h"
 #include "components/safe_browsing/features.h"
@@ -120,6 +119,7 @@
     &kHorizontalTabSwitcherAndroid,
     &kImprovedA2HS,
     &kInflateToolbarOnBackgroundThread,
+    &kIntentBlockExternalFormRedirectsNoGesture,
     &kJellyBeanSupported,
     &kLanguagesPreference,
     &kModalPermissionDialogView,
@@ -169,14 +169,14 @@
     &offline_pages::kOfflinePagesSharingFeature,
     &offline_pages::kOfflinePagesLivePageSharingFeature,
     &offline_pages::kPrefetchingOfflinePagesFeature,
+    &omnibox::kHideSteadyStateUrlScheme,
+    &omnibox::kHideSteadyStateUrlTrivialSubdomains,
     &omnibox::kQueryInOmnibox,
     &password_manager::features::kPasswordSearchMobile,
     &password_manager::features::kPasswordsKeyboardAccessory,
     &translate::kTranslateAndroidManualTrigger,
     &unified_consent::kUnifiedConsent,
     &subresource_filter::kSafeBrowsingSubresourceFilter,
-    &toolbar::features::kHideSteadyStateUrlScheme,
-    &toolbar::features::kHideSteadyStateUrlTrivialSubdomains,
 };
 
 const base::Feature* FindFeatureExposedToJava(const std::string& feature_name) {
@@ -337,6 +337,10 @@
 const base::Feature kInflateToolbarOnBackgroundThread{
     "BackgroundToolbarInflation", base::FEATURE_DISABLED_BY_DEFAULT};
 
+const base::Feature kIntentBlockExternalFormRedirectsNoGesture{
+    "IntentBlockExternalFormRedirectsNoGesture",
+    base::FEATURE_ENABLED_BY_DEFAULT};
+
 const base::Feature kJellyBeanSupported{"JellyBeanSupported",
                                         base::FEATURE_DISABLED_BY_DEFAULT};
 
diff --git a/chrome/browser/android/chrome_feature_list.h b/chrome/browser/android/chrome_feature_list.h
index aaa8a99..c8e7287 100644
--- a/chrome/browser/android/chrome_feature_list.h
+++ b/chrome/browser/android/chrome_feature_list.h
@@ -59,6 +59,7 @@
 extern const base::Feature kHorizontalTabSwitcherAndroid;
 extern const base::Feature kImprovedA2HS;
 extern const base::Feature kInflateToolbarOnBackgroundThread;
+extern const base::Feature kIntentBlockExternalFormRedirectsNoGesture;
 extern const base::Feature kJellyBeanSupported;
 extern const base::Feature kLanguagesPreference;
 extern const base::Feature kModalPermissionDialogView;
diff --git a/chrome/browser/android/metrics/uma_session_stats.cc b/chrome/browser/android/metrics/uma_session_stats.cc
index ef0544a3..81ef896 100644
--- a/chrome/browser/android/metrics/uma_session_stats.cc
+++ b/chrome/browser/android/metrics/uma_session_stats.cc
@@ -75,6 +75,9 @@
     // Note: This metric is recorded separately on desktop in
     // DesktopSessionDurationTracker::EndSession.
     UMA_HISTOGRAM_LONG_TIMES("Session.TotalDuration", duration);
+    UMA_HISTOGRAM_CUSTOM_TIMES("Session.TotalDurationMax1Day", duration,
+                               base::TimeDelta::FromMilliseconds(1),
+                               base::TimeDelta::FromHours(24), 50);
 
     DCHECK(g_browser_process);
     // Tell the metrics services they were cleanly shutdown.
diff --git a/chrome/browser/android/ntp/suggestions_event_reporter_bridge.cc b/chrome/browser/android/ntp/suggestions_event_reporter_bridge.cc
index e39ab772..e9bc8e9 100644
--- a/chrome/browser/android/ntp/suggestions_event_reporter_bridge.cc
+++ b/chrome/browser/android/ntp/suggestions_event_reporter_bridge.cc
@@ -28,15 +28,19 @@
 
 namespace {
 
-UserClassifier* GetUserClassifier() {
+void NotifyEvent(UserClassifier::Metric metric) {
   ntp_snippets::ContentSuggestionsService* content_suggestions_service =
       ContentSuggestionsServiceFactory::GetForProfile(
           ProfileManager::GetLastUsedProfile());
   // Can maybe be null in some cases? (Incognito profile?) crbug.com/647920
-  if (!content_suggestions_service) {
-    return nullptr;
+  UserClassifier* user_classifier =
+      content_suggestions_service
+          ? content_suggestions_service->user_classifier()
+          : nullptr;
+
+  if (user_classifier) {
+    user_classifier->OnEvent(metric);
   }
-  return content_suggestions_service->user_classifier();
 }
 
 }  // namespace
@@ -76,7 +80,7 @@
 
   ntp_snippets::metrics::OnPageShown(categories, suggestions_per_category,
                                      is_category_visible);
-  GetUserClassifier()->OnEvent(UserClassifier::Metric::NTP_OPENED);
+  NotifyEvent(UserClassifier::Metric::NTP_OPENED);
 }
 
 static void JNI_SuggestionsEventReporterBridge_OnSuggestionShown(
@@ -93,7 +97,7 @@
       position_in_category, base::Time::FromJavaTime(publish_timestamp_ms),
       score, base::Time::FromJavaTime(fetch_timestamp_ms));
   if (global_position == 0) {
-    GetUserClassifier()->OnEvent(UserClassifier::Metric::SUGGESTIONS_SHOWN);
+    NotifyEvent(UserClassifier::Metric::SUGGESTIONS_SHOWN);
   }
 }
 
@@ -155,7 +159,7 @@
     jint position) {
   ntp_snippets::metrics::OnMoreButtonClicked(
       Category::FromIDValue(j_category_id), position);
-  GetUserClassifier()->OnEvent(UserClassifier::Metric::SUGGESTIONS_USED);
+  NotifyEvent(UserClassifier::Metric::SUGGESTIONS_USED);
 }
 
 static void JNI_SuggestionsEventReporterBridge_OnSurfaceOpened(
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index e3602ee..81df4b59 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -39,8 +39,7 @@
   FixupBrowserAboutURL(url, browser_context);
 
   // Check that about: URLs are fixed up to chrome: by url_formatter::FixupURL.
-  DCHECK((*url == url::kAboutBlankURL) ||
-         !url->SchemeIs(url::kAboutScheme));
+  DCHECK((url->IsAboutBlank()) || !url->SchemeIs(url::kAboutScheme));
 
   // Only handle chrome://foo/, url_formatter::FixupURL translates about:foo.
   if (!url->SchemeIs(content::kChromeUIScheme))
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn
index e7de6bf..56f5ceb 100644
--- a/chrome/browser/chromeos/BUILD.gn
+++ b/chrome/browser/chromeos/BUILD.gn
@@ -905,8 +905,6 @@
     "first_run/step_names.h",
     "first_run/steps/app_list_step.cc",
     "first_run/steps/app_list_step.h",
-    "first_run/steps/help_step.cc",
-    "first_run/steps/help_step.h",
     "first_run/steps/tray_step.cc",
     "first_run/steps/tray_step.h",
     "hats/hats_dialog.cc",
diff --git a/chrome/browser/chromeos/arc/accessibility/DEPS b/chrome/browser/chromeos/arc/accessibility/DEPS
index d8fd9a3..8c72a946 100644
--- a/chrome/browser/chromeos/arc/accessibility/DEPS
+++ b/chrome/browser/chromeos/arc/accessibility/DEPS
@@ -1,6 +1,7 @@
 specific_include_rules = {
   "arc_accessibility_helper_bridge.*": [
     # TODO(mash): Fix. https://crbug.com/768439.
+    "+ash/system/message_center/arc/arc_notification_constants.h",
     "+ash/system/message_center/arc/arc_notification_surface.h",
     "+ash/system/message_center/arc/arc_notification_surface_manager.h",
   ],
diff --git a/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge_unittest.cc b/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge_unittest.cc
index f71b99f..fc27c71 100644
--- a/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge_unittest.cc
+++ b/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge_unittest.cc
@@ -8,6 +8,7 @@
 #include <unordered_map>
 #include <utility>
 
+#include "ash/system/message_center/arc/arc_notification_constants.h"
 #include "ash/system/message_center/arc/arc_notification_content_view.h"
 #include "ash/system/message_center/arc/arc_notification_surface.h"
 #include "ash/system/message_center/arc/arc_notification_surface_manager.h"
@@ -153,13 +154,15 @@
   }
 
   std::unique_ptr<message_center::Notification> CreateNotification() {
-    return std::make_unique<message_center::Notification>(
+    auto notification = std::make_unique<message_center::Notification>(
         message_center::NOTIFICATION_TYPE_CUSTOM, kNotificationKey,
         base::UTF8ToUTF16("title"), base::UTF8ToUTF16("message"), gfx::Image(),
         base::UTF8ToUTF16("display_source"), GURL(),
         message_center::NotifierId(message_center::NotifierId::ARC_APPLICATION,
                                    "test_app_id"),
         message_center::RichNotificationData(), nullptr);
+    notification->set_custom_view_type(ash::kArcNotificationCustomViewType);
+    return notification;
   }
 
   std::unique_ptr<ArcNotificationView> CreateArcNotificationView(
diff --git a/chrome/browser/chromeos/arc/bluetooth/arc_bluetooth_bridge.cc b/chrome/browser/chromeos/arc/bluetooth/arc_bluetooth_bridge.cc
index 65059a4..d44de34 100644
--- a/chrome/browser/chromeos/arc/bluetooth/arc_bluetooth_bridge.cc
+++ b/chrome/browser/chromeos/arc/bluetooth/arc_bluetooth_bridge.cc
@@ -70,8 +70,6 @@
 
 namespace {
 
-constexpr int32_t DEFAULT_RSSI = -127;
-
 // https://android.googlesource.com/platform/system/bt/+/master/stack/include/gatt_api.h
 constexpr int32_t GATT_CHAR_PROP_BIT_BROADCAST = (1 << 0);
 constexpr int32_t GATT_CHAR_PROP_BIT_READ = (1 << 1);
@@ -478,43 +476,6 @@
   arc_bridge_service_->bluetooth()->SetHost(this);
 }
 
-void ArcBluetoothBridge::SendDevice(const BluetoothDevice* device,
-                                    bool include_cached_device) const {
-  auto* bluetooth_instance = ARC_GET_INSTANCE_FOR_METHOD(
-      arc_bridge_service_->bluetooth(), OnDeviceFound);
-  if (!bluetooth_instance)
-    return;
-
-  std::vector<mojom::BluetoothPropertyPtr> properties =
-      GetDeviceProperties(mojom::BluetoothPropertyType::ALL, device);
-
-  bluetooth_instance->OnDeviceFound(std::move(properties));
-
-  if (!(device->GetType() & device::BLUETOOTH_TRANSPORT_LE))
-    return;
-
-  base::Optional<int8_t> rssi = device->GetInquiryRSSI();
-  mojom::BluetoothAddressPtr addr;
-
-  // There are two cases where we send advertise data to Android:
-  // 1) Cached found devices are sent when applications start scanning.
-  //    In this case, |include_cached_device| is true.
-  // 2) Updated devices are sent during scanning. In this case, rssi is valid.
-  if (!rssi.has_value() && !include_cached_device)
-    return;
-
-  auto* btle_instance = ARC_GET_INSTANCE_FOR_METHOD(
-      arc_bridge_service_->bluetooth(), OnLEDeviceFound);
-  if (!btle_instance)
-    return;
-
-  std::vector<mojom::BluetoothAdvertisingDataPtr> adv_data =
-      GetAdvertisingData(device);
-  addr = mojom::BluetoothAddress::From(device->GetAddress());
-  btle_instance->OnLEDeviceFound(std::move(addr), rssi.value_or(DEFAULT_RSSI),
-                                 std::move(adv_data));
-}
-
 void ArcBluetoothBridge::AdapterPoweredChanged(BluetoothAdapter* adapter,
                                                bool powered) {
   AdapterPowerState power_change =
@@ -535,12 +496,25 @@
   if (!arc_bridge_service_->bluetooth()->IsConnected())
     return;
 
-  SendDevice(device, /* include_cached_device = */ false);
+  auto* device_found = ARC_GET_INSTANCE_FOR_METHOD(
+      arc_bridge_service_->bluetooth(), OnDeviceFound);
+  if (device_found) {
+    device_found->OnDeviceFound(
+        GetDeviceProperties(mojom::BluetoothPropertyType::ALL, device));
+  }
 
   if (!(device->GetType() & device::BLUETOOTH_TRANSPORT_LE))
     return;
 
+  base::Optional<int8_t> rssi = device->GetInquiryRSSI();
   std::string addr = device->GetAddress();
+  auto* le_device_found = ARC_GET_INSTANCE_FOR_METHOD(
+      arc_bridge_service_->bluetooth(), OnLEDeviceFound);
+  if (le_device_found && rssi.has_value()) {
+    le_device_found->OnLEDeviceFound(mojom::BluetoothAddress::From(addr),
+                                     rssi.value(), GetAdvertisingData(device));
+  }
+
   auto it = gatt_connections_.find(addr);
   bool was_connected =
       (it != gatt_connections_.end() &&
@@ -1152,7 +1126,6 @@
     discovery_off_timer_.Start(FROM_HERE, kDiscoveryTimeout,
                                base::Bind(&ArcBluetoothBridge::CancelDiscovery,
                                           weak_factory_.GetWeakPtr()));
-    SendCachedDevicesFound();
     discovery_queue_.Pop();
     return;
   }
@@ -1230,7 +1203,6 @@
   if (bluetooth_instance != nullptr) {
     bluetooth_instance->OnDiscoveryStateChanged(
         mojom::BluetoothDiscoveryState::STARTED);
-    SendCachedDevicesFound();
   }
   discovery_queue_.Pop();
 }
@@ -2697,12 +2669,6 @@
   return advertising_data;
 }
 
-void ArcBluetoothBridge::SendCachedDevicesFound() const {
-  DCHECK(bluetooth_adapter_);
-  for (auto* device : bluetooth_adapter_->GetDevices())
-    SendDevice(device, /* include_cached_device = */ true);
-}
-
 void ArcBluetoothBridge::OnGetServiceRecordsDone(
     mojom::BluetoothAddressPtr remote_addr,
     const BluetoothUUID& target_uuid,
diff --git a/chrome/browser/chromeos/arc/bluetooth/arc_bluetooth_bridge.h b/chrome/browser/chromeos/arc/bluetooth/arc_bluetooth_bridge.h
index fe1d21a..f62c716 100644
--- a/chrome/browser/chromeos/arc/bluetooth/arc_bluetooth_bridge.h
+++ b/chrome/browser/chromeos/arc/bluetooth/arc_bluetooth_bridge.h
@@ -398,8 +398,6 @@
   std::vector<mojom::BluetoothAdvertisingDataPtr> GetAdvertisingData(
       const device::BluetoothDevice* device) const;
 
-  void SendCachedDevicesFound() const;
-
   device::BluetoothRemoteGattCharacteristic* FindGattCharacteristic(
       mojom::BluetoothAddressPtr remote_addr,
       mojom::BluetoothGattServiceIDPtr service_id,
@@ -503,9 +501,6 @@
   // or return false if the advertisement map is full.
   bool GetAdvertisementHandle(int32_t* adv_handle);
 
-  void SendDevice(const device::BluetoothDevice* device,
-                  bool include_cached_device) const;
-
   void OnGattServerPrepareWrite(mojom::BluetoothAddressPtr addr,
                                 bool has_subsequent_write,
                                 const base::Closure& success_callback,
diff --git a/chrome/browser/chromeos/first_run/chromeos_first_run_browsertest.cc b/chrome/browser/chromeos/first_run/chromeos_first_run_browsertest.cc
index afba46f..f9116f1 100644
--- a/chrome/browser/chromeos/first_run/chromeos_first_run_browsertest.cc
+++ b/chrome/browser/chromeos/first_run/chromeos_first_run_browsertest.cc
@@ -2,7 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "ash/public/cpp/ash_features.h"
 #include "ash/public/interfaces/constants.mojom.h"
 #include "ash/public/interfaces/system_tray_test_api.mojom.h"
 #include "chrome/browser/chromeos/first_run/first_run.h"
@@ -189,13 +188,6 @@
   FlushForTesting();
   EXPECT_TRUE(IsTrayBubbleOpen());
 
-  if (!ash::features::IsSystemTrayUnifiedEnabled()) {
-    AdvanceStep();
-    WaitForStep(first_run::kHelpStep);
-    FlushForTesting();
-    EXPECT_TRUE(IsTrayBubbleOpen());
-  }
-
   AdvanceStep();
   WaitForFinalization();
   content::RunAllPendingInMessageLoop();
diff --git a/chrome/browser/chromeos/first_run/first_run_controller.cc b/chrome/browser/chromeos/first_run/first_run_controller.cc
index 2e5f2295..a299692 100644
--- a/chrome/browser/chromeos/first_run/first_run_controller.cc
+++ b/chrome/browser/chromeos/first_run/first_run_controller.cc
@@ -4,7 +4,6 @@
 
 #include "chrome/browser/chromeos/first_run/first_run_controller.h"
 
-#include "ash/public/cpp/ash_features.h"
 #include "ash/public/cpp/shelf_prefs.h"
 #include "ash/public/cpp/shell_window_ids.h"
 #include "ash/public/interfaces/constants.mojom.h"
@@ -17,7 +16,6 @@
 #include "chrome/browser/chromeos/first_run/first_run_view.h"
 #include "chrome/browser/chromeos/first_run/metrics.h"
 #include "chrome/browser/chromeos/first_run/steps/app_list_step.h"
-#include "chrome/browser/chromeos/first_run/steps/help_step.h"
 #include "chrome/browser/chromeos/first_run/steps/tray_step.h"
 #include "chrome/browser/chromeos/profiles/profile_helper.h"
 #include "chrome/browser/ui/ash/ash_util.h"
@@ -206,9 +204,6 @@
 void FirstRunController::RegisterSteps() {
   steps_.push_back(std::make_unique<first_run::AppListStep>(this, actor_));
   steps_.push_back(std::make_unique<first_run::TrayStep>(this, actor_));
-  // UnifiedSystemTray does not have a help button. https://crbug.com/837502
-  if (!ash::features::IsSystemTrayUnifiedEnabled())
-    steps_.push_back(std::make_unique<first_run::HelpStep>(this, actor_));
 }
 
 void FirstRunController::ShowNextStep() {
diff --git a/chrome/browser/chromeos/first_run/steps/help_step.cc b/chrome/browser/chromeos/first_run/steps/help_step.cc
deleted file mode 100644
index 8755f89..0000000
--- a/chrome/browser/chromeos/first_run/steps/help_step.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2013 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/chromeos/first_run/steps/help_step.h"
-
-#include "ash/public/interfaces/first_run_helper.mojom.h"
-#include "base/bind.h"
-#include "chrome/browser/chromeos/first_run/first_run_controller.h"
-#include "chrome/browser/chromeos/first_run/step_names.h"
-#include "chrome/browser/ui/webui/chromeos/first_run/first_run_actor.h"
-#include "ui/gfx/geometry/point.h"
-#include "ui/gfx/geometry/rect.h"
-
-namespace {
-
-const int kCircleRadius = 19;
-
-}  // namespace
-
-namespace chromeos {
-namespace first_run {
-
-HelpStep::HelpStep(FirstRunController* controller, FirstRunActor* actor)
-    : Step(kHelpStep, controller, actor) {}
-
-void HelpStep::DoShow() {
-  const ash::mojom::FirstRunHelperPtr& helper_ptr =
-      first_run_controller()->first_run_helper_ptr();
-  helper_ptr->OpenTrayBubble(base::DoNothing());
-  // FirstRunController owns |this|, so use Unretained.
-  helper_ptr->GetHelpButtonBounds(base::BindOnce(
-      &HelpStep::ShowWithHelpButtonBounds, base::Unretained(this)));
-}
-
-void HelpStep::DoOnAfterHide() {
-  first_run_controller()->first_run_helper_ptr()->CloseTrayBubble();
-}
-
-void HelpStep::ShowWithHelpButtonBounds(const gfx::Rect& screen_bounds) {
-  gfx::Point center = screen_bounds.CenterPoint();
-  actor()->AddRoundHole(center.x(), center.y(), kCircleRadius);
-  actor()->ShowStepPointingTo(name(), center.x(), center.y(), kCircleRadius);
-}
-
-}  // namespace first_run
-}  // namespace chromeos
-
diff --git a/chrome/browser/chromeos/first_run/steps/help_step.h b/chrome/browser/chromeos/first_run/steps/help_step.h
deleted file mode 100644
index 6f6d1ff5..0000000
--- a/chrome/browser/chromeos/first_run/steps/help_step.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2013 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_CHROMEOS_FIRST_RUN_STEPS_HELP_STEP_H_
-#define CHROME_BROWSER_CHROMEOS_FIRST_RUN_STEPS_HELP_STEP_H_
-
-#include "base/macros.h"
-#include "chrome/browser/chromeos/first_run/step.h"
-
-namespace gfx {
-class Rect;
-}
-
-namespace chromeos {
-namespace first_run {
-
-class HelpStep : public Step {
- public:
-  HelpStep(FirstRunController* controller, FirstRunActor* actor);
-
- private:
-  // Step:
-  void DoShow() override;
-  void DoOnAfterHide() override;
-
-  void ShowWithHelpButtonBounds(const gfx::Rect& screen_bounds);
-
-  DISALLOW_COPY_AND_ASSIGN(HelpStep);
-};
-
-}  // namespace first_run
-}  // namespace chromeos
-
-#endif  // CHROME_BROWSER_CHROMEOS_FIRST_RUN_STEPS_HELP_STEP_H_
-
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service.cc b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service.cc
index e98eb24..d9b8221 100644
--- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service.cc
+++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service.cc
@@ -297,10 +297,6 @@
   return false;
 }
 
-void EasyUnlockService::OpenSetupApp() {
-  app_manager_->LaunchSetup();
-}
-
 void EasyUnlockService::SetHardlockState(
     EasyUnlockScreenlockStateHandler::HardlockState state) {
   const AccountId& account_id = GetAccountId();
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service.h b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service.h
index 801ba9a1..f366a617 100644
--- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service.h
+++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service.h
@@ -92,9 +92,6 @@
   // Returns the user currently associated with the service.
   virtual AccountId GetAccountId() const = 0;
 
-  // Launches Easy Unlock setup app.
-  virtual void LaunchSetup() = 0;
-
   // Gets/Sets/Clears the permit access for the local device.
   virtual void ClearPermitAccess() = 0;
 
@@ -226,9 +223,6 @@
   // Exposes the profile to which the service is attached to subclasses.
   Profile* profile() const { return profile_; }
 
-  // Opens an Easy Unlock Setup app window.
-  void OpenSetupApp();
-
   // Checks whether Easy unlock should be running and updates app state.
   void UpdateAppState();
 
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular.cc b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular.cc
index 7996812a..ed82241 100644
--- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular.cc
+++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular.cc
@@ -371,25 +371,6 @@
                    account_info.gaia);
 }
 
-void EasyUnlockServiceRegular::LaunchSetup() {
-  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
-
-  LogToggleFeature(SmartLockToggleFeature::ENABLE);
-
-  // Force the user to reauthenticate by showing a modal overlay (similar to the
-  // lock screen). The password obtained from the reauth is cached for a short
-  // period of time and used to create the cryptohome keys for sign-in.
-  if (short_lived_user_context_ && short_lived_user_context_->user_context()) {
-    OpenSetupApp();
-  } else {
-    bool reauth_success = EasyUnlockReauth::ReauthForUserContext(
-        base::Bind(&EasyUnlockServiceRegular::OpenSetupAppAfterReauth,
-                   weak_ptr_factory_.GetWeakPtr()));
-    if (!reauth_success)
-      OpenSetupApp();
-  }
-}
-
 void EasyUnlockServiceRegular::HandleUserReauth(
     const UserContext& user_context) {
   // Cache the user context for the next X minutes, so the user doesn't have to
@@ -405,8 +386,6 @@
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
   HandleUserReauth(user_context);
 
-  OpenSetupApp();
-
   // Use this opportunity to clear the crytohome keys if it was not already
   // cleared earlier.
   const base::ListValue* devices = GetRemoteDevices();
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular.h b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular.h
index 8bfbb9ae..bbe2a5b 100644
--- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular.h
+++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular.h
@@ -92,7 +92,6 @@
       override;
   EasyUnlockService::Type GetType() const override;
   AccountId GetAccountId() const override;
-  void LaunchSetup() override;
   void ClearPermitAccess() override;
   const base::ListValue* GetRemoteDevices() const override;
   void SetRemoteDevices(const base::ListValue& devices) override;
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_signin_chromeos.cc b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_signin_chromeos.cc
index a92a59f..42b67d7 100644
--- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_signin_chromeos.cc
+++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_signin_chromeos.cc
@@ -226,10 +226,6 @@
   return account_id_;
 }
 
-void EasyUnlockServiceSignin::LaunchSetup() {
-  NOTREACHED();
-}
-
 void EasyUnlockServiceSignin::ClearPermitAccess() {
   NOTREACHED();
 }
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_signin_chromeos.h b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_signin_chromeos.h
index cfdad86..a8d3daf9 100644
--- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_signin_chromeos.h
+++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_signin_chromeos.h
@@ -92,7 +92,6 @@
       override;
   EasyUnlockService::Type GetType() const override;
   AccountId GetAccountId() const override;
-  void LaunchSetup() override;
   void ClearPermitAccess() override;
   const base::ListValue* GetRemoteDevices() const override;
   void SetRemoteDevices(const base::ListValue& devices) override;
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index 7b8a83fe..51a1788 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -2755,10 +2755,6 @@
     "restore, to improve responsiveness of the foreground tab. This requires "
     "#enable-page-almost-idle.";
 
-const char kEnableNewAppMenuIconName[] = "Enable the New App Menu Icon";
-const char kEnableNewAppMenuIconDescription[] =
-    "Use the new app menu icon with update notification animations.";
-
 const char kEnableWebAuthenticationCtap2SupportName[] =
     "Enable Web Authentication API support for CTAP2 security keys";
 const char kEnableWebAuthenticationCtap2SupportDescription[] =
@@ -2858,12 +2854,6 @@
 
 #if defined(OS_WIN)
 
-const char kCalculateNativeWinOcclusionName[] =
-    "Calculate window occlusion on Windows";
-const char kCalculateNativeWinOcclusionDescription[] =
-    "Calculate window occlusion on Windows will be used in the future "
-    "to throttle and potentially unload foreground tabs in occluded windows";
-
 const char kCloudPrintXpsName[] = "XPS in Google Cloud Print";
 const char kCloudPrintXpsDescription[] =
     "XPS enables advanced options for classic printers connected to the Cloud "
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index 58c69d73..06c8cbcc 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -1659,9 +1659,6 @@
 extern const char kEnableAudioFocusEnabledDuckFlash[];
 extern const char kEnableAudioFocusEnabledNoEnforce[];
 
-extern const char kEnableNewAppMenuIconName[];
-extern const char kEnableNewAppMenuIconDescription[];
-
 extern const char kEnableWebAuthenticationCtap2SupportName[];
 extern const char kEnableWebAuthenticationCtap2SupportDescription[];
 
@@ -1720,9 +1717,6 @@
 
 #if defined(OS_WIN)
 
-extern const char kCalculateNativeWinOcclusionName[];
-extern const char kCalculateNativeWinOcclusionDescription[];
-
 extern const char kCloudPrintXpsName[];
 extern const char kCloudPrintXpsDescription[];
 
diff --git a/chrome/browser/media/widevine_hardware_caps_win.cc b/chrome/browser/media/widevine_hardware_caps_win.cc
index ddc8c7ea..ff391cc 100644
--- a/chrome/browser/media/widevine_hardware_caps_win.cc
+++ b/chrome/browser/media/widevine_hardware_caps_win.cc
@@ -114,14 +114,16 @@
     return;
   }
 
-  // There are contents encrypted with kCencVersion1 out there. Therefore we
-  // require kCencVersion1 to declare "cenc" support.
-  if (!capability.test(IntelWidevineCaps::kCencVersion1)) {
-    DVLOG(1) << "CENC version 1 not supported";
+  // Query for CENC.
+  // TODO(crbug.com/899984): There are contents encrypted with kCencVersion1 out
+  // there, so this check is not sufficient. Update this to check kCencVersion1.
+  if (!capability.test(IntelWidevineCaps::kCencVersion3)) {
+    DVLOG(1) << "CENC version 3 not supported";
     return;
   }
 
-  DVLOG(1) << "Widevine hardware secure H264/CENC decryption supported";
+  DVLOG(1) << "Widevine hardware secure H264 CENC-v3 decryption supported. "
+              "CENC-v1 playback may fail!";
   video_codecs->insert(media::VideoCodec::kCodecH264);
   encryption_schemes->insert(media::EncryptionMode::kCenc);
 }
diff --git a/chrome/browser/pdf/pdf_extension_test.cc b/chrome/browser/pdf/pdf_extension_test.cc
index ffccf493..df3e911c 100644
--- a/chrome/browser/pdf/pdf_extension_test.cc
+++ b/chrome/browser/pdf/pdf_extension_test.cc
@@ -62,6 +62,7 @@
 #include "content/public/browser/web_contents.h"
 #include "content/public/common/content_features.h"
 #include "content/public/common/context_menu_params.h"
+#include "content/public/common/url_constants.h"
 #include "content/public/test/browser_test_utils.h"
 #include "content/public/test/hit_test_region_observer.h"
 #include "content/public/test/test_navigation_observer.h"
@@ -714,9 +715,9 @@
   rph->FilterURL(true, &valid_link_url);
   rph->FilterURL(true, &invalid_link_url);
 
-  // Invalid link URLs should be changed to "about:blank" when filtered.
+  // Invalid link URLs should be changed to "about:blank#blocked" when filtered.
   EXPECT_EQ(unfiltered_valid_link_url, valid_link_url);
-  EXPECT_EQ(GURL("about:blank"), invalid_link_url);
+  EXPECT_EQ(GURL(content::kBlockedURL), invalid_link_url);
 }
 
 // This test ensures that titles are set properly for PDFs without /Title.
diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_controller_browsertest.cc b/chrome/browser/picture_in_picture/picture_in_picture_window_controller_browsertest.cc
index 5dadfc6..27fbd9de 100644
--- a/chrome/browser/picture_in_picture/picture_in_picture_window_controller_browsertest.cc
+++ b/chrome/browser/picture_in_picture/picture_in_picture_window_controller_browsertest.cc
@@ -12,6 +12,7 @@
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_commands.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
+#include "chrome/browser/ui/views/overlay/overlay_window_views.h"
 #include "chrome/test/base/in_process_browser_test.h"
 #include "chrome/test/base/ui_test_utils.h"
 #include "components/viz/common/frame_sinks/copy_output_request.h"
@@ -189,7 +190,7 @@
   EXPECT_TRUE(window_controller()->GetWindowForTesting()->IsVisible());
 }
 
-#if (defined(OS_MACOSX) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
 class PictureInPicturePixelComparisonBrowserTest
     : public PictureInPictureWindowControllerBrowserTest {
  public:
@@ -232,7 +233,8 @@
             base::BindOnce(
                 &PictureInPicturePixelComparisonBrowserTest::ReadbackResult,
                 base::Unretained(this), run_loop.QuitClosure()));
-    overlay_window_views->GetLayer()->RequestCopyOfOutput(std::move(request));
+    overlay_window_views->GetNativeWindow()->layer()->RequestCopyOfOutput(
+        std::move(request));
     run_loop.Run();
   }
 
@@ -269,7 +271,8 @@
   std::unique_ptr<SkBitmap> result_bitmap_;
 };
 
-// TODO(cliffordcheng): enable on Windows when compile errors are resolved.
+// TODO(cliffordcheng): enable this tests on other platforms when
+// Windows and Mac capture screen problem is solved.
 // Plays a video and then trigger Picture-in-Picture. Grabs a screenshot of
 // Picture-in-Picture window and verifies it's as expected.
 IN_PROC_BROWSER_TEST_F(PictureInPicturePixelComparisonBrowserTest, VideoPlay) {
@@ -317,7 +320,7 @@
   ASSERT_TRUE(SaveBitmap(test_image_path, GetResultBitmap()));
   EXPECT_TRUE(CompareImages(GetResultBitmap()));
 }
-#endif  // (defined(OS_MACOSX) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+#endif  // defined(OS_LINUX) && !defined(OS_CHROMEOS)
 
 // Tests that when an active WebContents accurately tracks whether a video
 // is in Picture-in-Picture.
diff --git a/chrome/browser/previews/previews_lite_page_browsertest.cc b/chrome/browser/previews/previews_lite_page_browsertest.cc
index 626d718e..f0383183 100644
--- a/chrome/browser/previews/previews_lite_page_browsertest.cc
+++ b/chrome/browser/previews/previews_lite_page_browsertest.cc
@@ -527,14 +527,14 @@
 // Previews InfoBar (which these tests trigger) does not work on Mac.
 // See https://crbug.com/782322 for detail.
 // Also occasional flakes on win7 (https://crbug.com/789542).
-#if defined(OS_ANDROID) || defined(OS_LINUX)
-#define MAYBE_LitePagePreviewsTriggering LitePagePreviewsTriggering
+#if defined(OS_WIN) || defined(OS_MACOSX)
+#define DISABLE_ON_WIN_MAC(x) DISABLED_##x
 #else
-#define MAYBE_LitePagePreviewsTriggering DISABLED_LitePagePreviewsTriggering
+#define DISABLE_ON_WIN_MAC(x) x
 #endif
 
 IN_PROC_BROWSER_TEST_F(PreviewsLitePageServerBrowserTest,
-                       MAYBE_LitePagePreviewsTriggering) {
+                       DISABLE_ON_WIN_MAC(LitePagePreviewsTriggering)) {
   // TODO(crbug.com/874150): Use ExpectUniqueSample in these tests.
   // The histograms in these tests can only be checked by the expected bucket,
   // and not by a unique sample. This is because each navigation to a preview
@@ -693,16 +693,8 @@
   }
 }
 
-// Previews InfoBar (which these tests trigger) does not work on Mac.
-// See https://crbug.com/782322 for detail.
-// Also occasional flakes on win7 (https://crbug.com/789542).
-#if defined(OS_ANDROID) || defined(OS_LINUX)
-#define MAYBE_LitePagePreviewsReload LitePagePreviewsReload
-#else
-#define MAYBE_LitePagePreviewsReload DISABLED_LitePagePreviewsReload
-#endif
 IN_PROC_BROWSER_TEST_F(PreviewsLitePageServerBrowserTest,
-                       MAYBE_LitePagePreviewsReload) {
+                       DISABLE_ON_WIN_MAC(LitePagePreviewsReload)) {
   ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
   VerifyPreviewLoaded();
 
@@ -719,16 +711,8 @@
       1);
 }
 
-// Previews InfoBar (which these tests trigger) does not work on Mac.
-// See https://crbug.com/782322 for detail.
-// Also occasional flakes on win7 (https://crbug.com/789542).
-#if defined(OS_ANDROID) || defined(OS_LINUX)
-#define MAYBE_LitePagePreviewsRedirect LitePagePreviewsRedirect
-#else
-#define MAYBE_LitePagePreviewsRedirect DISABLED_LitePagePreviewsRedirect
-#endif
 IN_PROC_BROWSER_TEST_F(PreviewsLitePageServerBrowserTest,
-                       MAYBE_LitePagePreviewsRedirect) {
+                       DISABLE_ON_WIN_MAC(LitePagePreviewsRedirect)) {
   {
     // Verify the preview is triggered when an HTTP page redirects to HTTPS.
     base::HistogramTester histogram_tester;
@@ -761,16 +745,8 @@
   }
 }
 
-// Previews InfoBar (which these tests trigger) does not work on Mac.
-// See https://crbug.com/782322 for detail.
-// Also occasional flakes on win7 (https://crbug.com/789542).
-#if defined(OS_ANDROID) || defined(OS_LINUX)
-#define MAYBE_LitePagePreviewsResponse LitePagePreviewsResponse
-#else
-#define MAYBE_LitePagePreviewsResponse DISABLED_LitePagePreviewsResponse
-#endif
 IN_PROC_BROWSER_TEST_F(PreviewsLitePageServerBrowserTest,
-                       MAYBE_LitePagePreviewsResponse) {
+                       DISABLE_ON_WIN_MAC(LitePagePreviewsResponse)) {
   {
     // Verify the preview is not triggered when the server responds with bypass
     // 307.
@@ -852,16 +828,8 @@
   }
 }
 
-// Previews InfoBar (which these tests trigger) does not work on Mac.
-// See https://crbug.com/782322 for detail.
-// Also occasional flakes on win7 (https://crbug.com/789542).
-#if defined(OS_ANDROID) || defined(OS_LINUX)
-#define MAYBE_LitePagePreviewsLoadshed LitePagePreviewsLoadshed
-#else
-#define MAYBE_LitePagePreviewsLoadshed DISABLED_LitePagePreviewsLoadshed
-#endif
 IN_PROC_BROWSER_TEST_F(PreviewsLitePageServerBrowserTest,
-                       MAYBE_LitePagePreviewsLoadshed) {
+                       DISABLE_ON_WIN_MAC(LitePagePreviewsLoadshed)) {
   PreviewsService* previews_service =
       PreviewsServiceFactory::GetForProfile(browser()->profile());
   ASSERT_TRUE(previews_service);
@@ -905,17 +873,8 @@
   VerifyPreviewLoaded();
 }
 
-// Previews InfoBar (which these tests trigger) does not work on Mac.
-// See https://crbug.com/782322 for detail.
-// Also occasional flakes on win7 (https://crbug.com/789542).
-#if defined(OS_ANDROID) || defined(OS_LINUX)
-#define MAYBE_LitePagePreviewsReportSavings LitePagePreviewsReportSavings
-#else
-#define MAYBE_LitePagePreviewsReportSavings \
-  DISABLED_LitePagePreviewsReportSavings
-#endif
 IN_PROC_BROWSER_TEST_F(PreviewsLitePageServerBrowserTest,
-                       MAYBE_LitePagePreviewsReportSavings) {
+                       DISABLE_ON_WIN_MAC(LitePagePreviewsReportSavings)) {
   PrefService* prefs = browser()->profile()->GetPrefs();
   prefs->SetBoolean(data_reduction_proxy::prefs::kDataUsageReportingEnabled,
                     true);
@@ -931,16 +890,8 @@
   EXPECT_EQ(GetDataUsage(), 20U);
 }
 
-// Previews InfoBar (which these tests trigger) does not work on Mac.
-// See https://crbug.com/782322 for detail.
-// Also occasional flakes on win7 (https://crbug.com/789542).
-#if defined(OS_ANDROID) || defined(OS_LINUX)
-#define MAYBE_LitePagePreviewsNavigation LitePagePreviewsNavigation
-#else
-#define MAYBE_LitePagePreviewsNavigation DISABLED_LitePagePreviewsNavigation
-#endif
 IN_PROC_BROWSER_TEST_F(PreviewsLitePageServerBrowserTest,
-                       MAYBE_LitePagePreviewsNavigation) {
+                       DISABLE_ON_WIN_MAC(LitePagePreviewsNavigation)) {
   ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
   VerifyPreviewLoaded();
 
@@ -980,16 +931,8 @@
   }
 };
 
-// Previews InfoBar (which these tests trigger) does not work on Mac.
-// See https://crbug.com/782322 for detail.
-// Also occasional flakes on win7 (https://crbug.com/789542).
-#if defined(OS_ANDROID) || defined(OS_LINUX)
-#define MAYBE_LitePagePreviewsTimeout LitePagePreviewsTimeout
-#else
-#define MAYBE_LitePagePreviewsTimeout DISABLED_LitePagePreviewsTimeout
-#endif
 IN_PROC_BROWSER_TEST_F(PreviewsLitePageServerTimeoutBrowserTest,
-                       MAYBE_LitePagePreviewsTimeout) {
+                       DISABLE_ON_WIN_MAC(LitePagePreviewsTimeout)) {
   {
     // Ensure that a hung previews navigation doesn't wind up at the previews
     // server.
@@ -1027,17 +970,8 @@
   }
 };
 
-// Previews InfoBar (which these tests trigger) does not work on Mac.
-// See https://crbug.com/782322 for detail.
-// Also occasional flakes on win7 (https://crbug.com/789542).
-#if defined(OS_ANDROID) || defined(OS_LINUX)
-#define MAYBE_LitePagePreviewsBadServer LitePagePreviewsBadServer
-#else
-#define MAYBE_LitePagePreviewsBadServer DISABLED_LitePagePreviewsBadServer
-#endif
-
 IN_PROC_BROWSER_TEST_F(PreviewsLitePageServerBadServerBrowserTest,
-                       MAYBE_LitePagePreviewsBadServer) {
+                       DISABLE_ON_WIN_MAC(LitePagePreviewsBadServer)) {
   // TODO(crbug.com/874150): Use ExpectUniqueSample in this tests.
   // The histograms in this tests can only be checked by the expected bucket,
   // and not by a unique sample. This is because each navigation to a preview
@@ -1077,16 +1011,8 @@
   }
 };
 
-// Previews InfoBar (which these tests trigger) does not work on Mac.
-// See https://crbug.com/782322 for detail.
-// Also occasional flakes on win7 (https://crbug.com/789542).
-#if defined(OS_ANDROID) || defined(OS_LINUX)
-#define MAYBE_LitePagePreviewsDSTriggering LitePagePreviewsDSTriggering
-#else
-#define MAYBE_LitePagePreviewsDSTriggering DISABLED_LitePagePreviewsDSTriggering
-#endif
 IN_PROC_BROWSER_TEST_F(PreviewsLitePageServerDataSaverBrowserTest,
-                       MAYBE_LitePagePreviewsDSTriggering) {
+                       DISABLE_ON_WIN_MAC(LitePagePreviewsDSTriggering)) {
   // Verify the preview is not triggered on HTTPS pageloads without DataSaver.
   ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
   VerifyPreviewNotLoaded();
@@ -1112,18 +1038,9 @@
   }
 };
 
-// Previews InfoBar (which these tests trigger) does not work on Mac.
-// See https://crbug.com/782322 for detail.
-// Also occasional flakes on win7 (https://crbug.com/789542).
-#if defined(OS_ANDROID) || defined(OS_LINUX)
-#define MAYBE_LitePagePreviewsDSNoHeaderTriggering \
-  LitePagePreviewsDSNoHeaderTriggering
-#else
-#define MAYBE_LitePagePreviewsDSNoHeaderTriggering \
-  DISABLED_LitePagePreviewsDSNoHeaderTriggering
-#endif
-IN_PROC_BROWSER_TEST_F(PreviewsLitePageServerNoDataSaverHeaderBrowserTest,
-                       MAYBE_LitePagePreviewsDSNoHeaderTriggering) {
+IN_PROC_BROWSER_TEST_F(
+    PreviewsLitePageServerNoDataSaverHeaderBrowserTest,
+    DISABLE_ON_WIN_MAC(LitePagePreviewsDSNoHeaderTriggering)) {
   // Verify the preview is not triggered on HTTPS pageloads without data saver.
   ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
   VerifyPreviewNotLoaded();
@@ -1152,18 +1069,9 @@
   }
 };
 
-// Previews InfoBar (which these tests trigger) does not work on Mac.
-// See https://crbug.com/782322 for detail.
-// Also occasional flakes on win7 (https://crbug.com/789542).
-#if defined(OS_ANDROID) || defined(OS_LINUX)
-#define MAYBE_LitePagePreviewsInfoBarDataSaverUser \
-  LitePagePreviewsInfoBarDataSaverUser
-#else
-#define MAYBE_LitePagePreviewsInfoBarDataSaverUser \
-  DISABLED_LitePagePreviewsInfoBarDataSaverUser
-#endif
-IN_PROC_BROWSER_TEST_F(PreviewsLitePageNotificationDSEnabledBrowserTest,
-                       MAYBE_LitePagePreviewsInfoBarDataSaverUser) {
+IN_PROC_BROWSER_TEST_F(
+    PreviewsLitePageNotificationDSEnabledBrowserTest,
+    DISABLE_ON_WIN_MAC(LitePagePreviewsInfoBarDataSaverUser)) {
   // Ensure the preview is not shown the first time before the infobar is shown
   // for users who have DRP enabled.
   base::HistogramTester histogram_tester;
@@ -1213,18 +1121,9 @@
   }
 };
 
-// Previews InfoBar (which these tests trigger) does not work on Mac.
-// See https://crbug.com/782322 for detail.
-// Also occasional flakes on win7 (https://crbug.com/789542).
-#if defined(OS_ANDROID) || defined(OS_LINUX)
-#define MAYBE_LitePagePreviewsInfoBarNonDataSaverUser \
-  LitePagePreviewsInfoBarNonDataSaverUser
-#else
-#define MAYBE_LitePagePreviewsInfoBarNonDataSaverUser \
-  DISABLED_LitePagePreviewsInfoBarNonDataSaverUser
-#endif
-IN_PROC_BROWSER_TEST_F(PreviewsLitePageNotificationDSDisabledBrowserTest,
-                       MAYBE_LitePagePreviewsInfoBarNonDataSaverUser) {
+IN_PROC_BROWSER_TEST_F(
+    PreviewsLitePageNotificationDSDisabledBrowserTest,
+    DISABLE_ON_WIN_MAC(LitePagePreviewsInfoBarNonDataSaverUser)) {
   ui_test_utils::NavigateToURL(browser(), HttpsLitePageURL(kSuccess));
   VerifyPreviewNotLoaded();
   ClearDeciderState();
diff --git a/chrome/browser/resources/chromeos/first_run/first_run.html b/chrome/browser/resources/chromeos/first_run/first_run.html
index 184c631f..44cf341 100644
--- a/chrome/browser/resources/chromeos/first_run/first_run.html
+++ b/chrome/browser/resources/chromeos/first_run/first_run.html
@@ -23,7 +23,6 @@
     <div id="steps">
       <include src="app_list_step.html">
       <include src="tray_step.html">
-      <include src="help_step.html">
     </div>
     <script src="chrome://resources/js/i18n_template.js"></script>
   </body>
diff --git a/chrome/browser/resources/chromeos/first_run/first_run.js b/chrome/browser/resources/chromeos/first_run/first_run.js
index 71e9c5d..bd82d036 100644
--- a/chrome/browser/resources/chromeos/first_run/first_run.js
+++ b/chrome/browser/resources/chromeos/first_run/first_run.js
@@ -246,8 +246,6 @@
       }
       if (stepParams.voiceInteractionEnabled)
         step.setVoiceInteractionEnabled();
-      if (stepParams.unifiedSystemTrayEnabled)
-        step.setUnifiedSystemTrayEnabled(true);
       step.show(true, function(step) {
         step.focusDefaultControl();
         this.currentStep_ = step;
diff --git a/chrome/browser/resources/chromeos/first_run/help_step.html b/chrome/browser/resources/chromeos/first_run/help_step.html
deleted file mode 100644
index 5242c8b..0000000
--- a/chrome/browser/resources/chromeos/first_run/help_step.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<div id="help" class="step bubble transparent hidden">
-  <div id="completion-image"></div>
-  <h1 i18n-content="helpHeader"></h1>
-  <p i18n-content="helpText"></p>
-  <div class="controls">
-    <button i18n-content="helpKeepExploringButton"
-        class="help-button custom-appearance blue-button"></button>
-    <button i18n-content="helpFinishButton"
-        class="next-button custom-appearance white-button"></button>
-  </div>
-</div>
diff --git a/chrome/browser/resources/chromeos/first_run/step.js b/chrome/browser/resources/chromeos/first_run/step.js
index fd8fc546..f17e29af 100644
--- a/chrome/browser/resources/chromeos/first_run/step.js
+++ b/chrome/browser/resources/chromeos/first_run/step.js
@@ -255,9 +255,9 @@
     },
   };
 
-  var HelpStep = cr.ui.define('div');
+  var TrayStep = cr.ui.define('div');
 
-  HelpStep.prototype = {
+  TrayStep.prototype = {
     __proto__: Bubble.prototype,
 
     decorate: function() {
@@ -270,37 +270,8 @@
     },
   };
 
-  var TrayStep = cr.ui.define('div');
-
-  TrayStep.prototype = {
-    __proto__: HelpStep.prototype,
-
-    decorate: function() {
-      HelpStep.prototype.decorate.call(this);
-      this.setUnifiedSystemTrayEnabled(false);
-    },
-
-    /**
-     * Updates UI when UnifiedSystemTray is enabled.
-     */
-    setUnifiedSystemTrayEnabled: function(enabled) {
-      Array.prototype.forEach.call(
-          this.getElementsByClassName('unified-system-tray-enabled'),
-          function(el) {
-            el.hidden = !enabled;
-          }.bind(this));
-      Array.prototype.forEach.call(
-          this.getElementsByClassName('unified-system-tray-disabled'),
-          function(el) {
-            el.hidden = enabled;
-          }.bind(this));
-    },
-  };
-
   var DecorateStep = function(el) {
-    if (el.id == 'help')
-      HelpStep.decorate(el);
-    else if (el.id == 'tray')
+    if (el.id == 'tray')
       TrayStep.decorate(el);
     else if (el.classList.contains('bubble'))
       Bubble.decorate(el);
diff --git a/chrome/browser/resources/chromeos/first_run/tray_step.html b/chrome/browser/resources/chromeos/first_run/tray_step.html
index 3cf4f01..97c093f 100644
--- a/chrome/browser/resources/chromeos/first_run/tray_step.html
+++ b/chrome/browser/resources/chromeos/first_run/tray_step.html
@@ -3,13 +3,8 @@
   <p i18n-content="trayText"><p>
   <div class="controls">
     <button i18n-content="helpKeepExploringButton"
-        class="help-button custom-appearance blue-button
-               unified-system-tray-enabled"></button>
+        class="help-button custom-appearance blue-button"></button>
     <button i18n-content="helpFinishButton"
-        class="next-button custom-appearance white-button
-               unified-system-tray-enabled"></button>
-    <button i18n-content="nextButton"
-        class="next-button custom-appearance blue-button
-               unified-system-tray-disabled"></button>
+        class="next-button custom-appearance white-button"></button>
   </div>
 </div>
diff --git a/chrome/browser/resources/cryptotoken/enroller.js b/chrome/browser/resources/cryptotoken/enroller.js
index 3721acc..3c14de2 100644
--- a/chrome/browser/resources/cryptotoken/enroller.js
+++ b/chrome/browser/resources/cryptotoken/enroller.js
@@ -410,6 +410,17 @@
       }));
     }
 
+    var decodedRegistrationData =
+        new ByteString(decodeWebSafeBase64ToArray(registrationData));
+    var magicValue = decodedRegistrationData.getBytes(1);
+    if (magicValue[0] == 4) {
+      // This is a gNubby with obsolete firmware. We can't parse the reply from
+      // this device and users need to be guided to reflashing them. Therefore
+      // let attestation data pass directly so that can happen on
+      // accounts.google.com.
+      isDirect = true;
+    }
+
     if (isDirect) {
       return registrationData;
     }
diff --git a/chrome/browser/resources/md_extensions/detail_view.html b/chrome/browser/resources/md_extensions/detail_view.html
index c3cac3b..a52aae0f 100644
--- a/chrome/browser/resources/md_extensions/detail_view.html
+++ b/chrome/browser/resources/md_extensions/detail_view.html
@@ -59,6 +59,7 @@
       #main {
         @apply --cr-card-elevation;
         background-color: white;
+        box-sizing: border-box;
         margin: auto;
         min-height: 100%;
         padding-bottom: 64px;
diff --git a/chrome/browser/resources/md_extensions/item.html b/chrome/browser/resources/md_extensions/item.html
index ce73ea1c..589b4d8 100644
--- a/chrome/browser/resources/md_extensions/item.html
+++ b/chrome/browser/resources/md_extensions/item.html
@@ -76,6 +76,7 @@
       #main {
         display: flex;
         flex: 1;
+        min-height: 0;
         padding: 16px 20px;
       }
 
diff --git a/chrome/browser/resources/settings/people_page/easy_unlock_browser_proxy.js b/chrome/browser/resources/settings/people_page/easy_unlock_browser_proxy.js
index 008e6c94..0820a032 100644
--- a/chrome/browser/resources/settings/people_page/easy_unlock_browser_proxy.js
+++ b/chrome/browser/resources/settings/people_page/easy_unlock_browser_proxy.js
@@ -18,11 +18,6 @@
     getEnabledStatus() {}
 
     /**
-     * Starts the Easy Unlock setup flow.
-     */
-    startTurnOnFlow() {}
-
-    /**
      * Returns the Easy Unlock turn off flow status.
      * @return {!Promise<string>}
      */
@@ -49,11 +44,6 @@
     }
 
     /** @override */
-    startTurnOnFlow() {
-      chrome.send('easyUnlockStartTurnOnFlow');
-    }
-
-    /** @override */
     getTurnOffFlowStatus() {
       return cr.sendWithPromise('easyUnlockGetTurnOffFlowStatus');
     }
diff --git a/chrome/browser/resources/settings/people_page/lock_screen.html b/chrome/browser/resources/settings/people_page/lock_screen.html
index 09fd3ff..e7269ad 100644
--- a/chrome/browser/resources/settings/people_page/lock_screen.html
+++ b/chrome/browser/resources/settings/people_page/lock_screen.html
@@ -191,12 +191,6 @@
           multideviceSettingsEnabled_, easyUnlockAllowed_,
           easyUnlockInLegacyHostMode_)]]">
             <div class="separator"></div>
-            <template is="dom-if" if="[[!easyUnlockEnabled_]]">
-              <paper-button id="easyUnlockSetup" class="secondary-button"
-                  on-click="onEasyUnlockSetupTap_">
-                $i18n{easyUnlockSetupButton}
-              </paper-button>
-            </template>
             <template is="dom-if" if="[[easyUnlockEnabled_]]">
               <paper-button id="easyUnlockTurnOff" class="secondary-button"
                   on-click="onEasyUnlockTurnOffTap_">
diff --git a/chrome/browser/resources/settings/people_page/lock_screen.js b/chrome/browser/resources/settings/people_page/lock_screen.js
index 52bfe6f..0608e43 100644
--- a/chrome/browser/resources/settings/people_page/lock_screen.js
+++ b/chrome/browser/resources/settings/people_page/lock_screen.js
@@ -405,11 +405,6 @@
         easyUnlockEnabled && this.showEasyUnlockTurnOffDialog_;
   },
 
-  /** @private */
-  onEasyUnlockSetupTap_: function() {
-    this.easyUnlockBrowserProxy_.startTurnOnFlow();
-  },
-
   /**
    * @param {!Event} e
    * @private
diff --git a/chrome/browser/ssl/security_state_tab_helper.cc b/chrome/browser/ssl/security_state_tab_helper.cc
index 4044932..1da4480 100644
--- a/chrome/browser/ssl/security_state_tab_helper.cc
+++ b/chrome/browser/ssl/security_state_tab_helper.cc
@@ -20,7 +20,7 @@
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/pref_names.h"
 #include "chrome/common/secure_origin_whitelist.h"
-#include "components/omnibox/browser/toolbar_field_trial.h"
+#include "components/omnibox/browser/omnibox_field_trial.h"
 #include "components/prefs/pref_service.h"
 #include "components/safe_browsing/features.h"
 #include "components/security_state/content/content_utils.h"
@@ -177,14 +177,14 @@
   // the console to reduce developer confusion about the experimental UI
   // treatments for HTTPS pages with EV certificates.
   const std::string parameter =
-      base::FeatureList::IsEnabled(toolbar::features::kSimplifyHttpsIndicator)
+      base::FeatureList::IsEnabled(omnibox::kSimplifyHttpsIndicator)
           ? base::GetFieldTrialParamValueByFeature(
-                toolbar::features::kSimplifyHttpsIndicator,
-                toolbar::features::kSimplifyHttpsIndicatorParameterName)
+                omnibox::kSimplifyHttpsIndicator,
+                OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterName)
           : std::string();
   if (security_info.security_level == security_state::EV_SECURE) {
     if (parameter ==
-        toolbar::features::kSimplifyHttpsIndicatorParameterEvToSecure) {
+        OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterEvToSecure) {
       web_contents()->GetMainFrame()->AddMessageToConsole(
           content::CONSOLE_MESSAGE_LEVEL_INFO,
           "As part of an experiment, Chrome temporarily shows only the "
@@ -192,7 +192,7 @@
           "Extended Validation is still valid.");
     }
     if (parameter ==
-        toolbar::features::kSimplifyHttpsIndicatorParameterBothToLock) {
+        OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterBothToLock) {
       web_contents()->GetMainFrame()->AddMessageToConsole(
           content::CONSOLE_MESSAGE_LEVEL_INFO,
           "As part of an experiment, Chrome temporarily shows only the lock "
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
index 594acb53..461ec530 100644
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -1851,12 +1851,16 @@
       "webui/signin/sync_confirmation_ui.h",
       "webui/signin/user_manager_screen_handler.cc",
       "webui/signin/user_manager_screen_handler.h",
-
-      # TODO(scottchen): nux/set_as_default_handler is here because it depends
-      #     on settings_default_browser_handler, but that deps currently can't
-      #     be added in nux/BUILD.gn due to circular dependency.
-      #     Should move back to nux/BUILD.gn once settings's build config is in
-      #     a shareable location (e.g. ui/webui/settings/BUILD.gn).
+      "webui/welcome/nux/bookmark_handler.cc",
+      "webui/welcome/nux/bookmark_handler.h",
+      "webui/welcome/nux/bookmark_item.cc",
+      "webui/welcome/nux/bookmark_item.h",
+      "webui/welcome/nux/constants.cc",
+      "webui/welcome/nux/constants.h",
+      "webui/welcome/nux/email_handler.cc",
+      "webui/welcome/nux/email_handler.h",
+      "webui/welcome/nux/google_apps_handler.cc",
+      "webui/welcome/nux/google_apps_handler.h",
       "webui/welcome/nux/set_as_default_handler.cc",
       "webui/welcome/nux/set_as_default_handler.h",
       "webui/welcome/nux_helper.cc",
@@ -1867,13 +1871,6 @@
       "webui/welcome/welcome_ui.h",
     ]
 
-    deps += [
-      "//chrome/browser/ui/webui/welcome/nux:bookmark_handler",
-      "//chrome/browser/ui/webui/welcome/nux:constants",
-      "//chrome/browser/ui/webui/welcome/nux:email_feature",
-      "//chrome/browser/ui/webui/welcome/nux:google_apps_feature",
-    ]
-
     if (enable_dice_support) {
       sources += [
         "webui/signin/dice_turn_sync_on_helper.cc",
diff --git a/chrome/browser/ui/app_list/search/search_result_ranker/app_launch_predictor.cc b/chrome/browser/ui/app_list/search/search_result_ranker/app_launch_predictor.cc
index cfaa529f..c1297c2 100644
--- a/chrome/browser/ui/app_list/search/search_result_ranker/app_launch_predictor.cc
+++ b/chrome/browser/ui/app_list/search/search_result_ranker/app_launch_predictor.cc
@@ -137,7 +137,8 @@
 }
 
 HourAppLaunchPredictor::HourAppLaunchPredictor()
-    : last_save_timestamp_(base::Time::Now()) {}
+    : last_save_timestamp_(base::Time::Now()),
+      bin_weights_(BinWeightsFromFlagOrDefault()) {}
 
 HourAppLaunchPredictor::~HourAppLaunchPredictor() = default;
 
@@ -157,7 +158,6 @@
   const auto& frequency_table_map =
       proto_.hour_app_launch_predictor().binned_frequency_table();
 
-  const std::vector<float> weights = BinWeightsFromFlagOrDefault();
   for (size_t i = 0; i < base::size(kAdjacentHourBin); ++i) {
     // Finds adjacent bin and weight.
     const int adj_bin =
@@ -167,7 +167,7 @@
       continue;
 
     const auto& frequency_table = find_frequency_table->second;
-    const float weight = weights[i];
+    const float weight = bin_weights_[i];
 
     // Accumulates the frequency to the output.
     if (frequency_table.total_counts() > 0) {
diff --git a/chrome/browser/ui/app_list/search/search_result_ranker/app_launch_predictor.h b/chrome/browser/ui/app_list/search/search_result_ranker/app_launch_predictor.h
index deb9c75..7d25c6cb 100644
--- a/chrome/browser/ui/app_list/search/search_result_ranker/app_launch_predictor.h
+++ b/chrome/browser/ui/app_list/search/search_result_ranker/app_launch_predictor.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_SEARCH_RESULT_RANKER_APP_LAUNCH_PREDICTOR_H_
 
 #include <string>
+#include <vector>
 
 #include "base/containers/flat_map.h"
 #include "base/gtest_prod_util.h"
@@ -155,6 +156,8 @@
   base::Time last_save_timestamp_;
   // Coefficient that controls the decay of previous record.
   static constexpr float kWeeklyDecayCoeff = 0.8;
+  // Weights that are used to combine adjacent bins.
+  const std::vector<float> bin_weights_;
 
   DISALLOW_COPY_AND_ASSIGN(HourAppLaunchPredictor);
 };
diff --git a/chrome/browser/ui/ash/volume_controller.cc b/chrome/browser/ui/ash/volume_controller.cc
index 2fe07be..ae61bf1 100644
--- a/chrome/browser/ui/ash/volume_controller.cc
+++ b/chrome/browser/ui/ash/volume_controller.cc
@@ -58,28 +58,37 @@
   }
 }
 
-VolumeController::~VolumeController() = default;
+VolumeController::~VolumeController() {}
 
-void VolumeController::VolumeMuteToggle() {
-  chromeos::CrasAudioHandler* audio = chromeos::CrasAudioHandler::Get();
-  audio->SetOutputMute(!audio->IsOutputMuted());
+void VolumeController::VolumeMute() {
+  chromeos::CrasAudioHandler::Get()->SetOutputMute(true);
 }
 
 void VolumeController::VolumeDown() {
-  chromeos::CrasAudioHandler* audio = chromeos::CrasAudioHandler::Get();
-  audio->AdjustOutputVolumeByPercent(-kStepPercentage);
-  audio->SetOutputMute(audio->IsOutputVolumeBelowDefaultMuteLevel());
-  if (!audio->IsOutputMuted())
-    PlayVolumeAdjustSound();
+  chromeos::CrasAudioHandler* audio_handler = chromeos::CrasAudioHandler::Get();
+  if (audio_handler->IsOutputMuted()) {
+    audio_handler->SetOutputVolumePercent(0);
+  } else {
+    audio_handler->AdjustOutputVolumeByPercent(-kStepPercentage);
+    if (audio_handler->IsOutputVolumeBelowDefaultMuteLevel())
+      audio_handler->SetOutputMute(true);
+    else
+      PlayVolumeAdjustSound();
+  }
 }
 
 void VolumeController::VolumeUp() {
-  chromeos::CrasAudioHandler* audio = chromeos::CrasAudioHandler::Get();
-  const bool play_sound = audio->GetOutputVolumePercent() != 100;
-  audio->AdjustOutputVolumeByPercent(kStepPercentage);
-  if (audio->IsOutputVolumeBelowDefaultMuteLevel())
-    audio->AdjustOutputVolumeToAudibleLevel();
-  audio->SetOutputMute(false);
+  chromeos::CrasAudioHandler* audio_handler = chromeos::CrasAudioHandler::Get();
+  bool play_sound = false;
+  if (audio_handler->IsOutputMuted()) {
+    audio_handler->SetOutputMute(false);
+    audio_handler->AdjustOutputVolumeToAudibleLevel();
+    play_sound = true;
+  } else {
+    play_sound = audio_handler->GetOutputVolumePercent() != 100;
+    audio_handler->AdjustOutputVolumeByPercent(kStepPercentage);
+  }
+
   if (play_sound)
     PlayVolumeAdjustSound();
 }
diff --git a/chrome/browser/ui/ash/volume_controller.h b/chrome/browser/ui/ash/volume_controller.h
index cc422d8..a3ca76eccb 100644
--- a/chrome/browser/ui/ash/volume_controller.h
+++ b/chrome/browser/ui/ash/volume_controller.h
@@ -18,7 +18,7 @@
   ~VolumeController() override;
 
   // Overridden from ash::mojom::VolumeClient:
-  void VolumeMuteToggle() override;
+  void VolumeMute() override;
   void VolumeDown() override;
   void VolumeUp() override;
 
diff --git a/chrome/browser/ui/ash/volume_controller_browsertest.cc b/chrome/browser/ui/ash/volume_controller_browsertest.cc
index 253d894..19c64ca 100644
--- a/chrome/browser/ui/ash/volume_controller_browsertest.cc
+++ b/chrome/browser/ui/ash/volume_controller_browsertest.cc
@@ -25,7 +25,7 @@
       : is_sound_initialized_(chromeos::SOUND_COUNT),
         num_play_requests_(chromeos::SOUND_COUNT) {}
 
-  ~SoundsManagerTestImpl() override = default;
+  ~SoundsManagerTestImpl() override {}
 
   bool Initialize(SoundKey key, const base::StringPiece& /* data */) override {
     is_sound_initialized_[key] = true;
@@ -58,11 +58,11 @@
 
 class VolumeControllerTest : public InProcessBrowserTest {
  public:
-  VolumeControllerTest() = default;
-  ~VolumeControllerTest() override = default;
+  VolumeControllerTest() {}
+  ~VolumeControllerTest() override {}
 
   void SetUpOnMainThread() override {
-    volume_controller_ = std::make_unique<VolumeController>();
+    volume_controller_.reset(new VolumeController());
     audio_handler_ = chromeos::CrasAudioHandler::Get();
   }
 
@@ -75,7 +75,7 @@
 };
 
 IN_PROC_BROWSER_TEST_F(VolumeControllerTest, VolumeUpAndDown) {
-  // Set initial value as 50%.
+  // Set initial value as 50%
   const int kInitVolume = 50;
   audio_handler_->SetOutputVolumePercent(kInitVolume);
 
@@ -102,7 +102,7 @@
 }
 
 IN_PROC_BROWSER_TEST_F(VolumeControllerTest, VolumeUpTo100) {
-  // Setting to almost max.
+  // Setting to almost max
   audio_handler_->SetOutputVolumePercent(99);
 
   volume_controller_->VolumeUp();
@@ -113,50 +113,39 @@
   EXPECT_GT(100, audio_handler_->GetOutputVolumePercent());
 }
 
-IN_PROC_BROWSER_TEST_F(VolumeControllerTest, Mute) {
+IN_PROC_BROWSER_TEST_F(VolumeControllerTest, Mutes) {
   ASSERT_FALSE(audio_handler_->IsOutputMuted());
   const int initial_volume = audio_handler_->GetOutputVolumePercent();
 
-  // Toggling mute should work without changing the volume level.
-  volume_controller_->VolumeMuteToggle();
+  volume_controller_->VolumeMute();
   EXPECT_TRUE(audio_handler_->IsOutputMuted());
-  EXPECT_EQ(initial_volume, audio_handler_->GetOutputVolumePercent());
-  volume_controller_->VolumeMuteToggle();
-  EXPECT_FALSE(audio_handler_->IsOutputMuted());
-  EXPECT_EQ(initial_volume, audio_handler_->GetOutputVolumePercent());
 
-  // Volume up should un-mute and raise the volume.
-  volume_controller_->VolumeMuteToggle();
+  // Further mute buttons doesn't have effects.
+  volume_controller_->VolumeMute();
   EXPECT_TRUE(audio_handler_->IsOutputMuted());
+
+  // Right after the volume up after set_mute recovers to original volume.
   volume_controller_->VolumeUp();
   EXPECT_FALSE(audio_handler_->IsOutputMuted());
-  EXPECT_LT(initial_volume, audio_handler_->GetOutputVolumePercent());
-
-  // Volume down should un-mute and lower the volume.
-  audio_handler_->SetOutputMute(true);
-  volume_controller_->VolumeDown();
-  EXPECT_FALSE(audio_handler_->IsOutputMuted());
   EXPECT_EQ(initial_volume, audio_handler_->GetOutputVolumePercent());
 
-  // Volume down will mute if the level falls below the default mute volume (1).
-  audio_handler_->SetOutputVolumePercent(2);
-  audio_handler_->SetOutputMute(false);
+  volume_controller_->VolumeMute();
+  // After the volume down, the volume goes down to zero explicitly.
   volume_controller_->VolumeDown();
   EXPECT_TRUE(audio_handler_->IsOutputMuted());
-  EXPECT_TRUE(audio_handler_->IsOutputVolumeBelowDefaultMuteLevel());
+  EXPECT_EQ(0, audio_handler_->GetOutputVolumePercent());
 
-  // Volume up will un-mute and bring the level above the default mute volume.
-  audio_handler_->SetOutputVolumePercent(0);
-  audio_handler_->SetOutputMute(true);
+  // Thus, further VolumeUp doesn't recover the volume, it's just slightly
+  // bigger than 0.
   volume_controller_->VolumeUp();
-  EXPECT_FALSE(audio_handler_->IsOutputMuted());
-  EXPECT_FALSE(audio_handler_->IsOutputVolumeBelowDefaultMuteLevel());
+  EXPECT_LT(0, audio_handler_->GetOutputVolumePercent());
+  EXPECT_GT(initial_volume, audio_handler_->GetOutputVolumePercent());
 }
 
 class VolumeControllerSoundsTest : public VolumeControllerTest {
  public:
-  VolumeControllerSoundsTest() = default;
-  ~VolumeControllerSoundsTest() override = default;
+  VolumeControllerSoundsTest() : sounds_manager_(NULL) {}
+  ~VolumeControllerSoundsTest() override {}
 
   void SetUpInProcessBrowserTestFixture() override {
     sounds_manager_ = new SoundsManagerTestImpl();
@@ -172,7 +161,7 @@
   }
 
  private:
-  SoundsManagerTestImpl* sounds_manager_ = nullptr;
+  SoundsManagerTestImpl* sounds_manager_;
 
   DISALLOW_COPY_AND_ASSIGN(VolumeControllerSoundsTest);
 };
@@ -210,11 +199,9 @@
   volume_controller_->VolumeUp();
   EXPECT_EQ(3, num_play_requests());
 
-  // Check that sound isn't played when audio is muted. Note that the volume
-  // will be un-muted if the volume up/down key is pressed and the resulting
-  // level is above the default mute level (1), so press down with a low level.
-  audio_handler_->SetOutputVolumePercent(1);
-  audio_handler_->SetOutputMute(true);
+  // Check that sound isn't played when audio is muted.
+  audio_handler_->SetOutputVolumePercent(50);
+  volume_controller_->VolumeMute();
   volume_controller_->VolumeDown();
   ASSERT_TRUE(audio_handler_->IsOutputMuted());
   EXPECT_EQ(3, num_play_requests());
@@ -227,8 +214,8 @@
 
 class VolumeControllerSoundsDisabledTest : public VolumeControllerSoundsTest {
  public:
-  VolumeControllerSoundsDisabledTest() = default;
-  ~VolumeControllerSoundsDisabledTest() override = default;
+  VolumeControllerSoundsDisabledTest() {}
+  ~VolumeControllerSoundsDisabledTest() override {}
 
   void SetUpCommandLine(base::CommandLine* command_line) override {
     VolumeControllerSoundsTest::SetUpCommandLine(command_line);
diff --git a/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc b/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
index 1c42b820..199c25e2 100644
--- a/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
+++ b/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
@@ -569,7 +569,7 @@
                    kDontCheckTitle);
 
   // Check that the new popup displays about:blank.
-  EXPECT_EQ(GURL(url::kAboutBlankURL), popup->GetURL());
+  EXPECT_EQ(GURL(content::kBlockedURL), popup->GetURL());
 }
 
 // Verify that the renderer can't DOS the browser by creating arbitrarily many
diff --git a/chrome/browser/ui/layout_constants.cc b/chrome/browser/ui/layout_constants.cc
index 72ea7c4a..841a6b0 100644
--- a/chrome/browser/ui/layout_constants.cc
+++ b/chrome/browser/ui/layout_constants.cc
@@ -32,7 +32,9 @@
     case BOOKMARK_BAR_HEIGHT:
       // The fixed margin ensures the bookmark buttons appear centered relative
       // to the white space above and below.
-      return GetLayoutConstant(BOOKMARK_BAR_BUTTON_HEIGHT) + 4;
+      static constexpr int kBookmarkBarAttachedVerticalMargin = 5;
+      return GetLayoutConstant(BOOKMARK_BAR_BUTTON_HEIGHT) +
+             kBookmarkBarAttachedVerticalMargin;
     case BOOKMARK_BAR_BUTTON_HEIGHT:
       return touch_ui ? 36 : 28;
     case BOOKMARK_BAR_NTP_HEIGHT:
diff --git a/chrome/browser/ui/toolbar/app_menu_icon_controller.cc b/chrome/browser/ui/toolbar/app_menu_icon_controller.cc
index 14a2e1b..0ea3a47 100644
--- a/chrome/browser/ui/toolbar/app_menu_icon_controller.cc
+++ b/chrome/browser/ui/toolbar/app_menu_icon_controller.cc
@@ -55,11 +55,6 @@
   return AppMenuIconController::Severity::NONE;
 }
 
-// Checks if the app menu icon should be animated for the given severity.
-bool ShouldAnimateSeverity(AppMenuIconController::Severity severity) {
-  return severity != AppMenuIconController::Severity::NONE;
-}
-
 // Returns true if we should show the upgrade recommended icon.
 bool ShouldShowUpgradeRecommended() {
 #if defined(OS_CHROMEOS)
@@ -106,8 +101,7 @@
     UpgradeDetector::UpgradeNotificationAnnoyanceLevel level =
         UpgradeDetector::GetInstance()->upgrade_notification_stage();
     auto severity = SeverityFromUpgradeLevel(is_unstable_channel_, level);
-    delegate_->UpdateSeverity(IconType::UPGRADE_NOTIFICATION, severity,
-                              ShouldAnimateSeverity(severity));
+    delegate_->UpdateSeverity(IconType::UPGRADE_NOTIFICATION, severity);
     return;
   }
 
@@ -115,12 +109,11 @@
           ->GetHighestSeverityGlobalErrorWithAppMenuItem()) {
     // If you change the severity here, make sure to also change the menu icon
     // and the bubble icon.
-    delegate_->UpdateSeverity(IconType::GLOBAL_ERROR,
-                              Severity::MEDIUM, true);
+    delegate_->UpdateSeverity(IconType::GLOBAL_ERROR, Severity::MEDIUM);
     return;
   }
 
-  delegate_->UpdateSeverity(IconType::NONE, Severity::NONE, false);
+  delegate_->UpdateSeverity(IconType::NONE, Severity::NONE);
 }
 
 void AppMenuIconController::Observe(
diff --git a/chrome/browser/ui/toolbar/app_menu_icon_controller.h b/chrome/browser/ui/toolbar/app_menu_icon_controller.h
index 8ed6bf2..5ad267c3 100644
--- a/chrome/browser/ui/toolbar/app_menu_icon_controller.h
+++ b/chrome/browser/ui/toolbar/app_menu_icon_controller.h
@@ -39,9 +39,7 @@
     // Notifies the UI to update the icon to have the specified |severity|, as
     // well as specifying whether it should |animate|. The |type| parameter
     // specifies the type of change (i.e. the source of the notification).
-    virtual void UpdateSeverity(IconType type,
-                                Severity severity,
-                                bool animate) = 0;
+    virtual void UpdateSeverity(IconType type, Severity severity) = 0;
 
    protected:
     virtual ~Delegate() {}
diff --git a/chrome/browser/ui/toolbar/toolbar_model_unittest.cc b/chrome/browser/ui/toolbar/toolbar_model_unittest.cc
index 88d4333..ed8467d 100644
--- a/chrome/browser/ui/toolbar/toolbar_model_unittest.cc
+++ b/chrome/browser/ui/toolbar/toolbar_model_unittest.cc
@@ -16,7 +16,7 @@
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
 #include "chrome/test/base/browser_with_test_window_test.h"
-#include "components/omnibox/browser/toolbar_field_trial.h"
+#include "components/omnibox/browser/omnibox_field_trial.h"
 #include "components/omnibox/browser/toolbar_model.h"
 #include "content/public/browser/navigation_entry.h"
 #include "content/public/browser/ssl_status.h"
@@ -194,10 +194,9 @@
 // Test URL display.
 TEST_F(ToolbarModelTest, ShouldDisplayURL) {
   base::test::ScopedFeatureList feature_list;
-  feature_list.InitWithFeatures(
-      {toolbar::features::kHideSteadyStateUrlScheme,
-       toolbar::features::kHideSteadyStateUrlTrivialSubdomains},
-      {});
+  feature_list.InitWithFeatures({omnibox::kHideSteadyStateUrlScheme,
+                                 omnibox::kHideSteadyStateUrlTrivialSubdomains},
+                                {});
 
   AddTab(browser(), GURL(url::kAboutBlankURL));
 
@@ -217,8 +216,8 @@
   {
     base::test::ScopedFeatureList feature_list;
     feature_list.InitWithFeatures(
-        {}, {toolbar::features::kHideSteadyStateUrlScheme,
-             toolbar::features::kHideSteadyStateUrlTrivialSubdomains});
+        {}, {omnibox::kHideSteadyStateUrlScheme,
+             omnibox::kHideSteadyStateUrlTrivialSubdomains});
     NavigateAndCheckText(GURL("https://www.google.com/"),
                          base::ASCIIToUTF16("https://www.google.com"),
                          base::ASCIIToUTF16("https://www.google.com"));
@@ -228,8 +227,8 @@
   {
     base::test::ScopedFeatureList feature_list;
     feature_list.InitWithFeatures(
-        {toolbar::features::kHideSteadyStateUrlScheme},
-        {toolbar::features::kHideSteadyStateUrlTrivialSubdomains});
+        {omnibox::kHideSteadyStateUrlScheme},
+        {omnibox::kHideSteadyStateUrlTrivialSubdomains});
     NavigateAndCheckText(GURL("https://www.google.com/"),
                          base::ASCIIToUTF16("https://www.google.com"),
                          base::ASCIIToUTF16("www.google.com"));
@@ -239,8 +238,8 @@
   {
     base::test::ScopedFeatureList feature_list;
     feature_list.InitWithFeatures(
-        {toolbar::features::kHideSteadyStateUrlTrivialSubdomains},
-        {toolbar::features::kHideSteadyStateUrlScheme});
+        {omnibox::kHideSteadyStateUrlTrivialSubdomains},
+        {omnibox::kHideSteadyStateUrlScheme});
     NavigateAndCheckText(GURL("https://www.google.com/"),
                          base::ASCIIToUTF16("https://www.google.com"),
                          base::ASCIIToUTF16("https://google.com"));
@@ -250,8 +249,8 @@
   {
     base::test::ScopedFeatureList feature_list;
     feature_list.InitWithFeatures(
-        {toolbar::features::kHideSteadyStateUrlScheme,
-         toolbar::features::kHideSteadyStateUrlTrivialSubdomains},
+        {omnibox::kHideSteadyStateUrlScheme,
+         omnibox::kHideSteadyStateUrlTrivialSubdomains},
         {});
     NavigateAndCheckText(GURL("https://www.google.com/"),
                          base::ASCIIToUTF16("https://www.google.com"),
diff --git a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc
index 621e3fed..a60ea10 100644
--- a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc
+++ b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc
@@ -51,6 +51,10 @@
 #include "ui/base/l10n/l10n_util.h"
 #endif  // defined(OS_LINUX) && !defined(OS_CHROMEOS)
 
+#if defined(OS_CHROMEOS)
+#include "ui/base/ui_base_features.h"
+#endif
+
 ChromeBrowserMainExtraPartsViews::ChromeBrowserMainExtraPartsViews() {
 }
 
@@ -96,6 +100,15 @@
       network_context, switches::kEnableUiDevTools, 9223);
   if (devtools_server_) {
     auto dom_backend = std::make_unique<ui_devtools::DOMAgentAura>();
+#if defined(OS_CHROMEOS)
+    // OverlayAgentAura intends to handle input events targeting any UI surface,
+    // and so installs itself as a local aura::Env pre-target ui::EventHandler.
+    // In multi-process Mash, Chrome's local aura::Env can only handle events
+    // target Chrome's own aura::Windows, not those targeting Ash or mojo apps.
+    // TODO(crbug.com/896977): Init the devtools server in Ash on Chrome OS.
+    LOG_IF(WARNING, features::IsMultiProcessMash())
+        << "Chrome cannot handle Ash system ui and mojo app events in Mash.";
+#endif
     auto overlay_backend =
         std::make_unique<ui_devtools::OverlayAgentAura>(dom_backend.get());
     auto css_backend =
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view_browsertest.cc b/chrome/browser/ui/views/location_bar/location_bar_view_browsertest.cc
index 00f6d16e..0ba91ff 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view_browsertest.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view_browsertest.cc
@@ -21,7 +21,7 @@
 #include "chrome/common/chrome_paths.h"
 #include "chrome/test/base/in_process_browser_test.h"
 #include "chrome/test/base/ui_test_utils.h"
-#include "components/omnibox/browser/toolbar_field_trial.h"
+#include "components/omnibox/browser/omnibox_field_trial.h"
 #include "components/omnibox/browser/toolbar_model_impl.h"
 #include "components/security_state/core/security_state.h"
 #include "components/zoom/zoom_controller.h"
@@ -253,11 +253,11 @@
 
   const std::string kDefaultVariation = std::string();
   const std::string kEvToSecureVariation(
-      toolbar::features::kSimplifyHttpsIndicatorParameterEvToSecure);
+      OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterEvToSecure);
   const std::string kBothToLockVariation(
-      toolbar::features::kSimplifyHttpsIndicatorParameterBothToLock);
+      OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterBothToLock);
   const std::string kKeepSecureChipVariation(
-      toolbar::features::kSimplifyHttpsIndicatorParameterKeepSecureChip);
+      OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterKeepSecureChip);
 
   const struct {
     std::string feature_param;
@@ -307,11 +307,11 @@
     base::test::ScopedFeatureList scoped_feature_list;
     if (c.feature_param.empty()) {
       scoped_feature_list.InitAndDisableFeature(
-          toolbar::features::kSimplifyHttpsIndicator);
+          omnibox::kSimplifyHttpsIndicator);
     } else {
       scoped_feature_list.InitAndEnableFeatureWithParameters(
-          toolbar::features::kSimplifyHttpsIndicator,
-          {{toolbar::features::kSimplifyHttpsIndicatorParameterName,
+          omnibox::kSimplifyHttpsIndicator,
+          {{OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterName,
             c.feature_param}});
     }
     SetUpInterceptor(c.cert_status);
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index b76aab3..d4ec646 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -33,7 +33,6 @@
 #include "components/omnibox/browser/omnibox_edit_model.h"
 #include "components/omnibox/browser/omnibox_field_trial.h"
 #include "components/omnibox/browser/omnibox_popup_model.h"
-#include "components/omnibox/browser/toolbar_field_trial.h"
 #include "components/omnibox/browser/toolbar_model.h"
 #include "components/search_engines/template_url_service.h"
 #include "components/strings/grit/components_strings.h"
@@ -644,8 +643,8 @@
 
 bool OmniboxViewViews::UnapplySteadyStateElisions(UnelisionGesture gesture) {
   // Early exit if no steady state elision features are enabled.
-  if (!toolbar::features::IsHideSteadyStateUrlSchemeEnabled() &&
-      !toolbar::features::IsHideSteadyStateUrlTrivialSubdomainsEnabled()) {
+  if (!OmniboxFieldTrial::IsHideSteadyStateUrlSchemeEnabled() &&
+      !OmniboxFieldTrial::IsHideSteadyStateUrlTrivialSubdomainsEnabled()) {
     return false;
   }
 
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views_unittest.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views_unittest.cc
index 3482f5b..290dda0 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views_unittest.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views_unittest.cc
@@ -28,7 +28,6 @@
 #include "components/omnibox/browser/omnibox_edit_model.h"
 #include "components/omnibox/browser/omnibox_field_trial.h"
 #include "components/omnibox/browser/test_toolbar_model.h"
-#include "components/omnibox/browser/toolbar_field_trial.h"
 #include "content/public/test/test_browser_thread_bundle.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "ui/base/ime/input_method.h"
@@ -533,8 +532,8 @@
  public:
   OmniboxViewViewsSteadyStateElisionsTest()
       : OmniboxViewViewsTest({
-            toolbar::features::kHideSteadyStateUrlScheme,
-            toolbar::features::kHideSteadyStateUrlTrivialSubdomains,
+            omnibox::kHideSteadyStateUrlScheme,
+            omnibox::kHideSteadyStateUrlTrivialSubdomains,
         }) {}
 
  protected:
@@ -948,8 +947,8 @@
  public:
   OmniboxViewViewsSteadyStateElisionsAndQueryInOmniboxTest()
       : OmniboxViewViewsSteadyStateElisionsTest({
-            toolbar::features::kHideSteadyStateUrlScheme,
-            toolbar::features::kHideSteadyStateUrlTrivialSubdomains,
+            omnibox::kHideSteadyStateUrlScheme,
+            omnibox::kHideSteadyStateUrlTrivialSubdomains,
             omnibox::kQueryInOmnibox,
         }) {}
 
diff --git a/chrome/browser/ui/views/toolbar/browser_app_menu_button.cc b/chrome/browser/ui/views/toolbar/browser_app_menu_button.cc
index ab35105..54c78476 100644
--- a/chrome/browser/ui/views/toolbar/browser_app_menu_button.cc
+++ b/chrome/browser/ui/views/toolbar/browser_app_menu_button.cc
@@ -5,7 +5,6 @@
 #include "chrome/browser/ui/views/toolbar/browser_app_menu_button.h"
 
 #include "base/location.h"
-#include "base/metrics/field_trial_params.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/single_thread_task_runner.h"
 #include "base/threading/thread_task_runner_handle.h"
@@ -13,12 +12,9 @@
 #include "cc/paint/paint_flags.h"
 #include "chrome/app/vector_icons/vector_icons.h"
 #include "chrome/browser/themes/theme_properties.h"
-#include "chrome/browser/themes/theme_service.h"
-#include "chrome/browser/themes/theme_service_factory.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_otr_state.h"
 #include "chrome/browser/ui/layout_constants.h"
-#include "chrome/browser/ui/tabs/tab_strip_model.h"
 #include "chrome/browser/ui/toolbar/app_menu_model.h"
 #include "chrome/browser/ui/views/chrome_layout_provider.h"
 #include "chrome/browser/ui/views/extensions/browser_action_drag_data.h"
@@ -26,7 +22,6 @@
 #include "chrome/browser/ui/views/toolbar/toolbar_button.h"
 #include "chrome/browser/ui/views/toolbar/toolbar_ink_drop_util.h"
 #include "chrome/browser/ui/views/toolbar/toolbar_view.h"
-#include "chrome/common/chrome_features.h"
 #include "chrome/grit/chromium_strings.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/material_design/material_design_controller.h"
@@ -46,12 +41,6 @@
 #include "ui/keyboard/keyboard_controller.h"
 #endif  // defined(OS_CHROMEOS)
 
-namespace {
-
-constexpr base::TimeDelta kDelayTime = base::TimeDelta::FromMilliseconds(1500);
-
-}  // namespace
-
 // static
 bool BrowserAppMenuButton::g_open_app_immediately_for_testing = false;
 
@@ -61,23 +50,17 @@
   SetFocusPainter(nullptr);
   SetHorizontalAlignment(gfx::ALIGN_CENTER);
 
-  if (base::FeatureList::IsEnabled(features::kAnimatedAppMenuIcon)) {
-    toolbar_view_->browser()->tab_strip_model()->AddObserver(this);
-    should_use_new_icon_ = true;
-    should_delay_animation_ = base::GetFieldTrialParamByFeatureAsBool(
-        features::kAnimatedAppMenuIcon, "HasDelay", false);
-  }
-
   set_ink_drop_visible_opacity(kToolbarInkDropVisibleOpacity);
 
   md_observer_.Add(ui::MaterialDesignController::GetInstance());
+  UpdateBorder();
 }
 
 BrowserAppMenuButton::~BrowserAppMenuButton() {}
 
-void BrowserAppMenuButton::SetSeverity(AppMenuIconController::IconType type,
-                                       AppMenuIconController::Severity severity,
-                                       bool animate) {
+void BrowserAppMenuButton::SetSeverity(
+    AppMenuIconController::IconType type,
+    AppMenuIconController::Severity severity) {
   type_ = type;
   severity_ = severity;
 
@@ -85,7 +68,7 @@
       severity_ == AppMenuIconController::Severity::NONE
           ? l10n_util::GetStringUTF16(IDS_APPMENU_TOOLTIP)
           : l10n_util::GetStringUTF16(IDS_APPMENU_TOOLTIP_UPDATE_AVAILABLE));
-  UpdateIcon(animate);
+  UpdateIcon();
 }
 
 void BrowserAppMenuButton::SetIsProminent(bool is_prominent) {
@@ -127,50 +110,20 @@
     UMA_HISTOGRAM_TIMES("Toolbar.AppMenuTimeToAction",
                         base::TimeTicks::Now() - menu_open_time);
   }
-
-  AnimateIconIfPossible(false);
-}
-
-gfx::Size BrowserAppMenuButton::CalculatePreferredSize() const {
-  const int icon_size = ui::MaterialDesignController::touch_ui() ? 24 : 16;
-  gfx::Rect rect(gfx::Size(icon_size, icon_size));
-  rect.Inset(-GetLayoutInsets(TOOLBAR_BUTTON));
-
-  return rect.size();
-}
-
-void BrowserAppMenuButton::Layout() {
-  if (new_icon_) {
-    new_icon_->SetBoundsRect(GetContentsBounds());
-    ink_drop_container()->SetBoundsRect(GetLocalBounds());
-    image()->SetBoundsRect(GetContentsBounds());
-  }
-
-  AppMenuButton::Layout();
 }
 
 void BrowserAppMenuButton::OnThemeChanged() {
-  UpdateIcon(false);
+  UpdateIcon();
 }
 
-void BrowserAppMenuButton::OnTabStripModelChanged(
-    TabStripModel* tab_strip_model,
-    const TabStripModelChange& change,
-    const TabStripSelectionChange& selection) {
-  if (change.type() != TabStripModelChange::kInserted)
-    return;
-
-  AnimateIconIfPossible(true);
-}
-
-void BrowserAppMenuButton::UpdateIcon(bool should_animate) {
+void BrowserAppMenuButton::UpdateIcon() {
   SkColor severity_color = gfx::kPlaceholderColor;
-  SkColor toolbar_icon_color =
-      GetThemeProvider()->GetColor(ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON);
+
   const ui::NativeTheme* native_theme = GetNativeTheme();
   switch (severity_) {
     case AppMenuIconController::Severity::NONE:
-      severity_color = toolbar_icon_color;
+      severity_color = GetThemeProvider()->GetColor(
+          ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON);
       break;
     case AppMenuIconController::Severity::LOW:
       severity_color = native_theme->GetSystemColor(
@@ -186,29 +139,6 @@
       break;
   }
 
-  if (should_use_new_icon_) {
-    if (!new_icon_) {
-      new_icon_ = new views::AnimatedIconView(kBrowserToolsAnimatedIcon);
-      new_icon_->set_can_process_events_within_subtree(false);
-      AddChildView(new_icon_);
-    }
-
-    // Only show a special color for severity when using the classic Chrome
-    // theme. Otherwise, we can't be sure that it contrasts with the toolbar
-    // background.
-    ThemeService* theme_service =
-        ThemeServiceFactory::GetForProfile(toolbar_view_->browser()->profile());
-    new_icon_->SetColor(theme_service->UsingSystemTheme() ||
-                                theme_service->UsingDefaultTheme()
-                            ? severity_color
-                            : toolbar_icon_color);
-
-    if (should_animate)
-      AnimateIconIfPossible(true);
-
-    return;
-  }
-
   const bool touch_ui = ui::MaterialDesignController::touch_ui();
   const gfx::VectorIcon* icon_id = nullptr;
   switch (type_) {
@@ -234,54 +164,23 @@
   if (margin == margin_trailing_)
     return;
   margin_trailing_ = margin;
-  UpdateThemedBorder();
+  UpdateBorder();
   InvalidateLayout();
 }
 
 void BrowserAppMenuButton::OnTouchUiChanged() {
-  UpdateIcon(false);
+  UpdateIcon();
+  UpdateBorder();
   PreferredSizeChanged();
 }
 
-void BrowserAppMenuButton::AnimateIconIfPossible(bool with_delay) {
-  if (!new_icon_ || !should_use_new_icon_ ||
-      severity_ == AppMenuIconController::Severity::NONE) {
-    return;
-  }
-
-  if (!should_delay_animation_ || !with_delay || new_icon_->IsAnimating()) {
-    animation_delay_timer_.Stop();
-    new_icon_->Animate(views::AnimatedIconView::END);
-    return;
-  }
-
-  if (!animation_delay_timer_.IsRunning()) {
-    animation_delay_timer_.Start(
-        FROM_HERE,
-        kDelayTime,
-        base::Bind(&BrowserAppMenuButton::AnimateIconIfPossible,
-                   base::Unretained(this),
-                   false));
-  }
-}
-
 const char* BrowserAppMenuButton::GetClassName() const {
   return "BrowserAppMenuButton";
 }
 
-std::unique_ptr<views::LabelButtonBorder>
-BrowserAppMenuButton::CreateDefaultBorder() const {
-  std::unique_ptr<views::LabelButtonBorder> border =
-      MenuButton::CreateDefaultBorder();
-
-  // Adjust border insets to follow the margin change,
-  // which will be reflected in where the border is painted
-  // through GetThemePaintRect().
-  gfx::Insets insets(border->GetInsets());
-  insets += gfx::Insets(0, 0, 0, margin_trailing_);
-  border->set_insets(insets);
-
-  return border;
+void BrowserAppMenuButton::UpdateBorder() {
+  SetBorder(views::CreateEmptyBorder(GetLayoutInsets(TOOLBAR_BUTTON) +
+                                     gfx::Insets(0, 0, 0, margin_trailing_)));
 }
 
 void BrowserAppMenuButton::OnBoundsChanged(const gfx::Rect& previous_bounds) {
@@ -307,12 +206,6 @@
   return bounds;
 }
 
-gfx::Rect BrowserAppMenuButton::GetThemePaintRect() const {
-  gfx::Rect rect(MenuButton::GetThemePaintRect());
-  rect.Inset(0, 0, margin_trailing_, 0);
-  return rect;
-}
-
 bool BrowserAppMenuButton::GetDropFormats(
     int* formats,
     std::set<ui::Clipboard::FormatType>* format_types) {
diff --git a/chrome/browser/ui/views/toolbar/browser_app_menu_button.h b/chrome/browser/ui/views/toolbar/browser_app_menu_button.h
index 9a0b823..ff631cc 100644
--- a/chrome/browser/ui/views/toolbar/browser_app_menu_button.h
+++ b/chrome/browser/ui/views/toolbar/browser_app_menu_button.h
@@ -10,32 +10,23 @@
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/scoped_observer.h"
-#include "base/timer/timer.h"
-#include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
 #include "chrome/browser/ui/toolbar/app_menu_icon_controller.h"
 #include "chrome/browser/ui/views/frame/app_menu_button.h"
 #include "ui/base/material_design/material_design_controller_observer.h"
-#include "ui/views/controls/animated_icon_view.h"
 #include "ui/views/view.h"
 
-namespace views {
-class LabelButtonBorder;
-}  // namespace views
-
 class ToolbarView;
 
 // The app menu button in the main browser window (as opposed to hosted app
 // windows, which is implemented in HostedAppMenuButton).
 class BrowserAppMenuButton : public AppMenuButton,
-                             public TabStripModelObserver,
                              public ui::MaterialDesignControllerObserver {
  public:
   explicit BrowserAppMenuButton(ToolbarView* toolbar_view);
   ~BrowserAppMenuButton() override;
 
   void SetSeverity(AppMenuIconController::IconType type,
-                   AppMenuIconController::Severity severity,
-                   bool animate);
+                   AppMenuIconController::Severity severity);
 
   AppMenuIconController::Severity severity() { return severity_; }
 
@@ -50,19 +41,10 @@
   // views::MenuButton:
   void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
   gfx::Rect GetAnchorBoundsInScreen() const override;
-  gfx::Size CalculatePreferredSize() const override;
-  void Layout() override;
   void OnThemeChanged() override;
 
-  // TabStripObserver:
-  void OnTabStripModelChanged(
-      TabStripModel* tab_strip_model,
-      const TabStripModelChange& change,
-      const TabStripSelectionChange& selection) override;
-
   // Updates the presentation according to |severity_| and the theme provider.
-  // If |should_animate| is true, the icon should animate.
-  void UpdateIcon(bool should_animate);
+  void UpdateIcon();
 
   // Sets |margin_trailing_| when the browser is maximized and updates layout
   // to make the focus rectangle centered.
@@ -77,17 +59,10 @@
   void OnTouchUiChanged() override;
 
  private:
-  // Animates the icon if possible. The icon will not animate if the severity
-  // level is none, |animation_| is nullptr or |should_use_new_icon_| is false.
-  // If |should_delay_animation_| and |with_delay| is true, then delay the
-  // animation.
-  void AnimateIconIfPossible(bool with_delay);
+  void UpdateBorder();
 
   // views::MenuButton:
   const char* GetClassName() const override;
-  std::unique_ptr<views::LabelButtonBorder> CreateDefaultBorder()
-      const override;
-  gfx::Rect GetThemePaintRect() const override;
   bool GetDropFormats(
       int* formats,
       std::set<ui::Clipboard::FormatType>* format_types) override;
@@ -106,22 +81,7 @@
   AppMenuIconController::IconType type_ = AppMenuIconController::IconType::NONE;
 
   // Our owning toolbar view.
-  ToolbarView* toolbar_view_;
-
-  // The view that depicts and animates the icon. TODO(estade): rename to
-  // |animated_icon_| when |should_use_new_icon_| defaults to true and is
-  // removed.
-  views::AnimatedIconView* new_icon_ = nullptr;
-
-  // Used to delay the animation. Not used if |should_delay_animation_| is
-  // false.
-  base::OneShotTimer animation_delay_timer_;
-
-  // True if the app menu should use the new animated icon.
-  bool should_use_new_icon_ = false;
-
-  // True if the kAnimatedAppMenuIcon feature's "HasDelay" param is true.
-  bool should_delay_animation_ = false;
+  ToolbarView* const toolbar_view_;
 
   // Any trailing margin to be applied. Used when the browser is in
   // a maximized state to extend to the full window width.
diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc
index 20a136c..5bcaff1 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -487,10 +487,16 @@
   //                http://crbug.com/5540
   const bool maximized =
       browser_->window() && browser_->window()->IsMaximized();
-  // The padding at either end of the toolbar.
-  const int end_padding = GetToolbarHorizontalPadding();
-  back_->SetLeadingMargin(maximized ? end_padding : 0);
-  back_->SetBounds(maximized ? 0 : end_padding, toolbar_button_y,
+
+  // When maximized, insert padding into the first and last control instead of
+  // padding outside of them.
+  const int end_padding = maximized ? 0 : GetToolbarHorizontalPadding();
+  const int end_control_internal_margin =
+      maximized ? GetToolbarHorizontalPadding() : 0;
+  back_->SetLeadingMargin(end_control_internal_margin);
+  app_menu_button_->SetTrailingMargin(end_control_internal_margin);
+
+  back_->SetBounds(end_padding, toolbar_button_y,
                    back_->GetPreferredSize().width(), toolbar_button_height);
   const int element_padding = GetLayoutConstant(TOOLBAR_ELEMENT_PADDING);
   int next_element_x = back_->bounds().right() + element_padding;
@@ -519,7 +525,7 @@
 
   next_element_x += GetLayoutConstant(TOOLBAR_STANDARD_SPACING);
 
-  int app_menu_width = app_menu_button_->GetPreferredSize().width();
+  const int app_menu_width = app_menu_button_->GetPreferredSize().width();
   const int right_padding = GetLayoutConstant(TOOLBAR_STANDARD_SPACING);
 
   // Note that the browser actions container has its own internal left and right
@@ -529,8 +535,8 @@
   int available_width = std::max(
       0,
       width() - end_padding - app_menu_width -
-      (browser_actions_->GetPreferredSize().IsEmpty() ? right_padding : 0) -
-      next_element_x);
+          (browser_actions_->GetPreferredSize().IsEmpty() ? right_padding : 0) -
+          next_element_x);
   if (cast_ && cast_->visible()) {
     available_width -= cast_->GetPreferredSize().width();
     available_width -= element_padding;
@@ -583,14 +589,6 @@
     next_element_x = avatar_->bounds().right() + element_padding;
   }
 
-  // Extend the app menu to the screen's right edge in maximized mode just like
-  // we extend the back button to the left edge.
-  if (maximized)
-    app_menu_width += end_padding;
-
-  // Set trailing margin before updating the bounds so OnBoundsChange can use
-  // the trailing margin.
-  app_menu_button_->SetTrailingMargin(maximized ? end_padding : 0);
   app_menu_button_->SetBounds(next_element_x, toolbar_button_y, app_menu_width,
                               toolbar_button_height);
 }
@@ -676,8 +674,7 @@
 
 // AppMenuIconController::Delegate:
 void ToolbarView::UpdateSeverity(AppMenuIconController::IconType type,
-                                 AppMenuIconController::Severity severity,
-                                 bool animate) {
+                                 AppMenuIconController::Severity severity) {
   // There's no app menu in tabless windows.
   if (!app_menu_button_)
     return;
@@ -688,7 +685,7 @@
         IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app);
   }
   app_menu_button_->SetAccessibleName(accname_app);
-  app_menu_button_->SetSeverity(type, severity, animate);
+  app_menu_button_->SetSeverity(type, severity);
 }
 
 // ToolbarButtonProvider:
@@ -812,7 +809,7 @@
   if (avatar_)
     avatar_->UpdateIcon();
 
-  app_menu_button_->UpdateIcon(false);
+  app_menu_button_->UpdateIcon();
 
   reload_->LoadImages();
 }
diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.h b/chrome/browser/ui/views/toolbar/toolbar_view.h
index 56abed72..62de79a 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_view.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -191,8 +191,7 @@
 
   // AppMenuIconController::Delegate:
   void UpdateSeverity(AppMenuIconController::IconType type,
-                      AppMenuIconController::Severity severity,
-                      bool animate) override;
+                      AppMenuIconController::Severity severity) override;
 
   // ToolbarButtonProvider:
   BrowserActionsContainer* GetBrowserActionsContainer() override;
diff --git a/chrome/browser/ui/webui/chromeos/first_run/first_run_handler.cc b/chrome/browser/ui/webui/chromeos/first_run/first_run_handler.cc
index 97562f8..5b5c071 100644
--- a/chrome/browser/ui/webui/chromeos/first_run/first_run_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/first_run/first_run_handler.cc
@@ -4,7 +4,6 @@
 
 #include "chrome/browser/ui/webui/chromeos/first_run/first_run_handler.h"
 
-#include "ash/public/cpp/ash_features.h"
 #include "base/bind.h"
 #include "base/values.h"
 #include "chromeos/chromeos_switches.h"
@@ -51,8 +50,6 @@
   step_params.SetKey(
       "voiceInteractionEnabled",
       base::Value(chromeos::switches::IsVoiceInteractionEnabled()));
-  step_params.SetKey("unifiedSystemTrayEnabled",
-                     base::Value(ash::features::IsSystemTrayUnifiedEnabled()));
 
   web_ui()->CallJavascriptFunctionUnsafe("cr.FirstRun.showStep", step_params);
 }
diff --git a/chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler.cc b/chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler.cc
index 371edb36..f204d4c 100644
--- a/chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler.cc
+++ b/chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler.cc
@@ -57,10 +57,6 @@
       base::BindRepeating(&EasyUnlockSettingsHandler::HandleGetEnabledStatus,
                           base::Unretained(this)));
   web_ui()->RegisterMessageCallback(
-      "easyUnlockStartTurnOnFlow",
-      base::BindRepeating(&EasyUnlockSettingsHandler::HandleStartTurnOnFlow,
-                          base::Unretained(this)));
-  web_ui()->RegisterMessageCallback(
       "easyUnlockGetTurnOffFlowStatus",
       base::BindRepeating(
           &EasyUnlockSettingsHandler::HandleGetTurnOffFlowStatus,
@@ -137,11 +133,6 @@
       *callback_id, base::Value(EasyUnlockService::Get(profile_)->IsEnabled()));
 }
 
-void EasyUnlockSettingsHandler::HandleStartTurnOnFlow(
-    const base::ListValue* args) {
-  EasyUnlockService::Get(profile_)->LaunchSetup();
-}
-
 void EasyUnlockSettingsHandler::HandleGetTurnOffFlowStatus(
     const base::ListValue* args) {
   CHECK_EQ(1U, args->GetSize());
diff --git a/chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler_unittest.cc b/chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler_unittest.cc
index f69e29c..8218652 100644
--- a/chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler_unittest.cc
+++ b/chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler_unittest.cc
@@ -56,7 +56,6 @@
  private:
   Type GetType() const override { return TYPE_REGULAR; }
   AccountId GetAccountId() const override { return EmptyAccountId(); }
-  void LaunchSetup() override {}
   void ClearPermitAccess() override {}
 
   const base::ListValue* GetRemoteDevices() const override { return nullptr; }
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 ed0b905..ee8ec878 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
@@ -1114,7 +1114,6 @@
 void AddEasyUnlockStrings(content::WebUIDataSource* html_source) {
   LocalizedString localized_strings[] = {
       {"easyUnlockSectionTitle", IDS_SETTINGS_EASY_UNLOCK_SECTION_TITLE},
-      {"easyUnlockSetupButton", IDS_SETTINGS_EASY_UNLOCK_SETUP},
       // Easy Unlock turn-off dialog.
       {"easyUnlockTurnOffButton", IDS_SETTINGS_EASY_UNLOCK_TURN_OFF},
       {"easyUnlockTurnOffOfflineTitle",
diff --git a/chrome/browser/ui/webui/welcome/nux/BUILD.gn b/chrome/browser/ui/webui/welcome/nux/BUILD.gn
deleted file mode 100644
index c7ec977c..0000000
--- a/chrome/browser/ui/webui/welcome/nux/BUILD.gn
+++ /dev/null
@@ -1,94 +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.
-
-import("//build/config/chrome_build.gni")
-
-source_set("constants") {
-  sources = [
-    "constants.cc",
-    "constants.h",
-  ]
-
-  public_deps = [
-    "//base",
-  ]
-}
-
-static_library("bookmark_item") {
-  sources = [
-    "bookmark_item.cc",
-    "bookmark_item.h",
-  ]
-
-  deps = [
-    "//base",
-    "//content/public/browser",
-  ]
-}
-
-static_library("bookmark_handler") {
-  sources = [
-    "bookmark_handler.cc",
-    "bookmark_handler.h",
-  ]
-
-  deps = [
-    "//base",
-    "//chrome/browser:resources",
-    "//components/bookmarks/common",
-    "//components/pref_registry",
-    "//components/prefs",
-    "//content/public/browser",
-  ]
-}
-
-static_library("email_feature") {
-  sources = [
-    "email_handler.cc",
-    "email_handler.h",
-  ]
-
-  public_deps = [
-    "//base",
-    "//net",
-    "//url",
-  ]
-
-  deps = [
-    ":bookmark_item",
-    "//chrome/app:generated_resources",
-    "//chrome/browser:resources",
-    "//components/favicon/core",
-    "//components/resources",
-    "//components/strings",
-    "//components/variations",
-    "//content/public/browser",
-    "//ui/base",
-  ]
-}
-
-static_library("google_apps_feature") {
-  sources = [
-    "google_apps_handler.cc",
-    "google_apps_handler.h",
-  ]
-
-  public_deps = [
-    "//base",
-    "//net",
-    "//url",
-  ]
-
-  deps = [
-    ":bookmark_item",
-    "//chrome/app:generated_resources",
-    "//chrome/browser:resources",
-    "//components/favicon/core",
-    "//components/resources",
-    "//components/strings",
-    "//components/variations",
-    "//content/public/browser",
-    "//ui/base",
-  ]
-}
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
index e966627..519291c9 100644
--- a/chrome/common/chrome_features.cc
+++ b/chrome/common/chrome_features.cc
@@ -43,8 +43,6 @@
 #endif  // defined(OS_MACOSX)
 
 #if !defined(OS_ANDROID)
-const base::Feature kAnimatedAppMenuIcon{"AnimatedAppMenuIcon",
-                                         base::FEATURE_DISABLED_BY_DEFAULT};
 const base::Feature kAppBanners {
   "AppBanners",
 #if defined(OS_CHROMEOS)
diff --git a/chrome/common/chrome_features.h b/chrome/common/chrome_features.h
index 9981797b..649d5ca 100644
--- a/chrome/common/chrome_features.h
+++ b/chrome/common/chrome_features.h
@@ -40,8 +40,6 @@
 #endif  // defined(OS_MACOSX)
 
 #if !defined(OS_ANDROID)
-COMPONENT_EXPORT(CHROME_FEATURES)
-extern const base::Feature kAnimatedAppMenuIcon;
 COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kAppBanners;
 #endif  // !defined(OS_ANDROID)
 
diff --git a/chrome/common/trace_event_args_whitelist.cc b/chrome/common/trace_event_args_whitelist.cc
index ca972938..9a50d01 100644
--- a/chrome/common/trace_event_args_whitelist.cc
+++ b/chrome/common/trace_event_args_whitelist.cc
@@ -42,6 +42,8 @@
     // static initialization of this struct.
     {TRACE_DISABLED_BY_DEFAULT("memory-infra"), "*", kMemoryDumpAllowedArgs},
     {TRACE_DISABLED_BY_DEFAULT("system_stats"), "*", nullptr},
+    {"ui", "QueryLinkedFontsFromRegistry", nullptr},
+    {"ui", "CachedFontLinkSettings::GetLinkedFonts", nullptr},
     {nullptr, nullptr, nullptr}};
 
 const char* kMetadataWhitelist[] = {"chrome-library-name",
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 322c649..b503d67 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -4803,7 +4803,6 @@
 
     if (use_aura) {
       sources += [ "../browser/ui/views/drag_and_drop_interactive_uitest.cc" ]
-      deps += [ "//ui/aura:aura_interactive_ui_tests" ]
     } else {
       sources -= [
         "base/interactive_test_utils_aura.cc",
diff --git a/chrome/test/data/android/render_tests/ContextualSuggestionsTest.full_height.Nexus_5-19.png b/chrome/test/data/android/render_tests/ContextualSuggestionsTest.full_height.Nexus_5-19.png
index e562e01..31c380c 100644
--- a/chrome/test/data/android/render_tests/ContextualSuggestionsTest.full_height.Nexus_5-19.png
+++ b/chrome/test/data/android/render_tests/ContextualSuggestionsTest.full_height.Nexus_5-19.png
Binary files differ
diff --git a/chrome/test/data/android/render_tests/ContextualSuggestionsTest.full_height_scrolled.Nexus_5-19.png b/chrome/test/data/android/render_tests/ContextualSuggestionsTest.full_height_scrolled.Nexus_5-19.png
index a2876fa..3ce7ed7 100644
--- a/chrome/test/data/android/render_tests/ContextualSuggestionsTest.full_height_scrolled.Nexus_5-19.png
+++ b/chrome/test/data/android/render_tests/ContextualSuggestionsTest.full_height_scrolled.Nexus_5-19.png
Binary files differ
diff --git a/chrome/test/data/android/render_tests/ContextualSuggestionsTest.suggestion_image_loaded.Nexus_5-19.png b/chrome/test/data/android/render_tests/ContextualSuggestionsTest.suggestion_image_loaded.Nexus_5-19.png
index d93e2e6..21d6f08 100644
--- a/chrome/test/data/android/render_tests/ContextualSuggestionsTest.suggestion_image_loaded.Nexus_5-19.png
+++ b/chrome/test/data/android/render_tests/ContextualSuggestionsTest.suggestion_image_loaded.Nexus_5-19.png
Binary files differ
diff --git a/chrome/test/data/android/render_tests/ContextualSuggestionsTest.suggestion_image_loading.Nexus_5-19.png b/chrome/test/data/android/render_tests/ContextualSuggestionsTest.suggestion_image_loading.Nexus_5-19.png
index 5283b10..9c5f9e6bd 100644
--- a/chrome/test/data/android/render_tests/ContextualSuggestionsTest.suggestion_image_loading.Nexus_5-19.png
+++ b/chrome/test/data/android/render_tests/ContextualSuggestionsTest.suggestion_image_loading.Nexus_5-19.png
Binary files differ
diff --git a/chrome/test/data/android/render_tests/ContextualSuggestionsTest.suggestion_offline.Nexus_5-19.png b/chrome/test/data/android/render_tests/ContextualSuggestionsTest.suggestion_offline.Nexus_5-19.png
index 555ef3f..6f58dd5 100644
--- a/chrome/test/data/android/render_tests/ContextualSuggestionsTest.suggestion_offline.Nexus_5-19.png
+++ b/chrome/test/data/android/render_tests/ContextualSuggestionsTest.suggestion_offline.Nexus_5-19.png
Binary files differ
diff --git a/chrome/test/data/webui/settings/easy_unlock_browsertest_chromeos.js b/chrome/test/data/webui/settings/easy_unlock_browsertest_chromeos.js
index 31cd55ba..304b4b0 100644
--- a/chrome/test/data/webui/settings/easy_unlock_browsertest_chromeos.js
+++ b/chrome/test/data/webui/settings/easy_unlock_browsertest_chromeos.js
@@ -39,7 +39,6 @@
     constructor() {
       super([
         'getEnabledStatus',
-        'startTurnOnFlow',
         'getTurnOffFlowStatus',
         'startTurnOffFlow',
         'cancelTurnOffFlow',
@@ -63,11 +62,6 @@
     }
 
     /** @override */
-    startTurnOnFlow() {
-      this.methodCalled('startTurnOnFlow');
-    }
-
-    /** @override */
     getTurnOffFlowStatus() {
       this.methodCalled('getTurnOffFlowStatus');
       return Promise.resolve('idle');
@@ -102,7 +96,6 @@
         easyUnlockSectionTitle: '',
         easyUnlockLearnMoreURL: '',
         easyUnlockSetupIntro: '',
-        easyUnlockSetupButton: '',
 
         easyUnlockDescription: '',
         easyUnlockTurnOffTitle: '',
@@ -119,24 +112,6 @@
       lockScreen = document.createElement('settings-lock-screen');
     });
 
-    test('setup button', function() {
-      document.body.appendChild(lockScreen);
-
-      return browserProxy.whenCalled('getEnabledStatus').then(function() {
-        assertTrue(lockScreen.easyUnlockAllowed_);
-        expectFalse(lockScreen.easyUnlockEnabled_);
-
-        Polymer.dom.flush();
-
-        const setupButton = lockScreen.$$('#easyUnlockSetup');
-        assertTrue(!!setupButton);
-        expectFalse(setupButton.hidden);
-
-        setupButton.click();
-        return browserProxy.whenCalled('startTurnOnFlow');
-      });
-    });
-
     test('turn off dialog', function() {
       browserProxy.setEnabledStatus(true);
       document.body.appendChild(lockScreen);
diff --git a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWebContentsActivity.java b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWebContentsActivity.java
index 2619d36b..eb80f09c 100644
--- a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWebContentsActivity.java
+++ b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWebContentsActivity.java
@@ -236,7 +236,10 @@
 
         // Similar condition for all single-click events.
         if (action == KeyEvent.ACTION_DOWN && event.getRepeatCount() == 0) {
-            if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER
+            if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER || keyCode == KeyEvent.KEYCODE_DPAD_LEFT
+                    || keyCode == KeyEvent.KEYCODE_MEDIA_REWIND
+                    || keyCode == KeyEvent.KEYCODE_DPAD_RIGHT
+                    || keyCode == KeyEvent.KEYCODE_MEDIA_FAST_FORWARD
                     || keyCode == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE
                     || keyCode == KeyEvent.KEYCODE_MEDIA_PLAY
                     || keyCode == KeyEvent.KEYCODE_MEDIA_PAUSE
diff --git a/chromecast/browser/cast_content_browser_client.cc b/chromecast/browser/cast_content_browser_client.cc
index 1689f49d..77ae173 100644
--- a/chromecast/browser/cast_content_browser_client.cc
+++ b/chromecast/browser/cast_content_browser_client.cc
@@ -168,8 +168,10 @@
       url_request_context_factory_(new URLRequestContextFactory()) {}
 
 CastContentBrowserClient::~CastContentBrowserClient() {
+#if BUILDFLAG(IS_CAST_USING_CMA_BACKEND)
   DCHECK(!media_resource_tracker_)
       << "ResetMediaResourceTracker was not called";
+#endif  // BUILDFLAG(IS_CAST_USING_CMA_BACKEND)
   content::BrowserThread::DeleteSoon(content::BrowserThread::IO, FROM_HERE,
                                      url_request_context_factory_.release());
 }
diff --git a/chromecast/media/BUILD.gn b/chromecast/media/BUILD.gn
index 9a408421..49762d79 100644
--- a/chromecast/media/BUILD.gn
+++ b/chromecast/media/BUILD.gn
@@ -78,7 +78,10 @@
   if (is_cast_using_cma_backend) {
     deps += [ "//chromecast/media/cma:unittests" ]
     if (is_android) {
-      deps += [ "//chromecast/media/cma/backend/android:audio_track_java" ]
+      deps += [
+        "//chromecast/media/cma/backend/android:audio_track_java",
+        "//media/base/android:media_java",
+      ]
       shard_timeout = 300
     }
   }
diff --git a/chromecast/media/audio/cast_audio_manager.cc b/chromecast/media/audio/cast_audio_manager.cc
index fbfbf4b..b73d597 100644
--- a/chromecast/media/audio/cast_audio_manager.cc
+++ b/chromecast/media/audio/cast_audio_manager.cc
@@ -10,11 +10,16 @@
 #include "base/bind.h"
 #include "base/callback.h"
 #include "base/location.h"
+#include "base/logging.h"
+#include "build/build_config.h"
 #include "chromecast/media/audio/cast_audio_mixer.h"
 #include "chromecast/media/audio/cast_audio_output_stream.h"
 #include "chromecast/media/cma/backend/cma_backend_factory.h"
 #include "chromecast/public/cast_media_shlib.h"
 #include "chromecast/public/media/media_pipeline_backend.h"
+#if defined(OS_ANDROID)
+#include "media/audio/android/audio_track_output_stream.h"
+#endif  // defined(OS_ANDROID)
 
 namespace {
 // TODO(alokp): Query the preferred value from media backend.
@@ -160,6 +165,20 @@
   }
 }
 
+::media::AudioOutputStream* CastAudioManager::MakeBitstreamOutputStream(
+    const ::media::AudioParameters& params,
+    const std::string& device_id,
+    const ::media::AudioManager::LogCallback& log_callback) {
+#if defined(OS_ANDROID)
+  DCHECK(params.IsBitstreamFormat());
+  return new ::media::AudioTrackOutputStream(this, params);
+#else
+  NOTREACHED() << " Not implemented on non-android platform.";
+  return ::media::AudioManagerBase::MakeBitstreamOutputStream(params, device_id,
+                                                              log_callback);
+#endif  // defined(OS_ANDROID)
+}
+
 ::media::AudioInputStream* CastAudioManager::MakeLinearInputStream(
     const ::media::AudioParameters& params,
     const std::string& device_id,
diff --git a/chromecast/media/audio/cast_audio_manager.h b/chromecast/media/audio/cast_audio_manager.h
index 11665b8..97852aa4 100644
--- a/chromecast/media/audio/cast_audio_manager.h
+++ b/chromecast/media/audio/cast_audio_manager.h
@@ -63,6 +63,10 @@
       const ::media::AudioParameters& params,
       const std::string& device_id,
       const ::media::AudioManager::LogCallback& log_callback) override;
+  ::media::AudioOutputStream* MakeBitstreamOutputStream(
+      const ::media::AudioParameters& params,
+      const std::string& device_id,
+      const ::media::AudioManager::LogCallback& log_callback) override;
   ::media::AudioInputStream* MakeLinearInputStream(
       const ::media::AudioParameters& params,
       const std::string& device_id,
diff --git a/chromecast/media/audio/cast_audio_manager_unittest.cc b/chromecast/media/audio/cast_audio_manager_unittest.cc
index d0d9d7f..4c709a9 100644
--- a/chromecast/media/audio/cast_audio_manager_unittest.cc
+++ b/chromecast/media/audio/cast_audio_manager_unittest.cc
@@ -10,6 +10,7 @@
 
 #include "base/bind.h"
 #include "base/test/scoped_task_environment.h"
+#include "build/build_config.h"
 #include "chromecast/common/mojom/constants.mojom.h"
 #include "chromecast/common/mojom/multiroom.mojom.h"
 #include "chromecast/media/cma/backend/cma_backend.h"
@@ -23,6 +24,9 @@
 #include "services/service_manager/public/cpp/connector.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#if defined(OS_ANDROID)
+#include "media/audio/android/audio_track_output_stream.h"
+#endif  // defined(OS_ANDROID)
 
 using testing::_;
 using testing::AnyNumber;
@@ -189,6 +193,29 @@
   stream->Close();
 }
 
+#if defined(OS_ANDROID)
+TEST_F(CastAudioManagerTest, CanMakeAC3Stream) {
+  const ::media::AudioParameters kAC3AudioParams(
+      ::media::AudioParameters::AUDIO_BITSTREAM_AC3,
+      ::media::CHANNEL_LAYOUT_5_1, ::media::AudioParameters::kAudioCDSampleRate,
+      256);
+  ::media::AudioOutputStream* stream = audio_manager_->MakeAudioOutputStream(
+      kAC3AudioParams, "", ::media::AudioManager::LogCallback());
+  EXPECT_TRUE(stream->Open());
+
+  EXPECT_CALL(mock_source_callback_, OnMoreData(_, _, _, _))
+      .WillRepeatedly(Invoke(OnMoreData));
+  EXPECT_CALL(mock_source_callback_, OnError()).Times(0);
+  stream->Start(&mock_source_callback_);
+  scoped_task_environment_.RunUntilIdle();
+
+  stream->Stop();
+  scoped_task_environment_.RunUntilIdle();
+
+  stream->Close();
+}
+#endif  // defined(OS_ANDROID)
+
 TEST_F(CastAudioManagerTest, CanMakeStreamProxy) {
   SetUpBackendAndDecoder();
   ::media::AudioOutputStream* stream =
diff --git a/chromecast/renderer/media/key_systems_cast.cc b/chromecast/renderer/media/key_systems_cast.cc
index 65e0115..e1463509 100644
--- a/chromecast/renderer/media/key_systems_cast.cc
+++ b/chromecast/renderer/media/key_systems_cast.cc
@@ -112,7 +112,7 @@
 };
 #endif  // BUILDFLAG(ENABLE_PLAYREADY)
 
-#if BUILDFLAG(IS_CAST_USING_CMA_BACKEND)
+#if BUILDFLAG(USE_CHROMECAST_CDMS)
 SupportedCodecs GetCastEmeSupportedCodecs() {
   SupportedCodecs codecs = ::media::EME_CODEC_AAC | ::media::EME_CODEC_AVC1 |
                            ::media::EME_CODEC_VP9_PROFILE0 |
@@ -218,7 +218,7 @@
         key_systems_properties,
     bool enable_persistent_license_support,
     bool force_software_crypto) {
-#if BUILDFLAG(IS_CAST_USING_CMA_BACKEND)
+#if BUILDFLAG(USE_CHROMECAST_CDMS)
   AddCmaKeySystems(key_systems_properties, enable_persistent_license_support);
 #elif defined(OS_ANDROID)
   AddCastAndroidKeySystems(key_systems_properties);
diff --git a/chromeos/components/drivefs/drivefs_host.cc b/chromeos/components/drivefs/drivefs_host.cc
index 43904b2..42aa36c 100644
--- a/chromeos/components/drivefs/drivefs_host.cc
+++ b/chromeos/components/drivefs/drivefs_host.cc
@@ -281,6 +281,13 @@
     token_fetch_attempted_ = true;
   }
 
+  void OnHeartbeat() override {
+    DCHECK_CALLED_ON_VALID_SEQUENCE(host_->sequence_checker_);
+    if (host_->timer_->IsRunning()) {
+      host_->timer_->Reset();
+    }
+  }
+
   void OnMounted() override {
     DCHECK_CALLED_ON_VALID_SEQUENCE(host_->sequence_checker_);
     drivefs_has_mounted_ = true;
diff --git a/chromeos/components/drivefs/mojom/drivefs.mojom b/chromeos/components/drivefs/mojom/drivefs.mojom
index 740239e..73cb133f 100644
--- a/chromeos/components/drivefs/mojom/drivefs.mojom
+++ b/chromeos/components/drivefs/mojom/drivefs.mojom
@@ -95,6 +95,9 @@
 
   // Invoked whenever a Team Drive root changes or gets deleted.
   OnTeamDriveChanged(string team_drive_id, CreateOrDelete change_type);
+
+  // Invoked from time to time to indicate that drivefs is operational.
+  OnHeartbeat();
 };
 
 struct DriveFsConfiguration {
diff --git a/components/metrics/metrics_log.cc b/components/metrics/metrics_log.cc
index 37937fb..07609a1 100644
--- a/components/metrics/metrics_log.cc
+++ b/components/metrics/metrics_log.cc
@@ -193,9 +193,18 @@
   metrics::SystemProfileProto::OS* os = system_profile->mutable_os();
   os->set_name(base::SysInfo::OperatingSystemName());
   os->set_version(base::SysInfo::OperatingSystemVersion());
+
+// On ChromeOS, KernelVersion refers to the Linux kernel version and
+// OperatingSystemVersion refers to the ChromeOS release version.
 #if defined(OS_CHROMEOS)
   os->set_kernel_version(base::SysInfo::KernelVersion());
-#elif defined(OS_ANDROID)
+#elif defined(OS_LINUX)
+  // Linux operating system version is copied over into kernel version to be
+  // consistent.
+  os->set_kernel_version(base::SysInfo::OperatingSystemVersion());
+#endif
+
+#if defined(OS_ANDROID)
   os->set_build_fingerprint(
       base::android::BuildInfo::GetInstance()->android_build_fp());
   std::string package_name = client->GetAppPackageName();
diff --git a/components/metrics/metrics_log_unittest.cc b/components/metrics/metrics_log_unittest.cc
index 1de30bf..5b28a9a 100644
--- a/components/metrics/metrics_log_unittest.cc
+++ b/components/metrics/metrics_log_unittest.cc
@@ -157,6 +157,9 @@
 #if defined(OS_CHROMEOS)
   system_profile->mutable_os()->set_kernel_version(
       base::SysInfo::KernelVersion());
+#elif defined(OS_LINUX)
+  system_profile->mutable_os()->set_kernel_version(
+      base::SysInfo::OperatingSystemVersion());
 #elif defined(OS_ANDROID)
   system_profile->mutable_os()->set_build_fingerprint(
       base::android::BuildInfo::GetInstance()->android_build_fp());
diff --git a/components/omnibox/browser/BUILD.gn b/components/omnibox/browser/BUILD.gn
index 41b56804..e370130 100644
--- a/components/omnibox/browser/BUILD.gn
+++ b/components/omnibox/browser/BUILD.gn
@@ -173,8 +173,6 @@
     "tailored_word_break_iterator.h",
     "titled_url_match_utils.cc",
     "titled_url_match_utils.h",
-    "toolbar_field_trial.cc",
-    "toolbar_field_trial.h",
     "toolbar_model.h",
     "toolbar_model_delegate.cc",
     "toolbar_model_delegate.h",
diff --git a/components/omnibox/browser/omnibox_field_trial.cc b/components/omnibox/browser/omnibox_field_trial.cc
index 156ae1e..6a3c2a0 100644
--- a/components/omnibox/browser/omnibox_field_trial.cc
+++ b/components/omnibox/browser/omnibox_field_trial.cc
@@ -34,6 +34,56 @@
 
 namespace omnibox {
 
+// Feature used to hide the scheme from steady state URLs displayed in the
+// toolbar. It is restored during editing.
+const base::Feature kHideFileUrlScheme{"OmniboxUIExperimentHideFileUrlScheme",
+                                       base::FEATURE_ENABLED_BY_DEFAULT};
+
+// Feature used to hide the scheme from steady state URLs displayed in the
+// toolbar. It is restored during editing.
+const base::Feature kHideSteadyStateUrlScheme {
+  "OmniboxUIExperimentHideSteadyStateUrlScheme",
+#if defined(OS_IOS)
+      base::FEATURE_ENABLED_BY_DEFAULT
+#else
+      base::FEATURE_DISABLED_BY_DEFAULT
+#endif
+};
+
+// Feature used to hide trivial subdomains from steady state URLs displayed in
+// the toolbar. It is restored during editing.
+const base::Feature kHideSteadyStateUrlTrivialSubdomains {
+  "OmniboxUIExperimentHideSteadyStateUrlTrivialSubdomains",
+#if defined(OS_IOS)
+      base::FEATURE_ENABLED_BY_DEFAULT
+#else
+      base::FEATURE_DISABLED_BY_DEFAULT
+#endif
+};
+
+// Feature used to hide the path, query and ref from steady state URLs
+// displayed in the toolbar. It is restored during editing.
+const base::Feature kHideSteadyStateUrlPathQueryAndRef {
+  "OmniboxUIExperimentHideSteadyStateUrlPathQueryAndRef",
+#if defined(OS_IOS)
+      base::FEATURE_ENABLED_BY_DEFAULT
+#else
+      base::FEATURE_DISABLED_BY_DEFAULT
+#endif
+};
+
+// This feature simplifies the security indiciator UI for https:// pages. The
+// exact UI treatment is dependent on the parameter 'treatment' which can have
+// the following value:
+// - 'ev-to-secure': Show the "Secure" chip for pages with an EV certificate.
+// - 'secure-to-lock': Show only the lock icon for non-EV https:// pages.
+// - 'both-to-lock': Show only the lock icon for all https:// pages.
+// - 'keep-secure-chip': Show the old "Secure" chip for non-EV https:// pages.
+// The default behavior is the same as 'secure-to-lock'.
+// This feature is used for EV UI removal experiment (https://crbug.com/803501).
+const base::Feature kSimplifyHttpsIndicator{"SimplifyHttpsIndicator",
+                                            base::FEATURE_DISABLED_BY_DEFAULT};
+
 // Feature used to enable entity suggestion images and enhanced presentation
 // showing more context and descriptive text about the entity.
 const base::Feature kOmniboxRichEntitySuggestions{
@@ -756,6 +806,17 @@
       omnibox::kUIExperimentJogTextfieldOnPopup);
 }
 
+bool OmniboxFieldTrial::IsHideSteadyStateUrlSchemeEnabled() {
+  return base::FeatureList::IsEnabled(omnibox::kHideSteadyStateUrlScheme) ||
+         base::FeatureList::IsEnabled(features::kExperimentalUi);
+}
+
+bool OmniboxFieldTrial::IsHideSteadyStateUrlTrivialSubdomainsEnabled() {
+  return base::FeatureList::IsEnabled(
+             omnibox::kHideSteadyStateUrlTrivialSubdomains) ||
+         base::FeatureList::IsEnabled(features::kExperimentalUi);
+}
+
 bool OmniboxFieldTrial::IsShowSuggestionFaviconsEnabled() {
   return base::FeatureList::IsEnabled(
              omnibox::kUIExperimentShowSuggestionFavicons) ||
@@ -839,6 +900,17 @@
 const char OmniboxFieldTrial::kPedalSuggestionModeParam[] =
     "PedalSuggestionMode";
 
+const char OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterName[] =
+    "treatment";
+const char OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterEvToSecure[] =
+    "ev-to-secure";
+const char OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterSecureToLock[] =
+    "secure-to-lock";
+const char OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterBothToLock[] =
+    "both-to-lock";
+const char OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterKeepSecureChip[] =
+    "keep-secure-chip";
+
 const char OmniboxFieldTrial::kZeroSuggestRedirectToChromeExperimentIdParam[] =
     "ZeroSuggestRedirectToChromeExperimentID";
 const char OmniboxFieldTrial::kZeroSuggestRedirectToChromeServerAddressParam[] =
diff --git a/components/omnibox/browser/omnibox_field_trial.h b/components/omnibox/browser/omnibox_field_trial.h
index 4e5fa75..fb054d6 100644
--- a/components/omnibox/browser/omnibox_field_trial.h
+++ b/components/omnibox/browser/omnibox_field_trial.h
@@ -25,6 +25,11 @@
 
 namespace omnibox {
 
+extern const base::Feature kHideFileUrlScheme;
+extern const base::Feature kHideSteadyStateUrlScheme;
+extern const base::Feature kHideSteadyStateUrlTrivialSubdomains;
+extern const base::Feature kHideSteadyStateUrlPathQueryAndRef;
+extern const base::Feature kSimplifyHttpsIndicator;
 extern const base::Feature kOmniboxRichEntitySuggestions;
 extern const base::Feature kOmniboxNewAnswerLayout;
 extern const base::Feature kOmniboxReverseAnswers;
@@ -422,7 +427,7 @@
       const AutocompleteInput& input);
 
   // ---------------------------------------------------------
-  // For tab switch suggestions related experiments.
+  // For UI experiments.
 
   // Returns true if the rich entities flag is enabled.
   static bool IsRichEntitySuggestionsEnabled();
@@ -445,6 +450,14 @@
   // Returns true if the jog textfield flag is enabled.
   static bool IsJogTextfieldOnPopupEnabled();
 
+  // Returns true if either the steady-state elision flag for scheme or the
+  // #upcoming-ui-features flag is enabled.
+  static bool IsHideSteadyStateUrlSchemeEnabled();
+
+  // Returns true if either the steady-state elision flag for trivial
+  // subdomains or the #upcoming-ui-features flag is enabled.
+  static bool IsHideSteadyStateUrlTrivialSubdomainsEnabled();
+
   // Returns true if either the show suggestion favicons flag or the
   // #upcoming-ui-features flag is enabled.
   static bool IsShowSuggestionFaviconsEnabled();
@@ -514,6 +527,13 @@
   static const char kUIVerticalMarginParam[];
   static const char kPedalSuggestionModeParam[];
 
+  // Parameter name and values used by the Simplify HTTPS experiment.
+  static const char kSimplifyHttpsIndicatorParameterName[];
+  static const char kSimplifyHttpsIndicatorParameterEvToSecure[];
+  static const char kSimplifyHttpsIndicatorParameterSecureToLock[];
+  static const char kSimplifyHttpsIndicatorParameterBothToLock[];
+  static const char kSimplifyHttpsIndicatorParameterKeepSecureChip[];
+
   // Parameter names used by Zero Suggest Redirect to Chrome.
   static const char kZeroSuggestRedirectToChromeExperimentIdParam[];
   static const char kZeroSuggestRedirectToChromeServerAddressParam[];
diff --git a/components/omnibox/browser/toolbar_field_trial.cc b/components/omnibox/browser/toolbar_field_trial.cc
deleted file mode 100644
index ad87abc..0000000
--- a/components/omnibox/browser/toolbar_field_trial.cc
+++ /dev/null
@@ -1,65 +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 "components/omnibox/browser/toolbar_field_trial.h"
-
-#include "base/feature_list.h"
-#include "build/build_config.h"
-#include "ui/base/ui_base_features.h"
-
-namespace toolbar {
-namespace features {
-
-const base::Feature kHideSteadyStateUrlScheme {
-  "OmniboxUIExperimentHideSteadyStateUrlScheme",
-#if defined(OS_IOS)
-      base::FEATURE_ENABLED_BY_DEFAULT
-#else
-      base::FEATURE_DISABLED_BY_DEFAULT
-#endif
-};
-
-const base::Feature kHideSteadyStateUrlTrivialSubdomains {
-  "OmniboxUIExperimentHideSteadyStateUrlTrivialSubdomains",
-#if defined(OS_IOS)
-      base::FEATURE_ENABLED_BY_DEFAULT
-#else
-      base::FEATURE_DISABLED_BY_DEFAULT
-#endif
-};
-
-const base::Feature kHideFileUrlScheme{"OmniboxUIExperimentHideFileUrlScheme",
-                                       base::FEATURE_ENABLED_BY_DEFAULT};
-
-const base::Feature kHideSteadyStateUrlPathQueryAndRef {
-  "OmniboxUIExperimentHideSteadyStateUrlPathQueryAndRef",
-#if defined(OS_IOS)
-      base::FEATURE_ENABLED_BY_DEFAULT
-#else
-      base::FEATURE_DISABLED_BY_DEFAULT
-#endif
-};
-
-bool IsHideSteadyStateUrlSchemeEnabled() {
-  return base::FeatureList::IsEnabled(kHideSteadyStateUrlScheme) ||
-         base::FeatureList::IsEnabled(::features::kExperimentalUi);
-}
-
-bool IsHideSteadyStateUrlTrivialSubdomainsEnabled() {
-  return base::FeatureList::IsEnabled(kHideSteadyStateUrlTrivialSubdomains) ||
-         base::FeatureList::IsEnabled(::features::kExperimentalUi);
-}
-
-// Features used for EV UI removal experiment (https://crbug.com/803501).
-const base::Feature kSimplifyHttpsIndicator{"SimplifyHttpsIndicator",
-                                            base::FEATURE_DISABLED_BY_DEFAULT};
-const char kSimplifyHttpsIndicatorParameterName[] = "treatment";
-const char kSimplifyHttpsIndicatorParameterEvToSecure[] = "ev-to-secure";
-const char kSimplifyHttpsIndicatorParameterSecureToLock[] = "secure-to-lock";
-const char kSimplifyHttpsIndicatorParameterBothToLock[] = "both-to-lock";
-const char kSimplifyHttpsIndicatorParameterKeepSecureChip[] =
-    "keep-secure-chip";
-
-}  // namespace features
-}  // namespace toolbar
diff --git a/components/omnibox/browser/toolbar_field_trial.h b/components/omnibox/browser/toolbar_field_trial.h
deleted file mode 100644
index a67d04c6..0000000
--- a/components/omnibox/browser/toolbar_field_trial.h
+++ /dev/null
@@ -1,59 +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 COMPONENTS_OMNIBOX_BROWSER_TOOLBAR_FIELD_TRIAL_H_
-#define COMPONENTS_OMNIBOX_BROWSER_TOOLBAR_FIELD_TRIAL_H_
-
-#include "base/feature_list.h"
-
-namespace toolbar {
-namespace features {
-
-// Feature used to hide the scheme from steady state URLs displayed in the
-// toolbar. It is restored during editing.
-extern const base::Feature kHideSteadyStateUrlScheme;
-
-// Feature used to hide trivial subdomains from steady state URLs displayed in
-// the toolbar. It is restored during editing.
-extern const base::Feature kHideSteadyStateUrlTrivialSubdomains;
-
-// Feature used to hide the file scheme from URLs displayed in the toolbar.
-// It is restored during editing.
-extern const base::Feature kHideFileUrlScheme;
-
-// Feature used to hide the path, query and ref from steady state URLs
-// displayed in the toolbar. It is restored during editing.
-extern const base::Feature kHideSteadyStateUrlPathQueryAndRef;
-
-// Returns true if either the steady-state elision flag for scheme or the
-// #upcoming-ui-features flag is enabled.
-bool IsHideSteadyStateUrlSchemeEnabled();
-
-// Returns true if either the steady-state elision flag for trivial
-// subdomains or the #upcoming-ui-features flag is enabled.
-bool IsHideSteadyStateUrlTrivialSubdomainsEnabled();
-
-// This feature simplifies the security indiciator UI for https:// pages. The
-// exact UI treatment is dependent on the parameter 'treatment' which can have
-// the following value:
-// - 'ev-to-secure': Show the "Secure" chip for pages with an EV certificate.
-// - 'secure-to-lock': Show only the lock icon for non-EV https:// pages.
-// - 'both-to-lock': Show only the lock icon for all https:// pages.
-// - 'keep-secure-chip': Show the old "Secure" chip for non-EV https:// pages.
-// The default behavior is the same as 'secure-to-lock'.
-extern const base::Feature kSimplifyHttpsIndicator;
-
-// The parameter name which controls the UI treatment.
-extern const char kSimplifyHttpsIndicatorParameterName[];
-
-// The different parameter values, described above.
-extern const char kSimplifyHttpsIndicatorParameterEvToSecure[];
-extern const char kSimplifyHttpsIndicatorParameterSecureToLock[];
-extern const char kSimplifyHttpsIndicatorParameterBothToLock[];
-extern const char kSimplifyHttpsIndicatorParameterKeepSecureChip[];
-
-}  // namespace features
-}  // namespace toolbar
-
-#endif  // COMPONENTS_OMNIBOX_BROWSER_TOOLBAR_FIELD_TRIAL_H_
diff --git a/components/omnibox/browser/toolbar_model_impl.cc b/components/omnibox/browser/toolbar_model_impl.cc
index 4feb18f6..9dccb81 100644
--- a/components/omnibox/browser/toolbar_model_impl.cc
+++ b/components/omnibox/browser/toolbar_model_impl.cc
@@ -11,7 +11,7 @@
 #include "base/time/time.h"
 #include "build/build_config.h"
 #include "components/omnibox/browser/buildflags.h"
-#include "components/omnibox/browser/toolbar_field_trial.h"
+#include "components/omnibox/browser/omnibox_field_trial.h"
 #include "components/omnibox/browser/toolbar_model_delegate.h"
 #include "components/prefs/pref_service.h"
 #include "components/security_state/core/security_state.h"
@@ -49,18 +49,18 @@
   format_types |= url_formatter::kFormatUrlTrimAfterHost;
 #else
   if (base::FeatureList::IsEnabled(
-          toolbar::features::kHideSteadyStateUrlPathQueryAndRef)) {
+          omnibox::kHideSteadyStateUrlPathQueryAndRef)) {
     format_types |= url_formatter::kFormatUrlTrimAfterHost;
   }
 #endif
 
-  if (toolbar::features::IsHideSteadyStateUrlSchemeEnabled())
+  if (OmniboxFieldTrial::IsHideSteadyStateUrlSchemeEnabled())
     format_types |= url_formatter::kFormatUrlOmitHTTPS;
 
-  if (toolbar::features::IsHideSteadyStateUrlTrivialSubdomainsEnabled())
+  if (OmniboxFieldTrial::IsHideSteadyStateUrlTrivialSubdomainsEnabled())
     format_types |= url_formatter::kFormatUrlOmitTrivialSubdomains;
 
-  if (base::FeatureList::IsEnabled(toolbar::features::kHideFileUrlScheme))
+  if (base::FeatureList::IsEnabled(omnibox::kHideFileUrlScheme))
     format_types |= url_formatter::kFormatUrlOmitFileScheme;
 
   return GetFormattedURL(format_types);
@@ -177,26 +177,26 @@
 
   // Security UI study (https://crbug.com/803501): Change EV/Secure text.
   const std::string parameter =
-      base::FeatureList::IsEnabled(toolbar::features::kSimplifyHttpsIndicator)
+      base::FeatureList::IsEnabled(omnibox::kSimplifyHttpsIndicator)
           ? base::GetFieldTrialParamValueByFeature(
-                toolbar::features::kSimplifyHttpsIndicator,
-                toolbar::features::kSimplifyHttpsIndicatorParameterName)
+                omnibox::kSimplifyHttpsIndicator,
+                OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterName)
           : std::string();
 
   auto security_level = GetSecurityLevel(false);
   if (security_level == security_state::EV_SECURE) {
     if (parameter ==
-        toolbar::features::kSimplifyHttpsIndicatorParameterEvToSecure) {
+        OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterEvToSecure) {
       return l10n_util::GetStringUTF16(IDS_SECURE_VERBOSE_STATE);
     }
     if (parameter ==
-        toolbar::features::kSimplifyHttpsIndicatorParameterBothToLock) {
+        OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterBothToLock) {
       return base::string16();
     }
   }
   if (security_level == security_state::SECURE) {
     if (parameter !=
-        toolbar::features::kSimplifyHttpsIndicatorParameterKeepSecureChip) {
+        OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterKeepSecureChip) {
       return base::string16();
     }
   }
diff --git a/components/omnibox/browser/toolbar_model_impl_unittest.cc b/components/omnibox/browser/toolbar_model_impl_unittest.cc
index 8e182637..df2f6d6 100644
--- a/components/omnibox/browser/toolbar_model_impl_unittest.cc
+++ b/components/omnibox/browser/toolbar_model_impl_unittest.cc
@@ -6,7 +6,7 @@
 
 #include "base/strings/utf_string_conversions.h"
 #include "base/test/scoped_feature_list.h"
-#include "components/omnibox/browser/toolbar_field_trial.h"
+#include "components/omnibox/browser/omnibox_field_trial.h"
 #include "components/omnibox/browser/toolbar_model_delegate.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "url/gurl.h"
@@ -36,10 +36,9 @@
 TEST(ToolbarModelImplTest,
      DisplayUrlAppliesFormattedStringWithEquivalentMeaning) {
   base::test::ScopedFeatureList feature_list;
-  feature_list.InitWithFeatures(
-      {toolbar::features::kHideSteadyStateUrlScheme,
-       toolbar::features::kHideSteadyStateUrlTrivialSubdomains},
-      {});
+  feature_list.InitWithFeatures({omnibox::kHideSteadyStateUrlScheme,
+                                 omnibox::kHideSteadyStateUrlTrivialSubdomains},
+                                {});
 
   FakeToolbarModelDelegate delegate;
   auto model = std::make_unique<ToolbarModelImpl>(&delegate, 1024);
diff --git a/components/security_state/content/content_utils.cc b/components/security_state/content/content_utils.cc
index 4a669ec6..ca222c3 100644
--- a/components/security_state/content/content_utils.cc
+++ b/components/security_state/content/content_utils.cc
@@ -59,6 +59,20 @@
 void ExplainHTTPSecurity(
     const security_state::SecurityInfo& security_info,
     content::SecurityStyleExplanations* security_style_explanations) {
+  // If the page triggers an HTTP-Bad dangerous warning, then override the main
+  // summary for the page and add a bullet describing the issue.
+  if (security_info.security_level == security_state::DANGEROUS &&
+      !security_info.scheme_is_cryptographic) {
+    security_style_explanations->summary =
+        l10n_util::GetStringUTF8(IDS_EDITED_NONSECURE_SUMMARY);
+    if (security_info.insecure_input_events.insecure_field_edited) {
+      security_style_explanations->insecure_explanations.push_back(
+          content::SecurityStyleExplanation(
+              l10n_util::GetStringUTF8(IDS_EDITED_NONSECURE),
+              l10n_util::GetStringUTF8(IDS_EDITED_NONSECURE_DESCRIPTION)));
+    }
+  }
+
   if (security_info.security_level != security_state::HTTP_SHOW_WARNING)
     return;
 
diff --git a/components/security_state/content/content_utils_unittest.cc b/components/security_state/content/content_utils_unittest.cc
index 40b1d4f..2f6bf1e 100644
--- a/components/security_state/content/content_utils_unittest.cc
+++ b/components/security_state/content/content_utils_unittest.cc
@@ -711,6 +711,22 @@
   EXPECT_EQ(1u, explanations.neutral_explanations.size());
 }
 
+// Tests that a security level of DANGEROUS on an HTTP page with insecure form
+// edits produces blink::WebSecurityStyleInsecure and an explanation.
+TEST(SecurityStateContentUtilsTest, HTTPDangerous) {
+  security_state::SecurityInfo security_info;
+  content::SecurityStyleExplanations explanations;
+  security_info.security_level = security_state::DANGEROUS;
+  security_info.scheme_is_cryptographic = false;
+  security_info.insecure_input_events.insecure_field_edited = true;
+  blink::WebSecurityStyle security_style =
+      GetSecurityStyle(security_info, &explanations);
+  // Verify that the security style was downgraded and an explanation shown
+  // because a form was edited.
+  EXPECT_EQ(blink::kWebSecurityStyleInsecure, security_style);
+  EXPECT_EQ(1u, explanations.insecure_explanations.size());
+}
+
 // Tests that an explanation is provided if a certificate is missing a
 // subjectAltName extension containing a domain name or IP address.
 TEST(SecurityStateContentUtilsTest, SubjectAltNameWarning) {
diff --git a/components/security_state_strings.grdp b/components/security_state_strings.grdp
index 8aa8d5e..b649d6f6 100644
--- a/components/security_state_strings.grdp
+++ b/components/security_state_strings.grdp
@@ -13,7 +13,10 @@
   <message name="IDS_INCOGNITO_NONSECURE_DESCRIPTION" desc="Description of a security problem where the site is non-secure (HTTP) and the user is browsing Incognito, which results in an omnibox warning." translateable="false">
     This page was loaded non-securely in an incognito window. A warning has been added to the URL bar.
   </message>
-   <message name="IDS_EDITED_NONSECURE" desc="Summary phrase for a security problem where the site is non-secure (HTTP) and user has entered data in a form field." translateable="false">
+  <message name="IDS_EDITED_NONSECURE_SUMMARY" desc="Main summary for an HTTP page where a user has entered data in a form field." translateable="false">
+    This page is insecure (unencrypted HTTP).
+  </message>
+  <message name="IDS_EDITED_NONSECURE" desc="Summary phrase for a security problem where the site is non-secure (HTTP) and user has entered data in a form field." translateable="false">
     Form field edited on a non-secure page
   </message>
   <message name="IDS_EDITED_NONSECURE_DESCRIPTION" desc="Description of a security problem where the site is non-secure (HTTP) and user has entered data in a form field." translateable="false">
diff --git a/components/ui_devtools/devtools_server.cc b/components/ui_devtools/devtools_server.cc
index 02affb66..dedc461b 100644
--- a/components/ui_devtools/devtools_server.cc
+++ b/components/ui_devtools/devtools_server.cc
@@ -11,6 +11,8 @@
 #include "base/command_line.h"
 #include "base/format_macros.h"
 #include "base/message_loop/message_loop.h"
+#include "base/metrics/user_metrics.h"
+#include "base/metrics/user_metrics_action.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/stringprintf.h"
 #include "base/values.h"
@@ -156,7 +158,7 @@
 
 // HttpServer::Delegate Implementation
 void UiDevToolsServer::OnConnect(int connection_id) {
-  NOTIMPLEMENTED();
+  base::RecordAction(base::UserMetricsAction("UI_DevTools_Connect"));
 }
 
 void UiDevToolsServer::OnHttpRequest(
diff --git a/components/url_formatter/url_fixer.cc b/components/url_formatter/url_fixer.cc
index c39bd73..e1f05c5 100644
--- a/components/url_formatter/url_fixer.cc
+++ b/components/url_formatter/url_fixer.cc
@@ -553,10 +553,11 @@
 
   // 'about:blank' is special-cased in various places in the code so it
   // shouldn't be transformed into 'chrome://blank' as the code below will do.
-  // Instead, just make sure it's all lowercase, so direct string comparisons
-  // elsewhere will work.
-  if (base::LowerCaseEqualsASCII(trimmed, url::kAboutBlankURL))
-    return GURL(url::kAboutBlankURL);
+  if (base::LowerCaseEqualsASCII(scheme, url::kAboutScheme)) {
+    GURL about_url(base::ToLowerASCII(trimmed));
+    if (about_url.IsAboutBlank())
+      return about_url;
+  }
 
   // Parse and rebuild about: and chrome: URLs.
   bool chrome_url =
diff --git a/components/url_formatter/url_fixer_unittest.cc b/components/url_formatter/url_fixer_unittest.cc
index 46d3833..77f3856 100644
--- a/components/url_formatter/url_fixer_unittest.cc
+++ b/components/url_formatter/url_fixer_unittest.cc
@@ -512,7 +512,8 @@
     base::FilePath input = base::FilePath::FromUTF8Unsafe(value.input);
     EXPECT_EQ(value.output,
               url_formatter::FixupRelativeFile(temp_dir_.GetPath(), input)
-                  .possibly_invalid_spec());
+                  .possibly_invalid_spec())
+        << "input: " << value.input;
   }
 
   // make sure the existing file got fixed-up to a file URL, and that there
diff --git a/components/viz/common/BUILD.gn b/components/viz/common/BUILD.gn
index 11d4414d..6909569 100644
--- a/components/viz/common/BUILD.gn
+++ b/components/viz/common/BUILD.gn
@@ -141,6 +141,8 @@
     "surfaces/frame_sink_id_allocator.h",
     "surfaces/local_surface_id.cc",
     "surfaces/local_surface_id.h",
+    "surfaces/local_surface_id_allocation.cc",
+    "surfaces/local_surface_id_allocation.h",
     "surfaces/parent_local_surface_id_allocator.cc",
     "surfaces/parent_local_surface_id_allocator.h",
     "surfaces/scoped_surface_id_allocator.cc",
diff --git a/components/viz/common/quads/draw_quad_unittest.cc b/components/viz/common/quads/draw_quad_unittest.cc
index 82b9c82..cae3f216 100644
--- a/components/viz/common/quads/draw_quad_unittest.cc
+++ b/components/viz/common/quads/draw_quad_unittest.cc
@@ -151,19 +151,19 @@
   { QUAD_DATA quad_new->SetNew(shared_state, quad_rect, __VA_ARGS__); } \
   SETUP_AND_COPY_QUAD_NEW(Type, quad_new);
 
-#define CREATE_QUAD_ALL_RP(Type, a, b, c, d, e, f, g, h, copy_a)           \
+#define CREATE_QUAD_ALL_RP(Type, a, b, c, d, e, f, g, h, i, copy_a)        \
   Type* quad_all = render_pass->CreateAndAppendDrawQuad<Type>();           \
   {                                                                        \
     QUAD_DATA quad_all->SetAll(shared_state, quad_rect, quad_visible_rect, \
-                               needs_blending, a, b, c, d, e, f, g, h);    \
+                               needs_blending, a, b, c, d, e, f, g, h, i); \
   }                                                                        \
   SETUP_AND_COPY_QUAD_ALL_RP(Type, quad_all, copy_a);
 
-#define CREATE_QUAD_NEW_RP(Type, a, b, c, d, e, f, g, h, i, copy_a)          \
+#define CREATE_QUAD_NEW_RP(Type, a, b, c, d, e, f, g, h, i, j, copy_a)       \
   Type* quad_new = render_pass->CreateAndAppendDrawQuad<Type>();             \
   {                                                                          \
     QUAD_DATA quad_new->SetNew(shared_state, quad_rect, a, b, c, d, e, f, g, \
-                               h, i);                                        \
+                               h, i, j);                                     \
   }                                                                          \
   SETUP_AND_COPY_QUAD_NEW_RP(Type, quad_new, copy_a);
 
@@ -195,6 +195,7 @@
   gfx::PointF filters_origin;
   gfx::RectF tex_coord_rect(1, 1, 255, 254);
   bool force_anti_aliasing_off = false;
+  float backdrop_filter_quality = 1.0f;
 
   RenderPassId copied_render_pass_id = 235;
   CREATE_SHARED_STATE();
@@ -202,7 +203,8 @@
   CREATE_QUAD_NEW_RP(RenderPassDrawQuad, visible_rect, render_pass_id,
                      mask_resource_id, mask_uv_rect, mask_texture_size,
                      filters_scale, filters_origin, tex_coord_rect,
-                     force_anti_aliasing_off, copied_render_pass_id);
+                     force_anti_aliasing_off, backdrop_filter_quality,
+                     copied_render_pass_id);
   EXPECT_EQ(DrawQuad::RENDER_PASS, copy_quad->material);
   EXPECT_EQ(visible_rect, copy_quad->visible_rect);
   EXPECT_EQ(copied_render_pass_id, copy_quad->render_pass_id);
@@ -217,7 +219,7 @@
   CREATE_QUAD_ALL_RP(RenderPassDrawQuad, render_pass_id, mask_resource_id,
                      mask_uv_rect, mask_texture_size, filters_scale,
                      filters_origin, tex_coord_rect, force_anti_aliasing_off,
-                     copied_render_pass_id);
+                     backdrop_filter_quality, copied_render_pass_id);
   EXPECT_EQ(DrawQuad::RENDER_PASS, copy_quad->material);
   EXPECT_EQ(copied_render_pass_id, copy_quad->render_pass_id);
   EXPECT_EQ(mask_resource_id, copy_quad->mask_resource_id());
@@ -521,6 +523,7 @@
   gfx::PointF filters_origin(0.f, 0.f);
   gfx::RectF tex_coord_rect(1.f, 1.f, 33.f, 19.f);
   bool force_anti_aliasing_off = false;
+  float backdrop_filter_quality = 1.0f;
 
   int copied_render_pass_id = 235;
 
@@ -528,7 +531,8 @@
   CREATE_QUAD_NEW_RP(RenderPassDrawQuad, visible_rect, render_pass_id,
                      mask_resource_id, mask_uv_rect, mask_texture_size,
                      filters_scale, filters_origin, tex_coord_rect,
-                     force_anti_aliasing_off, copied_render_pass_id);
+                     force_anti_aliasing_off, backdrop_filter_quality,
+                     copied_render_pass_id);
   EXPECT_EQ(mask_resource_id, quad_new->mask_resource_id());
   EXPECT_EQ(1, IterateAndCount(quad_new));
   EXPECT_EQ(mask_resource_id + 1, quad_new->mask_resource_id());
@@ -538,7 +542,7 @@
   quad_new->SetNew(shared_state, quad_rect, visible_rect, render_pass_id,
                    new_mask_resource_id, mask_uv_rect, mask_texture_size,
                    filters_scale, filters_origin, tex_coord_rect,
-                   force_anti_aliasing_off);
+                   force_anti_aliasing_off, backdrop_filter_quality);
   EXPECT_EQ(0, IterateAndCount(quad_new));
   EXPECT_EQ(0u, quad_new->mask_resource_id());
 }
diff --git a/components/viz/common/quads/render_pass_draw_quad.cc b/components/viz/common/quads/render_pass_draw_quad.cc
index 4bd6826..2eec14d 100644
--- a/components/viz/common/quads/render_pass_draw_quad.cc
+++ b/components/viz/common/quads/render_pass_draw_quad.cc
@@ -29,13 +29,15 @@
                                 const gfx::Vector2dF& filters_scale,
                                 const gfx::PointF& filters_origin,
                                 const gfx::RectF& tex_coord_rect,
-                                bool force_anti_aliasing_off) {
+                                bool force_anti_aliasing_off,
+                                float backdrop_filter_quality) {
   DCHECK(render_pass_id);
 
   bool needs_blending = true;
   SetAll(shared_quad_state, rect, visible_rect, needs_blending, render_pass_id,
          mask_resource_id, mask_uv_rect, mask_texture_size, filters_scale,
-         filters_origin, tex_coord_rect, force_anti_aliasing_off);
+         filters_origin, tex_coord_rect, force_anti_aliasing_off,
+         backdrop_filter_quality);
 }
 
 void RenderPassDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
@@ -49,7 +51,8 @@
                                 const gfx::Vector2dF& filters_scale,
                                 const gfx::PointF& filters_origin,
                                 const gfx::RectF& tex_coord_rect,
-                                bool force_anti_aliasing_off) {
+                                bool force_anti_aliasing_off,
+                                float backdrop_filter_quality) {
   DCHECK(render_pass_id);
 
   DrawQuad::SetAll(shared_quad_state, DrawQuad::RENDER_PASS, rect, visible_rect,
@@ -63,6 +66,7 @@
   this->filters_origin = filters_origin;
   this->tex_coord_rect = tex_coord_rect;
   this->force_anti_aliasing_off = force_anti_aliasing_off;
+  this->backdrop_filter_quality = backdrop_filter_quality;
 }
 
 const RenderPassDrawQuad* RenderPassDrawQuad::MaterialCast(
@@ -80,6 +84,7 @@
   cc::MathUtil::AddToTracedValue("mask_uv_rect", mask_uv_rect, value);
   cc::MathUtil::AddToTracedValue("tex_coord_rect", tex_coord_rect, value);
   value->SetBoolean("force_anti_aliasing_off", force_anti_aliasing_off);
+  value->SetDouble("backdrop_filter_quality", backdrop_filter_quality);
 }
 
 }  // namespace viz
diff --git a/components/viz/common/quads/render_pass_draw_quad.h b/components/viz/common/quads/render_pass_draw_quad.h
index c4e3f6de..fe641f91 100644
--- a/components/viz/common/quads/render_pass_draw_quad.h
+++ b/components/viz/common/quads/render_pass_draw_quad.h
@@ -37,7 +37,8 @@
               const gfx::Vector2dF& filters_scale,
               const gfx::PointF& filters_origin,
               const gfx::RectF& tex_coord_rect,
-              bool force_anti_aliasing_off);
+              bool force_anti_aliasing_off,
+              float backdrop_filter_quality);
 
   void SetAll(const SharedQuadState* shared_quad_state,
               const gfx::Rect& rect,
@@ -50,7 +51,8 @@
               const gfx::Vector2dF& filters_scale,
               const gfx::PointF& filters_origin,
               const gfx::RectF& tex_coord_rect,
-              bool force_anti_aliasing_off);
+              bool force_anti_aliasing_off,
+              float backdrop_filter_quality);
 
   RenderPassId render_pass_id;
   gfx::RectF mask_uv_rect;
@@ -70,6 +72,8 @@
 
   bool force_anti_aliasing_off;
 
+  float backdrop_filter_quality;
+
   ResourceId mask_resource_id() const {
     return resources.ids[kMaskResourceIdIndex];
   }
diff --git a/components/viz/common/quads/render_pass_unittest.cc b/components/viz/common/quads/render_pass_unittest.cc
index a501452..34c7546 100644
--- a/components/viz/common/quads/render_pass_unittest.cc
+++ b/components/viz/common/quads/render_pass_unittest.cc
@@ -214,7 +214,7 @@
   pass_quad->SetNew(pass->shared_quad_state_list.back(), contrib_output_rect,
                     contrib_output_rect, contrib_id, 0, gfx::RectF(),
                     gfx::Size(), gfx::Vector2dF(), gfx::PointF(), gfx::RectF(),
-                    false);
+                    false, 1.0f);
 
   pass_list.push_back(std::move(pass));
   pass_list.push_back(std::move(contrib));
diff --git a/components/viz/common/surfaces/child_local_surface_id_allocator.cc b/components/viz/common/surfaces/child_local_surface_id_allocator.cc
index 77ba9ea..bfc7e100 100644
--- a/components/viz/common/surfaces/child_local_surface_id_allocator.cc
+++ b/components/viz/common/surfaces/child_local_surface_id_allocator.cc
@@ -12,22 +12,28 @@
 namespace viz {
 
 ChildLocalSurfaceIdAllocator::ChildLocalSurfaceIdAllocator()
-    : current_local_surface_id_(kInvalidParentSequenceNumber,
-                                kInitialChildSequenceNumber,
-                                base::UnguessableToken()) {}
+    : current_local_surface_id_allocation_(
+          LocalSurfaceId(kInvalidParentSequenceNumber,
+                         kInitialChildSequenceNumber,
+                         base::UnguessableToken()),
+          base::TimeTicks()) {}
 
 bool ChildLocalSurfaceIdAllocator::UpdateFromParent(
     const LocalSurfaceId& parent_allocated_local_surface_id,
     base::TimeTicks parent_local_surface_id_allocation_time) {
   if ((parent_allocated_local_surface_id.parent_sequence_number() >
-       current_local_surface_id_.parent_sequence_number()) ||
+       current_local_surface_id_allocation_.local_surface_id_
+           .parent_sequence_number()) ||
       parent_allocated_local_surface_id.embed_token() !=
-          current_local_surface_id_.embed_token()) {
-    current_local_surface_id_.parent_sequence_number_ =
+          current_local_surface_id_allocation_.local_surface_id_
+              .embed_token()) {
+    current_local_surface_id_allocation_.local_surface_id_
+        .parent_sequence_number_ =
         parent_allocated_local_surface_id.parent_sequence_number_;
-    current_local_surface_id_.embed_token_ =
+    current_local_surface_id_allocation_.local_surface_id_.embed_token_ =
         parent_allocated_local_surface_id.embed_token_;
-    allocation_time_ = parent_local_surface_id_allocation_time;
+    current_local_surface_id_allocation_.allocation_time_ =
+        parent_local_surface_id_allocation_time;
     return true;
   }
   return false;
@@ -35,28 +41,33 @@
 
 const LocalSurfaceId& ChildLocalSurfaceIdAllocator::GenerateId() {
   // UpdateFromParent must be called before we can generate a valid ID.
-  DCHECK_NE(current_local_surface_id_.parent_sequence_number(),
+  DCHECK_NE(current_local_surface_id_allocation_.local_surface_id_
+                .parent_sequence_number(),
             kInvalidParentSequenceNumber);
 
-  ++current_local_surface_id_.child_sequence_number_;
-  allocation_time_ = base::TimeTicks::Now();
+  ++current_local_surface_id_allocation_.local_surface_id_
+        .child_sequence_number_;
+  current_local_surface_id_allocation_.allocation_time_ =
+      base::TimeTicks::Now();
 
   TRACE_EVENT_WITH_FLOW2(
       TRACE_DISABLED_BY_DEFAULT("viz.surface_id_flow"),
       "LocalSurfaceId.Embed.Flow",
-      TRACE_ID_GLOBAL(current_local_surface_id_.embed_trace_id()),
+      TRACE_ID_GLOBAL(current_local_surface_id_allocation_.local_surface_id_
+                          .embed_trace_id()),
       TRACE_EVENT_FLAG_FLOW_OUT, "step",
       "ChildLocalSurfaceIdAllocator::GenerateId", "local_surface_id",
-      current_local_surface_id_.ToString());
+      current_local_surface_id_allocation_.local_surface_id_.ToString());
   TRACE_EVENT_WITH_FLOW2(
       TRACE_DISABLED_BY_DEFAULT("viz.surface_id_flow"),
       "LocalSurfaceId.Submission.Flow",
-      TRACE_ID_GLOBAL(current_local_surface_id_.submission_trace_id()),
+      TRACE_ID_GLOBAL(current_local_surface_id_allocation_.local_surface_id_
+                          .submission_trace_id()),
       TRACE_EVENT_FLAG_FLOW_OUT, "step",
       "ChildLocalSurfaceIdAllocator::GenerateId", "local_surface_id",
-      current_local_surface_id_.ToString());
+      current_local_surface_id_allocation_.local_surface_id_.ToString());
 
-  return current_local_surface_id_;
+  return current_local_surface_id_allocation_.local_surface_id();
 }
 
 }  // namespace viz
diff --git a/components/viz/common/surfaces/child_local_surface_id_allocator.h b/components/viz/common/surfaces/child_local_surface_id_allocator.h
index 78da028..3aeaa53 100644
--- a/components/viz/common/surfaces/child_local_surface_id_allocator.h
+++ b/components/viz/common/surfaces/child_local_surface_id_allocator.h
@@ -10,6 +10,7 @@
 #include "base/macros.h"
 #include "base/time/time.h"
 #include "base/unguessable_token.h"
+#include "components/viz/common/surfaces/local_surface_id_allocation.h"
 #include "components/viz/common/surfaces/surface_id.h"
 #include "components/viz/common/viz_common_export.h"
 
@@ -40,16 +41,15 @@
   const LocalSurfaceId& GenerateId();
 
   const LocalSurfaceId& GetCurrentLocalSurfaceId() const {
-    return current_local_surface_id_;
+    return current_local_surface_id_allocation_.local_surface_id();
   }
 
-  base::TimeTicks allocation_time() const { return allocation_time_; }
+  base::TimeTicks allocation_time() const {
+    return current_local_surface_id_allocation_.allocation_time_;
+  }
 
  private:
-  LocalSurfaceId current_local_surface_id_;
-
-  // The time at which |current_local_surface_id_| was allocated.
-  base::TimeTicks allocation_time_;
+  LocalSurfaceIdAllocation current_local_surface_id_allocation_;
 
   DISALLOW_COPY_AND_ASSIGN(ChildLocalSurfaceIdAllocator);
 };
diff --git a/components/viz/common/surfaces/local_surface_id_allocation.cc b/components/viz/common/surfaces/local_surface_id_allocation.cc
new file mode 100644
index 0000000..9586da4
--- /dev/null
+++ b/components/viz/common/surfaces/local_surface_id_allocation.cc
@@ -0,0 +1,34 @@
+// 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/local_surface_id_allocation.h"
+
+#include <inttypes.h>
+
+#include "base/strings/stringprintf.h"
+
+namespace viz {
+
+LocalSurfaceIdAllocation::LocalSurfaceIdAllocation(
+    const LocalSurfaceId& local_surface_id,
+    base::TimeTicks allocation_time)
+    : local_surface_id_(local_surface_id), allocation_time_(allocation_time) {}
+
+bool LocalSurfaceIdAllocation::IsValid() const {
+  return local_surface_id_.is_valid() && !allocation_time_.is_null();
+}
+
+std::string LocalSurfaceIdAllocation::ToString() const {
+  return base::StringPrintf(
+      "LocalSurfaceIdAllocation(%s, AllocationTime(%" PRId64 "))",
+      local_surface_id_.ToString().c_str(),
+      (allocation_time_ - base::TimeTicks()).InMilliseconds());
+}
+
+std::ostream& operator<<(std::ostream& stream,
+                         const LocalSurfaceIdAllocation& allocation) {
+  return stream << allocation.ToString();
+}
+
+}  // namespace viz
diff --git a/components/viz/common/surfaces/local_surface_id_allocation.h b/components/viz/common/surfaces/local_surface_id_allocation.h
new file mode 100644
index 0000000..35c8bdf4
--- /dev/null
+++ b/components/viz/common/surfaces/local_surface_id_allocation.h
@@ -0,0 +1,49 @@
+// 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_LOCAL_SURFACE_ID_ALLOCATION_H_
+#define COMPONENTS_VIZ_COMMON_SURFACES_LOCAL_SURFACE_ID_ALLOCATION_H_
+
+#include <ostream>
+#include <string>
+
+#include "base/time/time.h"
+#include "components/viz/common/surfaces/local_surface_id.h"
+#include "components/viz/common/viz_common_export.h"
+
+namespace viz {
+
+class ChildLocalSurfaceIdAllocator;
+class ParentLocalSurfaceIdAllocator;
+
+// This tracks information related to the allocation of a LocalSurfaceId.
+// It holds both the LocalSurfaceId, along with the allocation time.
+class VIZ_COMMON_EXPORT LocalSurfaceIdAllocation {
+ public:
+  LocalSurfaceIdAllocation(const LocalSurfaceId& local_surface_id,
+                           base::TimeTicks allocation_time);
+
+  // Returns true if both |local_surface_id_| is valid, and a non-null
+  // |allocation_time_| was provided.
+  bool IsValid() const;
+  std::string ToString() const;
+
+  const LocalSurfaceId& local_surface_id() const { return local_surface_id_; }
+  base::TimeTicks allocation_time() const { return allocation_time_; }
+
+ private:
+  friend class ChildLocalSurfaceIdAllocator;
+  friend class ParentLocalSurfaceIdAllocator;
+
+  LocalSurfaceId local_surface_id_;
+  base::TimeTicks allocation_time_;
+};
+
+VIZ_COMMON_EXPORT std::ostream& operator<<(
+    std::ostream& stream,
+    const LocalSurfaceIdAllocation& allocation);
+
+}  // namespace viz
+
+#endif  // COMPONENTS_VIZ_COMMON_SURFACES_LOCAL_SURFACE_ID_ALLOCATION_H_
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 d4c97d9..2cc69be 100644
--- a/components/viz/common/surfaces/parent_local_surface_id_allocator.cc
+++ b/components/viz/common/surfaces/parent_local_surface_id_allocator.cc
@@ -12,9 +12,11 @@
 constexpr LocalSurfaceId g_invalid_local_surface_id;
 
 ParentLocalSurfaceIdAllocator::ParentLocalSurfaceIdAllocator()
-    : current_local_surface_id_(kInvalidParentSequenceNumber,
-                                kInitialChildSequenceNumber,
-                                base::UnguessableToken::Create()) {
+    : current_local_surface_id_allocation_(
+          LocalSurfaceId(kInvalidParentSequenceNumber,
+                         kInitialChildSequenceNumber,
+                         base::UnguessableToken::Create()),
+          base::TimeTicks()) {
   GenerateId();
 }
 
@@ -22,18 +24,22 @@
     const LocalSurfaceId& child_allocated_local_surface_id,
     base::TimeTicks child_local_surface_id_allocation_time) {
   if (child_allocated_local_surface_id.child_sequence_number() >
-      current_local_surface_id_.child_sequence_number()) {
-    current_local_surface_id_.child_sequence_number_ =
+      current_local_surface_id_allocation_.local_surface_id_
+          .child_sequence_number()) {
+    current_local_surface_id_allocation_.local_surface_id_
+        .child_sequence_number_ =
         child_allocated_local_surface_id.child_sequence_number_;
-    allocation_time_ = child_local_surface_id_allocation_time;
+    current_local_surface_id_allocation_.allocation_time_ =
+        child_local_surface_id_allocation_time;
     is_invalid_ = false;
     TRACE_EVENT_WITH_FLOW2(
         TRACE_DISABLED_BY_DEFAULT("viz.surface_id_flow"),
         "LocalSurfaceId.Embed.Flow",
-        TRACE_ID_GLOBAL(current_local_surface_id_.embed_trace_id()),
+        TRACE_ID_GLOBAL(current_local_surface_id_allocation_.local_surface_id_
+                            .embed_trace_id()),
         TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT, "step",
         "UpdateFromChild", "local_surface_id",
-        current_local_surface_id_.ToString());
+        current_local_surface_id_allocation_.local_surface_id_.ToString());
     return true;
   }
   return false;
@@ -41,7 +47,7 @@
 
 void ParentLocalSurfaceIdAllocator::Reset(
     const LocalSurfaceId& local_surface_id) {
-  current_local_surface_id_ = local_surface_id;
+  current_local_surface_id_allocation_.local_surface_id_ = local_surface_id;
 }
 
 void ParentLocalSurfaceIdAllocator::Invalidate() {
@@ -50,34 +56,37 @@
 
 const LocalSurfaceId& ParentLocalSurfaceIdAllocator::GenerateId() {
   if (!is_allocation_suppressed_) {
-    ++current_local_surface_id_.parent_sequence_number_;
-    allocation_time_ = base::TimeTicks::Now();
+    ++current_local_surface_id_allocation_.local_surface_id_
+          .parent_sequence_number_;
+    current_local_surface_id_allocation_.allocation_time_ =
+        base::TimeTicks::Now();
     TRACE_EVENT_WITH_FLOW2(
         TRACE_DISABLED_BY_DEFAULT("viz.surface_id_flow"),
         "LocalSurfaceId.Embed.Flow",
-        TRACE_ID_GLOBAL(current_local_surface_id_.embed_trace_id()),
+        TRACE_ID_GLOBAL(current_local_surface_id_allocation_.local_surface_id_
+                            .embed_trace_id()),
         TRACE_EVENT_FLAG_FLOW_OUT, "step",
         "ParentLocalSurfaceIdAllocator::GenerateId", "local_surface_id",
-        current_local_surface_id_.ToString());
+        current_local_surface_id_allocation_.local_surface_id_.ToString());
     TRACE_EVENT_WITH_FLOW2(
         TRACE_DISABLED_BY_DEFAULT("viz.surface_id_flow"),
         "LocalSurfaceId.Submission.Flow",
-        TRACE_ID_GLOBAL(current_local_surface_id_.submission_trace_id()),
+        TRACE_ID_GLOBAL(current_local_surface_id_allocation_.local_surface_id_
+                            .submission_trace_id()),
         TRACE_EVENT_FLAG_FLOW_OUT, "step",
         "ParentLocalSurfaceIdAllocator::GenerateId", "local_surface_id",
-        current_local_surface_id_.ToString());
+        current_local_surface_id_allocation_.local_surface_id_.ToString());
   }
   is_invalid_ = false;
 
-
-  return current_local_surface_id_;
+  return current_local_surface_id_allocation_.local_surface_id_;
 }
 
 const LocalSurfaceId& ParentLocalSurfaceIdAllocator::GetCurrentLocalSurfaceId()
     const {
   if (is_invalid_)
     return g_invalid_local_surface_id;
-  return current_local_surface_id_;
+  return current_local_surface_id_allocation_.local_surface_id_;
 }
 
 // static
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 2294e06..f200717 100644
--- a/components/viz/common/surfaces/parent_local_surface_id_allocator.h
+++ b/components/viz/common/surfaces/parent_local_surface_id_allocator.h
@@ -10,6 +10,7 @@
 #include "base/macros.h"
 #include "base/time/time.h"
 #include "base/unguessable_token.h"
+#include "components/viz/common/surfaces/local_surface_id_allocation.h"
 #include "components/viz/common/surfaces/surface_id.h"
 #include "components/viz/common/viz_common_export.h"
 
@@ -50,16 +51,15 @@
 
   static const LocalSurfaceId& InvalidLocalSurfaceId();
 
-  base::TimeTicks allocation_time() const { return allocation_time_; }
+  base::TimeTicks allocation_time() const {
+    return current_local_surface_id_allocation_.allocation_time();
+  }
 
   bool is_allocation_suppressed() const { return is_allocation_suppressed_; }
 
  private:
   static const LocalSurfaceId invalid_local_surface_id_;
-  LocalSurfaceId current_local_surface_id_;
-
-  // Time at which |current_local_surface_id_| was allocated.
-  base::TimeTicks allocation_time_;
+  LocalSurfaceIdAllocation current_local_surface_id_allocation_;
 
   // When true, the last known LocalSurfaceId is an invalid LocalSurfaceId.
   // TODO(fsamuel): Once the parent sequence number is only monotonically
diff --git a/components/viz/service/display/display_unittest.cc b/components/viz/service/display/display_unittest.cc
index d4e8ccf2..40bf2c85 100644
--- a/components/viz/service/display/display_unittest.cc
+++ b/components/viz/service/display/display_unittest.cc
@@ -2522,7 +2522,8 @@
     quad->SetNew(shared_quad_state, rect1, rect1, SK_ColorBLACK, false);
     quad1->SetNew(shared_quad_state2, rect1, rect1, render_pass_id,
                   mask_resource_id, gfx::RectF(), gfx::Size(),
-                  gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false);
+                  gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false,
+                  1.0f);
     EXPECT_EQ(1u, frame.render_pass_list.front()->quad_list.size());
     EXPECT_EQ(1u, frame.render_pass_list.at(1)->quad_list.size());
     display_->RemoveOverdrawQuads(&frame);
@@ -2767,10 +2768,10 @@
                                SkBlendMode::kSrcOver, 0);
     R1->SetNew(shared_quad_state, rect1, rect1, render_pass_id,
                mask_resource_id, gfx::RectF(), gfx::Size(),
-               gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false);
+               gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false, 1.0f);
     R2->SetNew(shared_quad_state, rect2, rect2, render_pass_id,
                mask_resource_id, gfx::RectF(), gfx::Size(),
-               gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false);
+               gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false, 1.0f);
     D1->SetNew(shared_quad_state3, rect3, rect3, SK_ColorBLACK, false);
     D2->SetNew(shared_quad_state4, rect4, rect4, SK_ColorBLACK, false);
     EXPECT_EQ(4u, frame.render_pass_list.front()->quad_list.size());
@@ -2815,10 +2816,10 @@
                                SkBlendMode::kSrcOver, 0);
     R1->SetNew(shared_quad_state, rect5, rect5, render_pass_id,
                mask_resource_id, gfx::RectF(), gfx::Size(),
-               gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false);
+               gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false, 1.0f);
     R2->SetNew(shared_quad_state, rect1, rect1, render_pass_id,
                mask_resource_id, gfx::RectF(), gfx::Size(),
-               gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false);
+               gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false, 1.0f);
     D1->SetNew(shared_quad_state3, rect3, rect3, SK_ColorBLACK, false);
     D2->SetNew(shared_quad_state4, rect6, rect6, SK_ColorBLACK, false);
     EXPECT_EQ(4u, frame.render_pass_list.front()->quad_list.size());
@@ -2862,10 +2863,10 @@
                                SkBlendMode::kSrcOver, 0);
     R1->SetNew(shared_quad_state, rect5, rect5, render_pass_id,
                mask_resource_id, gfx::RectF(), gfx::Size(),
-               gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false);
+               gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false, 1.0f);
     R2->SetNew(shared_quad_state, rect1, rect1, render_pass_id,
                mask_resource_id, gfx::RectF(), gfx::Size(),
-               gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false);
+               gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false, 1.0f);
     D1->SetNew(shared_quad_state3, rect3, rect3, SK_ColorBLACK, false);
     D2->SetNew(shared_quad_state4, rect7, rect7, SK_ColorBLACK, false);
     EXPECT_EQ(4u, frame.render_pass_list.front()->quad_list.size());
diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc
index 5720d33..0095043a 100644
--- a/components/viz/service/display/gl_renderer.cc
+++ b/components/viz/service/display/gl_renderer.cc
@@ -259,6 +259,9 @@
   // Filtered background texture.
   sk_sp<SkImage> background_image;
   GLuint background_image_id = 0;
+  // A multiplier for the temporary surface we create to apply the backdrop
+  // filter.
+  float backdrop_filter_quality = 1.0;
   // Whether the original background texture is needed for the mask.
   bool mask_for_background = false;
 };
@@ -805,7 +808,8 @@
     const cc::FilterOperations& backdrop_filters,
     uint32_t background_texture,
     const gfx::Rect& rect,
-    const gfx::Rect& unclipped_rect) {
+    const gfx::Rect& unclipped_rect,
+    const float backdrop_filter_quality) {
   DCHECK(ShouldApplyBackgroundFilters(quad, &backdrop_filters));
   auto use_gr_context = ScopedUseGrContext::Create(this);
 
@@ -834,9 +838,12 @@
     return nullptr;
   }
 
+  gfx::Rect quality_adjusted_rect =
+      ScaleToEnclosingRect(rect, backdrop_filter_quality);
+
   // Create surface to draw into.
-  SkImageInfo dst_info =
-      SkImageInfo::MakeN32Premul(rect.width(), rect.height());
+  SkImageInfo dst_info = SkImageInfo::MakeN32Premul(
+      quality_adjusted_rect.width(), quality_adjusted_rect.height());
   sk_sp<SkSurface> surface = SkSurface::MakeRenderTarget(
       use_gr_context->context(), SkBudgeted::kYes, dst_info);
   if (!surface) {
@@ -850,12 +857,17 @@
   // to disable subnormal floats for performance and security reasons.
   cc::ScopedSubnormalFloatDisabler disabler;
   SkMatrix local_matrix;
-  local_matrix.setScale(quad->filters_scale.x(), quad->filters_scale.y());
+  local_matrix.setScale(quad->filters_scale.x() * backdrop_filter_quality,
+                        quad->filters_scale.y() * backdrop_filter_quality);
 
   SkPaint paint;
   paint.setImageFilter(filter->makeWithLocalMatrix(local_matrix));
-  surface->getCanvas()->translate(-rect.x(), -rect.y());
-  surface->getCanvas()->drawImage(src_image, rect.x(), rect.y(), &paint);
+  surface->getCanvas()->translate(-quality_adjusted_rect.x(),
+                                  -quality_adjusted_rect.y());
+  surface->getCanvas()->drawImageRect(
+      src_image, SkRect::MakeWH(rect.width(), rect.height()),
+      RectToSkRect(quality_adjusted_rect), &paint);
+
   // Flush the drawing before source texture read lock goes out of scope.
   // Skia API does not guarantee that when the SkImage goes out of scope,
   // its externally referenced resources would force the rendering to be
@@ -883,6 +895,7 @@
   params.window_matrix = current_frame()->window_matrix;
   params.projection_matrix = current_frame()->projection_matrix;
   params.tex_coord_rect = quad->tex_coord_rect;
+  params.backdrop_filter_quality = quad->backdrop_filter_quality;
   if (bypass != render_pass_bypass_quads_.end()) {
     TileDrawQuad* tile_quad = &bypass->second;
     // The projection matrix used by GLRenderer has a flip.  As tile texture
@@ -1034,7 +1047,8 @@
         // pixels' coordinate space.
         params->background_image = ApplyBackgroundFilters(
             quad, *params->backdrop_filters, params->background_texture,
-            params->background_rect, unclipped_rect);
+            params->background_rect, unclipped_rect,
+            params->backdrop_filter_quality);
         if (params->background_image) {
           params->background_image_id =
               GetGLTextureIDFromSkImage(params->background_image.get());
@@ -1352,6 +1366,8 @@
     if (params->background_image_id) {
       gl_->ActiveTexture(GL_TEXTURE0 + last_texture_unit);
       gl_->BindTexture(GL_TEXTURE_2D, params->background_image_id);
+      if (params->backdrop_filter_quality != 1.0f)
+        gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
       gl_->ActiveTexture(GL_TEXTURE0);
     }
     // If |mask_for_background| then we have both |background_image_id| and
diff --git a/components/viz/service/display/gl_renderer.h b/components/viz/service/display/gl_renderer.h
index cd43cab..106de94 100644
--- a/components/viz/service/display/gl_renderer.h
+++ b/components/viz/service/display/gl_renderer.h
@@ -211,7 +211,8 @@
       const cc::FilterOperations& backdrop_filters,
       uint32_t background_texture,
       const gfx::Rect& rect,
-      const gfx::Rect& unclipped_rect);
+      const gfx::Rect& unclipped_rect,
+      const float backdrop_filter_quality);
 
   const TileDrawQuad* CanPassBeDrawnDirectly(const RenderPass* pass) override;
 
diff --git a/components/viz/service/display/overlay_unittest.cc b/components/viz/service/display/overlay_unittest.cc
index 90cf582a5b4..5a16c99 100644
--- a/components/viz/service/display/overlay_unittest.cc
+++ b/components/viz/service/display/overlay_unittest.cc
@@ -1351,7 +1351,7 @@
       pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>();
   quad->SetNew(pass->shared_quad_state_list.back(), kOverlayRect, kOverlayRect,
                render_pass_id, 0, gfx::RectF(), gfx::Size(),
-               gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false);
+               gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false, 1.0f);
 
   CreateFullscreenCandidateQuad(
       resource_provider_.get(), child_resource_provider_.get(),
@@ -2641,7 +2641,7 @@
   child_pass1_rpdq->SetNew(child_pass1_sqs, unit_rect, unit_rect,
                            child_pass1_id, 0, gfx::RectF(), gfx::Size(),
                            gfx::Vector2dF(), gfx::PointF(),
-                           gfx::RectF(0, 0, 1, 1), false);
+                           gfx::RectF(0, 0, 1, 1), false, 1.0f);
 
   SharedQuadState* child_pass2_sqs =
       root_pass->shared_quad_state_list.ElementAt(1);
@@ -2654,7 +2654,7 @@
   child_pass2_rpdq->SetNew(child_pass2_sqs, unit_rect, unit_rect,
                            child_pass2_id, 0, gfx::RectF(), gfx::Size(),
                            gfx::Vector2dF(), gfx::PointF(),
-                           gfx::RectF(0, 0, 1, 1), false);
+                           gfx::RectF(0, 0, 1, 1), false, 1.0f);
 
   root_pass->damage_rect = gfx::Rect();
 
@@ -3424,7 +3424,7 @@
 TEST_F(CALayerOverlayRPDQTest, RenderPassDrawQuadNoFilters) {
   quad_->SetNew(pass_->shared_quad_state_list.back(), kOverlayRect,
                 kOverlayRect, render_pass_id_, 0, gfx::RectF(), gfx::Size(),
-                gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false);
+                gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false, 1.0f);
   ProcessForOverlays();
 
   EXPECT_EQ(1U, ca_layer_list_.size());
@@ -3445,7 +3445,7 @@
   render_pass_filters_[render_pass_id_] = &filters_;
   quad_->SetNew(pass_->shared_quad_state_list.back(), kOverlayRect,
                 kOverlayRect, render_pass_id_, 0, gfx::RectF(), gfx::Size(),
-                gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false);
+                gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false, 1.0f);
   ProcessForOverlays();
 
   EXPECT_EQ(1U, ca_layer_list_.size());
@@ -3456,7 +3456,7 @@
   render_pass_filters_[render_pass_id_] = &filters_;
   quad_->SetNew(pass_->shared_quad_state_list.back(), kOverlayRect,
                 kOverlayRect, render_pass_id_, 0, gfx::RectF(), gfx::Size(),
-                gfx::Vector2dF(1, 2), gfx::PointF(), gfx::RectF(), false);
+                gfx::Vector2dF(1, 2), gfx::PointF(), gfx::RectF(), false, 1.0f);
   ProcessForOverlays();
   EXPECT_EQ(1U, ca_layer_list_.size());
 }
@@ -3466,7 +3466,7 @@
   render_pass_filters_[render_pass_id_] = &filters_;
   quad_->SetNew(pass_->shared_quad_state_list.back(), kOverlayRect,
                 kOverlayRect, render_pass_id_, 0, gfx::RectF(), gfx::Size(),
-                gfx::Vector2dF(1, 2), gfx::PointF(), gfx::RectF(), false);
+                gfx::Vector2dF(1, 2), gfx::PointF(), gfx::RectF(), false, 1.0f);
   ProcessForOverlays();
   EXPECT_EQ(1U, ca_layer_list_.size());
 }
@@ -3477,7 +3477,7 @@
   render_pass_filters_[render_pass_id_] = &filters_;
   quad_->SetNew(pass_->shared_quad_state_list.back(), kOverlayRect,
                 kOverlayRect, render_pass_id_, 0, gfx::RectF(), gfx::Size(),
-                gfx::Vector2dF(1, 2), gfx::PointF(), gfx::RectF(), false);
+                gfx::Vector2dF(1, 2), gfx::PointF(), gfx::RectF(), false, 1.0f);
   ProcessForOverlays();
   EXPECT_EQ(1U, ca_layer_list_.size());
 }
@@ -3487,7 +3487,7 @@
   render_pass_backdrop_filters_[render_pass_id_] = &backdrop_filters_;
   quad_->SetNew(pass_->shared_quad_state_list.back(), kOverlayRect,
                 kOverlayRect, render_pass_id_, 0, gfx::RectF(), gfx::Size(),
-                gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false);
+                gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false, 1.0f);
   ProcessForOverlays();
   EXPECT_EQ(0U, ca_layer_list_.size());
 }
@@ -3495,7 +3495,7 @@
 TEST_F(CALayerOverlayRPDQTest, RenderPassDrawQuadMask) {
   quad_->SetNew(pass_->shared_quad_state_list.back(), kOverlayRect,
                 kOverlayRect, render_pass_id_, 2, gfx::RectF(), gfx::Size(),
-                gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false);
+                gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false, 1.0f);
   ProcessForOverlays();
   EXPECT_EQ(1U, ca_layer_list_.size());
 }
@@ -3505,7 +3505,7 @@
   render_pass_filters_[render_pass_id_] = &filters_;
   quad_->SetNew(pass_->shared_quad_state_list.back(), kOverlayRect,
                 kOverlayRect, render_pass_id_, 0, gfx::RectF(), gfx::Size(),
-                gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false);
+                gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false, 1.0f);
   ProcessForOverlays();
   EXPECT_EQ(0U, ca_layer_list_.size());
 }
@@ -3518,7 +3518,8 @@
     auto* quad = pass_->CreateAndAppendDrawQuad<RenderPassDrawQuad>();
     quad->SetNew(pass_->shared_quad_state_list.back(), kOverlayRect,
                  kOverlayRect, render_pass_id_, 2, gfx::RectF(), gfx::Size(),
-                 gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false);
+                 gfx::Vector2dF(1, 1), gfx::PointF(), gfx::RectF(), false,
+                 1.0f);
   }
 
   ProcessForOverlays();
diff --git a/components/viz/service/display/renderer_pixeltest.cc b/components/viz/service/display/renderer_pixeltest.cc
index 22ff9e6e..f11650ad 100644
--- a/components/viz/service/display/renderer_pixeltest.cc
+++ b/components/viz/service/display/renderer_pixeltest.cc
@@ -179,7 +179,8 @@
                gfx::Vector2dF(),  // filters scale
                gfx::PointF(),     // filter origin
                gfx::RectF(rect),  // tex_coord_rect
-               false);            // force_anti_aliasing_off
+               false,             // force_anti_aliasing_off
+               1.0f);             // backdrop_filter_quality
 }
 
 void CreateTestTwoColoredTextureDrawQuad(
@@ -1964,7 +1965,7 @@
   render_pass_quad->SetNew(pass_shared_state, pass_rect, pass_rect,
                            child_pass_id, 0, gfx::RectF(), gfx::Size(),
                            gfx::Vector2dF(), gfx::PointF(),
-                           gfx::RectF(pass_rect), false);
+                           gfx::RectF(pass_rect), false, 1.0f);
 
   RenderPassList pass_list;
   pass_list.push_back(std::move(child_pass));
@@ -2024,7 +2025,7 @@
   render_pass_quad->SetNew(pass_shared_state, pass_rect, pass_rect,
                            child_pass_id, 0, gfx::RectF(), gfx::Size(),
                            gfx::Vector2dF(), gfx::PointF(),
-                           gfx::RectF(pass_rect), false);
+                           gfx::RectF(pass_rect), false, 1.0f);
 
   RenderPassList pass_list;
   pass_list.push_back(std::move(child_pass));
@@ -2085,7 +2086,7 @@
   render_pass_quad->SetNew(pass_shared_state, pass_rect, pass_rect,
                            child_pass_id, 0, gfx::RectF(), gfx::Size(),
                            gfx::Vector2dF(), gfx::PointF(),
-                           gfx::RectF(pass_rect), false);
+                           gfx::RectF(pass_rect), false, 1.0f);
 
   RenderPassList pass_list;
   pass_list.push_back(std::move(child_pass));
@@ -2167,7 +2168,7 @@
   render_pass_quad->SetNew(pass_shared_state, pass_rect, pass_rect,
                            child_pass_id, 0, gfx::RectF(), gfx::Size(),
                            gfx::Vector2dF(), gfx::PointF(),
-                           gfx::RectF(pass_rect), false);
+                           gfx::RectF(pass_rect), false, 1.0f);
 
   RenderPassList pass_list;
 
@@ -2360,7 +2361,8 @@
       gfx::Vector2dF(),                          // filters scale
       gfx::PointF(),                             // filter origin
       gfx::RectF(sub_rect),                      // tex_coord_rect
-      false);                                    // force_anti_aliasing_off
+      false,                                     // force_anti_aliasing_off
+      1.0f);                                     // backdrop_filter_quality
   // White background behind the masked render pass.
   auto* white = root_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
   white->SetNew(root_pass_shared_state, viewport_rect, viewport_rect,
@@ -2456,7 +2458,8 @@
       gfx::Vector2dF(),                          // filters scale
       gfx::PointF(),                             // filter origin
       gfx::RectF(sub_rect),                      // tex_coord_rect
-      false);                                    // force_anti_aliasing_off
+      false,                                     // force_anti_aliasing_off
+      1.0f);                                     // backdrop_filter_quality
   // White background behind the masked render pass.
   auto* white = root_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
   white->SetNew(root_pass_shared_state, viewport_rect, viewport_rect,
@@ -2516,7 +2519,8 @@
                                gfx::Vector2dF(1.0f, 1.0f),  // filters_scale
                                gfx::PointF(),               // filters_origin
                                gfx::RectF(),                // tex_coord_rect
-                               false);  // force_anti_aliasing_off
+                               false,  // force_anti_aliasing_off
+                               1.0f);  // backdrop_filter_quality
     }
 
     const int kColumnWidth = device_viewport_rect.width() / 3;
@@ -2856,6 +2860,7 @@
 
   bool needs_blending = false;
   bool force_anti_aliasing_off = true;
+  float backdrop_filter_quality = 1.0f;
   gfx::Transform hole_pass_to_target_transform;
   hole_pass_to_target_transform.Translate(50, 50);
   hole_pass_to_target_transform.Scale(0.5f + 1.0f / (rect.width() * 2.0f),
@@ -2867,7 +2872,7 @@
   pass_quad->SetAll(pass_shared_state, rect, rect, needs_blending,
                     child_pass_id, 0, gfx::RectF(), gfx::Size(),
                     gfx::Vector2dF(), gfx::PointF(), gfx::RectF(rect),
-                    force_anti_aliasing_off);
+                    force_anti_aliasing_off, backdrop_filter_quality);
 
   gfx::Transform green_quad_to_target_transform;
   SharedQuadState* green_shared_state = CreateTestSharedQuadState(
@@ -3035,7 +3040,7 @@
   child_pass_quad->SetNew(child_pass_shared_state, child_pass_rect,
                           child_pass_rect, child_pass_id, 0, gfx::RectF(),
                           gfx::Size(), gfx::Vector2dF(), gfx::PointF(),
-                          gfx::RectF(child_pass_rect), false);
+                          gfx::RectF(child_pass_rect), false, 1.0f);
 
   RenderPassList pass_list;
   pass_list.push_back(std::move(child_pass));
diff --git a/components/viz/service/display/surface_aggregator.cc b/components/viz/service/display/surface_aggregator.cc
index 4b770ef..a759fe59 100644
--- a/components/viz/service/display/surface_aggregator.cc
+++ b/components/viz/service/display/surface_aggregator.cc
@@ -425,7 +425,8 @@
     quad->SetNew(shared_quad_state, scaled_rect, scaled_visible_rect,
                  remapped_pass_id, 0, gfx::RectF(), gfx::Size(),
                  gfx::Vector2dF(), gfx::PointF(), gfx::RectF(scaled_rect),
-                 /*force_anti_aliasing_off=*/false);
+                 /*force_anti_aliasing_off=*/false,
+                 /* backdrop_filter_quality*/ 1.0f);
   }
 
   // Need to re-query since referenced_surfaces_ iterators are not stable.
@@ -534,7 +535,8 @@
   quad->SetNew(shared_quad_state, output_rect, output_rect,
                root_render_pass->id, 0, gfx::RectF(), gfx::Size(),
                gfx::Vector2dF(), gfx::PointF(), gfx::RectF(output_rect),
-               /*force_anti_aliasing_off=*/false);
+               /*force_anti_aliasing_off=*/false,
+               /*backdrop_filter_quality*/ 1.0f);
   dest_pass_list_->push_back(std::move(color_conversion_pass));
 }
 
diff --git a/components/viz/service/display/surface_aggregator_unittest.cc b/components/viz/service/display/surface_aggregator_unittest.cc
index 5b53cff..d020d39 100644
--- a/components/viz/service/display/surface_aggregator_unittest.cc
+++ b/components/viz/service/display/surface_aggregator_unittest.cc
@@ -328,7 +328,7 @@
     auto* quad = pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>();
     quad->SetNew(shared_state, output_rect, output_rect, render_pass_id, 0,
                  gfx::RectF(), gfx::Size(), gfx::Vector2dF(), gfx::PointF(),
-                 gfx::RectF(), false);
+                 gfx::RectF(), false, 1.0f);
   }
 
  protected:
diff --git a/components/viz/service/surfaces/surface_manager.cc b/components/viz/service/surfaces/surface_manager.cc
index b1c84663..dbe663b 100644
--- a/components/viz/service/surfaces/surface_manager.cc
+++ b/components/viz/service/surfaces/surface_manager.cc
@@ -172,15 +172,6 @@
     RemoveSurfaceReferenceImpl(reference);
 }
 
-void SurfaceManager::DropTemporaryReference(const SurfaceId& surface_id) {
-  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-
-  if (!HasTemporaryReference(surface_id))
-    return;
-
-  RemoveTemporaryReference(surface_id, RemovedReason::DROPPED);
-}
-
 void SurfaceManager::GarbageCollectSurfaces() {
   TRACE_EVENT0("viz", "SurfaceManager::GarbageCollectSurfaces");
   if (surfaces_to_destroy_.empty())
diff --git a/components/viz/service/surfaces/surface_manager.h b/components/viz/service/surfaces/surface_manager.h
index 3c6d908..7420976 100644
--- a/components/viz/service/surfaces/surface_manager.h
+++ b/components/viz/service/surfaces/surface_manager.h
@@ -170,11 +170,6 @@
   // collection to delete unreachable surfaces.
   void RemoveSurfaceReferences(const std::vector<SurfaceReference>& references);
 
-  // Drops the temporary reference for |surface_id|. If a surface reference has
-  // already been added from the parent to |surface_id| then this will do
-  // nothing.
-  void DropTemporaryReference(const SurfaceId& surface_id);
-
   // Garbage collects all destroyed surfaces that aren't live.
   void GarbageCollectSurfaces();
 
diff --git a/components/viz/test/surface_hittest_test_helpers.cc b/components/viz/test/surface_hittest_test_helpers.cc
index 8f2d32b..11ebfff 100644
--- a/components/viz/test/surface_hittest_test_helpers.cc
+++ b/components/viz/test/surface_hittest_test_helpers.cc
@@ -44,7 +44,7 @@
   render_pass_quad->SetNew(pass->shared_quad_state_list.back(), quad_rect,
                            quad_rect, render_pass_id, ResourceId(),
                            gfx::RectF(), gfx::Size(), gfx::Vector2dF(),
-                           gfx::PointF(), gfx::RectF(), false);
+                           gfx::PointF(), gfx::RectF(), false, 1.0f);
 }
 
 void CreateSurfaceDrawQuad(RenderPass* pass,
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 38da8bd..e500ec5b 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -718,6 +718,8 @@
     "devtools/shared_worker_devtools_manager.h",
     "devtools/target_registry.cc",
     "devtools/target_registry.h",
+    "devtools/worker_devtools_agent_host.cc",
+    "devtools/worker_devtools_agent_host.h",
     "discardable_shared_memory_manager.cc",
     "display_cutout/display_cutout_constants.h",
     "display_cutout/display_cutout_host_impl.cc",
diff --git a/content/browser/accessibility/browser_accessibility_android.cc b/content/browser/accessibility/browser_accessibility_android.cc
index 1c2181f9..abd54db 100644
--- a/content/browser/accessibility/browser_accessibility_android.cc
+++ b/content/browser/accessibility/browser_accessibility_android.cc
@@ -51,6 +51,53 @@
   ANDROID_VIEW_ACCESSIBILITY_RANGE_TYPE_FLOAT = 1
 };
 
+static bool HasListAncestor(const content::BrowserAccessibility* node) {
+  if (node == nullptr)
+    return false;  // Base case
+
+  if (ui::IsStaticList(node->GetRole()))
+    return true;
+
+  return HasListAncestor(node->InternalGetParent());
+}
+
+static bool HasListDescendant(const content::BrowserAccessibility* current,
+                              const content::BrowserAccessibility* root) {
+  // Only check role of descendants
+  if (current != root) {
+    if (ui::IsStaticList(current->GetRole()))
+      return true;
+  }
+
+  int num_children = current->InternalChildCount();
+
+  for (int i = 0; i < num_children; ++i) {
+    if (HasListDescendant(current->InternalGetChild(i), root))
+      return true;
+  }
+  return false;
+}
+
+/*
+Determines:
+1. If this is an ancestor of any lists
+2. If this list is a descendant of any lists
+Talkback uses this information to report if the list has levels, and if so,
+which level is currently selected
+*/
+static bool IsHierarchicalList(const content::BrowserAccessibility* node) {
+  // Only makes sense to run if |node| is already a list
+  DCHECK(ui::IsStaticList(node->GetRole()));
+
+  if (node == nullptr)
+    return false;
+
+  bool found_list_in_descendants = HasListDescendant(node, node);
+  bool found_list_in_ancestors = HasListAncestor(node->InternalGetParent());
+
+  return (found_list_in_descendants || found_list_in_ancestors);
+}
+
 }  // namespace
 
 namespace content {
@@ -256,9 +303,8 @@
 }
 
 bool BrowserAccessibilityAndroid::IsHierarchical() const {
-  return (GetRole() == ax::mojom::Role::kList ||
-          GetRole() == ax::mojom::Role::kDescriptionList ||
-          GetRole() == ax::mojom::Role::kTree);
+  return (GetRole() == ax::mojom::Role::kTree ||
+          (ui::IsStaticList(GetRole()) && IsHierarchicalList(this)));
 }
 
 bool BrowserAccessibilityAndroid::IsLink() const {
diff --git a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
index f5afdf7c..c0f3388f 100644
--- a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
+++ b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
@@ -1874,6 +1874,10 @@
   RunHtmlTest(FILE_PATH_LITERAL("label-with-presentational-child.html"));
 }
 
+IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityNestedList) {
+  RunHtmlTest(FILE_PATH_LITERAL("nestedlist.html"));
+}
+
 //
 // Regression tests. These don't test a specific web platform feature,
 // they test a specific web page that crashed or had some bad behavior
diff --git a/content/browser/blob_storage/blob_url_browsertest.cc b/content/browser/blob_storage/blob_url_browsertest.cc
index 3932fca..e07b0de 100644
--- a/content/browser/blob_storage/blob_url_browsertest.cc
+++ b/content/browser/blob_storage/blob_url_browsertest.cc
@@ -137,8 +137,8 @@
   EXPECT_FALSE(
       base::MatchPattern(new_contents->GetVisibleURL().spec(), "*spoof*"));
   // The currently implemented behavior is that the URL gets rewritten to
-  // about:blank.
-  EXPECT_EQ("about:blank", new_contents->GetVisibleURL().spec());
+  // about:blank#blocked.
+  EXPECT_EQ(kBlockedURL, new_contents->GetVisibleURL().spec());
   std::string page_content;
   EXPECT_TRUE(ExecuteScriptAndExtractString(
       new_contents,
@@ -177,8 +177,8 @@
       base::MatchPattern(new_contents->GetVisibleURL().spec(), "*spoof*"));
 
   // The currently implemented behavior is that the URL gets rewritten to
-  // about:blank. The content of the page stays the same.
-  EXPECT_EQ("about:blank", new_contents->GetVisibleURL().spec());
+  // about:blank#blocked. The content of the page stays the same.
+  EXPECT_EQ(kBlockedURL, new_contents->GetVisibleURL().spec());
   std::string page_content;
   EXPECT_TRUE(ExecuteScriptAndExtractString(
       new_contents,
diff --git a/content/browser/devtools/browser_devtools_agent_host.cc b/content/browser/devtools/browser_devtools_agent_host.cc
index 210ef3a..9d46d3e 100644
--- a/content/browser/devtools/browser_devtools_agent_host.cc
+++ b/content/browser/devtools/browser_devtools_agent_host.cc
@@ -79,7 +79,8 @@
   }
   session->SetBrowserOnly(true);
   session->AddHandler(std::make_unique<protocol::TargetHandler>(
-      protocol::TargetHandler::AccessMode::kBrowser, GetId(), registry));
+      protocol::TargetHandler::AccessMode::kBrowser, GetId(),
+      GetRendererChannel(), registry));
   if (only_discovery_)
     return true;
 
diff --git a/content/browser/devtools/devtools_agent_host_impl.cc b/content/browser/devtools/devtools_agent_host_impl.cc
index 2c78d0f..2dc1f1d 100644
--- a/content/browser/devtools/devtools_agent_host_impl.cc
+++ b/content/browser/devtools/devtools_agent_host_impl.cc
@@ -40,6 +40,7 @@
 
 const char DevToolsAgentHost::kTypePage[] = "page";
 const char DevToolsAgentHost::kTypeFrame[] = "iframe";
+const char DevToolsAgentHost::kTypeDedicatedWorker[] = "worker";
 const char DevToolsAgentHost::kTypeSharedWorker[] = "shared_worker";
 const char DevToolsAgentHost::kTypeServiceWorker[] = "service_worker";
 const char DevToolsAgentHost::kTypeBrowser[] = "browser";
@@ -73,6 +74,8 @@
   for (const auto& host : service_list)
     result.push_back(host);
 
+  // TODO(dgozman): we should add dedicated workers here, but clients are not
+  // ready.
   RenderFrameDevToolsAgentHost::AddAllAgentHosts(&result);
 
 #if DCHECK_IS_ON()
diff --git a/content/browser/devtools/devtools_agent_host_impl.h b/content/browser/devtools/devtools_agent_host_impl.h
index 46823e3a..ac21296 100644
--- a/content/browser/devtools/devtools_agent_host_impl.h
+++ b/content/browser/devtools/devtools_agent_host_impl.h
@@ -12,6 +12,7 @@
 #include "base/compiler_specific.h"
 #include "base/containers/flat_map.h"
 #include "base/containers/flat_set.h"
+#include "base/macros.h"
 #include "base/process/kill.h"
 #include "content/browser/devtools/devtools_io_context.h"
 #include "content/browser/devtools/devtools_renderer_channel.h"
@@ -19,7 +20,6 @@
 #include "content/common/content_export.h"
 #include "content/public/browser/certificate_request_result_type.h"
 #include "content/public/browser/devtools_agent_host.h"
-#include "third_party/blink/public/web/devtools_agent.mojom.h"
 
 namespace content {
 
@@ -114,6 +114,8 @@
   DevToolsIOContext io_context_;
   DevToolsRendererChannel renderer_channel_;
   static int s_force_creation_count_;
+
+  DISALLOW_COPY_AND_ASSIGN(DevToolsAgentHostImpl);
 };
 
 }  // namespace content
diff --git a/content/browser/devtools/devtools_renderer_channel.cc b/content/browser/devtools/devtools_renderer_channel.cc
index bd09fc1..23cd857 100644
--- a/content/browser/devtools/devtools_renderer_channel.cc
+++ b/content/browser/devtools/devtools_renderer_channel.cc
@@ -7,6 +7,9 @@
 #include "content/browser/devtools/devtools_agent_host_impl.h"
 #include "content/browser/devtools/devtools_session.h"
 #include "content/browser/devtools/protocol/devtools_domain_handler.h"
+#include "content/browser/devtools/protocol/target_auto_attacher.h"
+#include "content/browser/devtools/worker_devtools_agent_host.h"
+#include "content/public/browser/render_process_host.h"
 #include "content/public/common/child_process_host.h"
 #include "ui/gfx/geometry/point.h"
 
@@ -15,43 +18,136 @@
 DevToolsRendererChannel::DevToolsRendererChannel(DevToolsAgentHostImpl* owner)
     : owner_(owner),
       binding_(this),
-      process_id_(ChildProcessHost::kInvalidUniqueID) {}
+      associated_binding_(this),
+      process_id_(ChildProcessHost::kInvalidUniqueID),
+      weak_factory_(this) {}
 
 DevToolsRendererChannel::~DevToolsRendererChannel() = default;
 
 void DevToolsRendererChannel::SetRenderer(
+    blink::mojom::DevToolsAgentPtr agent_ptr,
+    blink::mojom::DevToolsAgentHostRequest host_request,
+    int process_id,
+    RenderFrameHostImpl* frame_host) {
+  CleanupConnection();
+  agent_ptr_ = std::move(agent_ptr);
+  if (host_request)
+    binding_.Bind(std::move(host_request));
+  SetRendererInternal(agent_ptr_.get(), process_id, frame_host);
+}
+
+void DevToolsRendererChannel::SetRendererAssociated(
     blink::mojom::DevToolsAgentAssociatedPtr agent_ptr,
     blink::mojom::DevToolsAgentHostAssociatedRequest host_request,
     int process_id,
     RenderFrameHostImpl* frame_host) {
-  binding_.Close();
+  CleanupConnection();
+  associated_agent_ptr_ = std::move(agent_ptr);
   if (host_request)
-    binding_.Bind(std::move(host_request));
-  agent_ptr_ = std::move(agent_ptr);
+    associated_binding_.Bind(std::move(host_request));
+  SetRendererInternal(associated_agent_ptr_.get(), process_id, frame_host);
+}
+
+void DevToolsRendererChannel::CleanupConnection() {
+  binding_.Close();
+  associated_binding_.Close();
+  associated_agent_ptr_ = nullptr;
+  agent_ptr_ = nullptr;
+}
+
+void DevToolsRendererChannel::SetRendererInternal(
+    blink::mojom::DevToolsAgent* agent,
+    int process_id,
+    RenderFrameHostImpl* frame_host) {
   process_id_ = process_id;
   frame_host_ = frame_host;
+  if (agent && !report_attachers_.empty()) {
+    agent->ReportChildWorkers(true /* report */,
+                              !wait_for_debugger_attachers_.empty());
+  }
   for (DevToolsSession* session : owner_->sessions()) {
     for (auto& pair : session->handlers())
       pair.second->SetRenderer(process_id_, frame_host_);
-    session->AttachToAgent(agent_ptr_.get());
+    session->AttachToAgent(agent);
   }
 }
 
 void DevToolsRendererChannel::AttachSession(DevToolsSession* session) {
-  if (!agent_ptr_)
+  if (!agent_ptr_ && !associated_agent_ptr_)
     owner_->UpdateRendererChannel(true /* force */);
   for (auto& pair : session->handlers())
     pair.second->SetRenderer(process_id_, frame_host_);
-  session->AttachToAgent(agent_ptr_.get());
+  if (agent_ptr_)
+    session->AttachToAgent(agent_ptr_.get());
+  else if (associated_agent_ptr_)
+    session->AttachToAgent(associated_agent_ptr_.get());
 }
 
 void DevToolsRendererChannel::InspectElement(const gfx::Point& point) {
-  if (!agent_ptr_)
+  if (!agent_ptr_ && !associated_agent_ptr_)
     owner_->UpdateRendererChannel(true /* force */);
-  // Previous call might update |agent_ptr_|
-  // via SetRenderer(), so we should check it again.
+  // Previous call might update |agent_ptr_| or |associated_agent_ptr_|
+  // via SetRenderer(), so we should check them again.
   if (agent_ptr_)
     agent_ptr_->InspectElement(point);
+  else if (associated_agent_ptr_)
+    associated_agent_ptr_->InspectElement(point);
+}
+
+void DevToolsRendererChannel::SetReportChildWorkers(
+    protocol::TargetAutoAttacher* attacher,
+    bool report,
+    bool wait_for_debugger) {
+  if (report) {
+    if (report_attachers_.find(attacher) == report_attachers_.end()) {
+      report_attachers_.insert(attacher);
+      for (DevToolsAgentHostImpl* host : child_workers_)
+        attacher->ChildWorkerCreated(host, false /* waiting_for_debugger */);
+    }
+  } else {
+    report_attachers_.erase(attacher);
+  }
+  if (wait_for_debugger)
+    wait_for_debugger_attachers_.insert(attacher);
+  else
+    wait_for_debugger_attachers_.erase(attacher);
+  if (agent_ptr_) {
+    agent_ptr_->ReportChildWorkers(!report_attachers_.empty(),
+                                   !wait_for_debugger_attachers_.empty());
+  } else if (associated_agent_ptr_) {
+    associated_agent_ptr_->ReportChildWorkers(
+        !report_attachers_.empty(), !wait_for_debugger_attachers_.empty());
+  }
+}
+
+void DevToolsRendererChannel::ChildWorkerCreated(
+    blink::mojom::DevToolsAgentPtr worker_devtools_agent,
+    blink::mojom::DevToolsAgentHostRequest host_request,
+    const GURL& url,
+    const base::UnguessableToken& devtools_worker_token,
+    bool waiting_for_debugger) {
+  if (content::DevToolsAgentHost::GetForId(devtools_worker_token.ToString())) {
+    mojo::ReportBadMessage("Workers should have unique tokens.");
+    return;
+  }
+  RenderProcessHost* process = RenderProcessHost::FromID(process_id_);
+  if (!process)
+    return;
+  GURL filtered_url = url;
+  process->FilterURL(true /* empty_allowed */, &filtered_url);
+  auto agent_host = base::MakeRefCounted<WorkerDevToolsAgentHost>(
+      process_id_, std::move(worker_devtools_agent), std::move(host_request),
+      filtered_url, devtools_worker_token, owner_->GetId(),
+      base::BindOnce(&DevToolsRendererChannel::ChildWorkerDestroyed,
+                     weak_factory_.GetWeakPtr()));
+  child_workers_.insert(agent_host.get());
+  for (protocol::TargetAutoAttacher* attacher : report_attachers_)
+    attacher->ChildWorkerCreated(agent_host.get(), waiting_for_debugger);
+}
+
+void DevToolsRendererChannel::ChildWorkerDestroyed(
+    DevToolsAgentHostImpl* host) {
+  child_workers_.erase(host);
 }
 
 }  // namespace content
diff --git a/content/browser/devtools/devtools_renderer_channel.h b/content/browser/devtools/devtools_renderer_channel.h
index 1e39045..10ec64a 100644
--- a/content/browser/devtools/devtools_renderer_channel.h
+++ b/content/browser/devtools/devtools_renderer_channel.h
@@ -5,7 +5,9 @@
 #ifndef CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_RENDERER_CHANNEL_H_
 #define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_RENDERER_CHANNEL_H_
 
+#include "base/containers/flat_set.h"
 #include "base/macros.h"
+#include "base/memory/weak_ptr.h"
 #include "content/common/content_export.h"
 #include "mojo/public/cpp/bindings/associated_binding.h"
 #include "mojo/public/cpp/bindings/binding.h"
@@ -21,9 +23,14 @@
 class DevToolsSession;
 class RenderFrameHostImpl;
 
+namespace protocol {
+class TargetAutoAttacher;
+}
+
 // This class encapsulates a connection to blink::mojom::DevToolsAgent
-// in the renderer.
-// When the renderer changes, different DevToolsAgentHostImpl subclasses
+// in the renderer (either RenderFrame or some kind of worker).
+// When the renderer changes (e.g. worker restarts or a new RenderFrame
+// is used for the frame), different DevToolsAgentHostImpl subclasses
 // retrieve a new blink::mojom::DevToolsAgent pointer, and this channel
 // starts using it for all existing and future sessions.
 class CONTENT_EXPORT DevToolsRendererChannel
@@ -32,7 +39,14 @@
   explicit DevToolsRendererChannel(DevToolsAgentHostImpl* owner);
   ~DevToolsRendererChannel() override;
 
-  void SetRenderer(
+  // Dedicated workers use non-associated version,
+  // while frames and other workers use DevToolsAgent associated
+  // with respective control interfraces. See mojom for details.
+  void SetRenderer(blink::mojom::DevToolsAgentPtr agent_ptr,
+                   blink::mojom::DevToolsAgentHostRequest host_request,
+                   int process_id,
+                   RenderFrameHostImpl* frame_host);
+  void SetRendererAssociated(
       blink::mojom::DevToolsAgentAssociatedPtr agent_ptr,
       blink::mojom::DevToolsAgentHostAssociatedRequest host_request,
       int process_id,
@@ -40,12 +54,35 @@
   void AttachSession(DevToolsSession* session);
   void InspectElement(const gfx::Point& point);
 
+  void SetReportChildWorkers(protocol::TargetAutoAttacher* attacher,
+                             bool report,
+                             bool wait_for_debugger);
+
  private:
+  // blink::mojom::DevToolsAgentHost implementation.
+  void ChildWorkerCreated(blink::mojom::DevToolsAgentPtr worker_devtools_agent,
+                          blink::mojom::DevToolsAgentHostRequest host_request,
+                          const GURL& url,
+                          const base::UnguessableToken& devtools_worker_token,
+                          bool waiting_for_debugger) override;
+  void ChildWorkerDestroyed(DevToolsAgentHostImpl*);
+
+  void CleanupConnection();
+  void SetRendererInternal(blink::mojom::DevToolsAgent* agent,
+                           int process_id,
+                           RenderFrameHostImpl* frame_host);
+
   DevToolsAgentHostImpl* owner_;
-  mojo::AssociatedBinding<blink::mojom::DevToolsAgentHost> binding_;
-  blink::mojom::DevToolsAgentAssociatedPtr agent_ptr_;
+  mojo::Binding<blink::mojom::DevToolsAgentHost> binding_;
+  mojo::AssociatedBinding<blink::mojom::DevToolsAgentHost> associated_binding_;
+  blink::mojom::DevToolsAgentPtr agent_ptr_;
+  blink::mojom::DevToolsAgentAssociatedPtr associated_agent_ptr_;
   int process_id_;
   RenderFrameHostImpl* frame_host_ = nullptr;
+  base::flat_set<protocol::TargetAutoAttacher*> report_attachers_;
+  base::flat_set<protocol::TargetAutoAttacher*> wait_for_debugger_attachers_;
+  base::flat_set<DevToolsAgentHostImpl*> child_workers_;
+  base::WeakPtrFactory<DevToolsRendererChannel> weak_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(DevToolsRendererChannel);
 };
diff --git a/content/browser/devtools/protocol/page_handler.cc b/content/browser/devtools/protocol/page_handler.cc
index 6826781..89245864 100644
--- a/content/browser/devtools/protocol/page_handler.cc
+++ b/content/browser/devtools/protocol/page_handler.cc
@@ -10,7 +10,6 @@
 #include <utility>
 #include <vector>
 
-#include "base/base64.h"
 #include "base/bind.h"
 #include "base/location.h"
 #include "base/memory/ref_counted.h"
@@ -75,9 +74,9 @@
 constexpr int kCaptureRetryLimit = 2;
 constexpr int kMaxScreencastFramesInFlight = 2;
 
-std::string EncodeImage(const gfx::Image& image,
-                        const std::string& format,
-                        int quality) {
+Binary EncodeImage(const gfx::Image& image,
+                   const std::string& format,
+                   int quality) {
   DCHECK(!image.IsEmpty());
 
   scoped_refptr<base::RefCountedMemory> data;
@@ -90,20 +89,14 @@
   }
 
   if (!data || !data->front())
-    return std::string();
+    return protocol::Binary();
 
-  std::string base_64_data;
-  base::Base64Encode(
-      base::StringPiece(reinterpret_cast<const char*>(data->front()),
-                        data->size()),
-      &base_64_data);
-
-  return base_64_data;
+  return Binary::fromRefCounted(data);
 }
 
-std::string EncodeSkBitmap(const SkBitmap& image,
-                           const std::string& format,
-                           int quality) {
+Binary EncodeSkBitmap(const SkBitmap& image,
+                      const std::string& format,
+                      int quality) {
   return EncodeImage(gfx::Image::CreateFrom1xBitmap(image), format, quality);
 }
 
@@ -1036,8 +1029,8 @@
 
 void PageHandler::ScreencastFrameEncoded(
     std::unique_ptr<Page::ScreencastFrameMetadata> page_metadata,
-    const std::string& data) {
-  if (data.empty()) {
+    const protocol::Binary& data) {
+  if (data.size() == 0) {
     --frames_in_flight_;
     return;  // Encode failed.
   }
diff --git a/content/browser/devtools/protocol/page_handler.h b/content/browser/devtools/protocol/page_handler.h
index ba523ccc..46b9484 100644
--- a/content/browser/devtools/protocol/page_handler.h
+++ b/content/browser/devtools/protocol/page_handler.h
@@ -165,7 +165,7 @@
       const SkBitmap& bitmap);
   void ScreencastFrameEncoded(
       std::unique_ptr<Page::ScreencastFrameMetadata> metadata,
-      const std::string& data);
+      const protocol::Binary& data);
 
   void ScreenshotCaptured(
       std::unique_ptr<CaptureScreenshotCallback> callback,
diff --git a/content/browser/devtools/protocol/target_auto_attacher.cc b/content/browser/devtools/protocol/target_auto_attacher.cc
index c194d82..21104799 100644
--- a/content/browser/devtools/protocol/target_auto_attacher.cc
+++ b/content/browser/devtools/protocol/target_auto_attacher.cc
@@ -5,6 +5,7 @@
 #include "content/browser/devtools/protocol/target_auto_attacher.h"
 
 #include "base/containers/queue.h"
+#include "content/browser/devtools/devtools_renderer_channel.h"
 #include "content/browser/devtools/render_frame_devtools_agent_host.h"
 #include "content/browser/devtools/service_worker_devtools_agent_host.h"
 #include "content/browser/frame_host/frame_tree.h"
@@ -86,10 +87,13 @@
 
 }  // namespace
 
-TargetAutoAttacher::TargetAutoAttacher(AttachCallback attach_callback,
-                                       DetachCallback detach_callback)
+TargetAutoAttacher::TargetAutoAttacher(
+    AttachCallback attach_callback,
+    DetachCallback detach_callback,
+    DevToolsRendererChannel* renderer_channel)
     : attach_callback_(attach_callback),
       detach_callback_(detach_callback),
+      renderer_channel_(renderer_channel),
       render_frame_host_(nullptr),
       auto_attach_(false),
       wait_for_debugger_on_start_(false) {}
@@ -222,10 +226,8 @@
 void TargetAutoAttacher::SetAutoAttach(bool auto_attach,
                                        bool wait_for_debugger_on_start) {
   wait_for_debugger_on_start_ = wait_for_debugger_on_start;
-  if (auto_attach_ == auto_attach)
-    return;
-  auto_attach_ = auto_attach;
-  if (auto_attach_) {
+  if (auto_attach && !auto_attach_) {
+    auto_attach_ = true;
     auto_attaching_service_workers_ =
         render_frame_host_ && !render_frame_host_->GetParent();
     if (auto_attaching_service_workers_) {
@@ -233,7 +235,8 @@
       ReattachServiceWorkers(false);
     }
     UpdateFrames();
-  } else {
+  } else if (!auto_attach && auto_attach_) {
+    auto_attach_ = false;
     Hosts empty;
     ReattachTargetsOfType(empty, DevToolsAgentHost::kTypeFrame, false);
     if (auto_attaching_service_workers_) {
@@ -242,8 +245,12 @@
                             false);
       auto_attaching_service_workers_ = false;
     }
+    ReattachTargetsOfType(empty, DevToolsAgentHost::kTypeDedicatedWorker,
+                          false);
     DCHECK(auto_attached_hosts_.empty());
   }
+  renderer_channel_->SetReportChildWorkers(this, auto_attach,
+                                           wait_for_debugger_on_start);
 }
 
 // -------- ServiceWorkerDevToolsManager::Observer ----------
@@ -278,5 +285,11 @@
   ReattachServiceWorkers(false);
 }
 
+void TargetAutoAttacher::ChildWorkerCreated(DevToolsAgentHostImpl* agent_host,
+                                            bool waiting_for_debugger) {
+  attach_callback_.Run(agent_host, waiting_for_debugger);
+  auto_attached_hosts_.insert(scoped_refptr<DevToolsAgentHost>(agent_host));
+}
+
 }  // namespace protocol
 }  // namespace content
diff --git a/content/browser/devtools/protocol/target_auto_attacher.h b/content/browser/devtools/protocol/target_auto_attacher.h
index aa8d657f..32adaf3 100644
--- a/content/browser/devtools/protocol/target_auto_attacher.h
+++ b/content/browser/devtools/protocol/target_auto_attacher.h
@@ -11,6 +11,8 @@
 
 namespace content {
 
+class DevToolsAgentHostImpl;
+class DevToolsRendererChannel;
 class NavigationHandleImpl;
 class RenderFrameHostImpl;
 
@@ -19,11 +21,13 @@
 class TargetAutoAttacher : public ServiceWorkerDevToolsManager::Observer {
  public:
   // Second parameter is |waiting_for_debugger|, returns whether it succeeded.
-  using AttachCallback = base::Callback<void(DevToolsAgentHost*, bool)>;
-  using DetachCallback = base::Callback<void(DevToolsAgentHost*)>;
+  using AttachCallback =
+      base::RepeatingCallback<void(DevToolsAgentHost*, bool)>;
+  using DetachCallback = base::RepeatingCallback<void(DevToolsAgentHost*)>;
 
   TargetAutoAttacher(AttachCallback attach_callback,
-                     DetachCallback detach_callback);
+                     DetachCallback detach_callback,
+                     DevToolsRendererChannel* renderer_channel);
   ~TargetAutoAttacher() override;
 
   void SetRenderFrameHost(RenderFrameHostImpl* host);
@@ -34,6 +38,8 @@
 
   bool ShouldThrottleFramesNavigation();
   DevToolsAgentHost* AutoAttachToFrame(NavigationHandleImpl* navigation_handle);
+  void ChildWorkerCreated(DevToolsAgentHostImpl* agent_host,
+                          bool waiting_for_debugger);
 
  private:
   using Hosts = base::flat_set<scoped_refptr<DevToolsAgentHost>>;
@@ -54,6 +60,7 @@
 
   AttachCallback attach_callback_;
   DetachCallback detach_callback_;
+  DevToolsRendererChannel* renderer_channel_;
   RenderFrameHostImpl* render_frame_host_;
   base::flat_set<GURL> frame_urls_;
 
diff --git a/content/browser/devtools/protocol/target_handler.cc b/content/browser/devtools/protocol/target_handler.cc
index 3e03ef91..39a632d 100644
--- a/content/browser/devtools/protocol/target_handler.cc
+++ b/content/browser/devtools/protocol/target_handler.cc
@@ -421,11 +421,14 @@
 
 TargetHandler::TargetHandler(AccessMode access_mode,
                              const std::string& owner_target_id,
+                             DevToolsRendererChannel* renderer_channel,
                              TargetRegistry* target_registry)
     : DevToolsDomainHandler(Target::Metainfo::domainName),
-      auto_attacher_(
-          base::Bind(&TargetHandler::AutoAttach, base::Unretained(this)),
-          base::Bind(&TargetHandler::AutoDetach, base::Unretained(this))),
+      auto_attacher_(base::BindRepeating(&TargetHandler::AutoAttach,
+                                         base::Unretained(this)),
+                     base::BindRepeating(&TargetHandler::AutoDetach,
+                                         base::Unretained(this)),
+                     renderer_channel),
       discover_(false),
       access_mode_(access_mode),
       owner_target_id_(owner_target_id),
@@ -494,17 +497,12 @@
 
 Response TargetHandler::FindSession(Maybe<std::string> session_id,
                                     Maybe<std::string> target_id,
-                                    Session** session,
-                                    bool fall_through) {
+                                    Session** session) {
   *session = nullptr;
-  fall_through &= access_mode_ != AccessMode::kBrowser;
   if (session_id.isJust()) {
     auto it = attached_sessions_.find(session_id.fromJust());
-    if (it == attached_sessions_.end()) {
-      if (fall_through)
-        return Response::FallThrough();
+    if (it == attached_sessions_.end())
       return Response::InvalidParams("No session with given id");
-    }
     *session = it->second.get();
     return Response::OK();
   }
@@ -516,15 +514,10 @@
         *session = it.second.get();
       }
     }
-    if (!*session) {
-      if (fall_through)
-        return Response::FallThrough();
+    if (!*session)
       return Response::InvalidParams("No session for given target id");
-    }
     return Response::OK();
   }
-  if (fall_through)
-    return Response::FallThrough();
   return Response::InvalidParams("Session id must be specified");
 }
 
@@ -556,8 +549,7 @@
   auto_attacher_.SetAutoAttach(auto_attach, wait_for_debugger_on_start);
   if (!auto_attacher_.ShouldThrottleFramesNavigation())
     ClearThrottles();
-  return access_mode_ == AccessMode::kBrowser ? Response::OK()
-                                              : Response::FallThrough();
+  return Response::OK();
 }
 
 Response TargetHandler::SetRemoteLocations(
@@ -600,7 +592,7 @@
     return Response::Error(kNotAllowedError);
   Session* session = nullptr;
   Response response =
-      FindSession(std::move(session_id), std::move(target_id), &session, false);
+      FindSession(std::move(session_id), std::move(target_id), &session);
   if (!response.isSuccess())
     return response;
   session->Detach(false);
@@ -612,7 +604,7 @@
                                             Maybe<std::string> target_id) {
   Session* session = nullptr;
   Response response =
-      FindSession(std::move(session_id), std::move(target_id), &session, true);
+      FindSession(std::move(session_id), std::move(target_id), &session);
   if (!response.isSuccess())
     return response;
   if (session->flatten_protocol_) {
diff --git a/content/browser/devtools/protocol/target_handler.h b/content/browser/devtools/protocol/target_handler.h
index d7e4494..c07c604 100644
--- a/content/browser/devtools/protocol/target_handler.h
+++ b/content/browser/devtools/protocol/target_handler.h
@@ -18,6 +18,7 @@
 namespace content {
 
 class DevToolsAgentHostImpl;
+class DevToolsRendererChannel;
 class NavigationHandle;
 class NavigationThrottle;
 class RenderFrameHostImpl;
@@ -41,6 +42,7 @@
   };
   TargetHandler(AccessMode access_mode,
                 const std::string& owner_target_id,
+                DevToolsRendererChannel* renderer_channel,
                 TargetRegistry* target_registry);
   ~TargetHandler() override;
 
@@ -52,7 +54,6 @@
   Response Disable() override;
 
   void DidCommitNavigation();
-  void RenderFrameHostChanged();
   std::unique_ptr<NavigationThrottle> CreateThrottleForNavigation(
       NavigationHandle* navigation_handle);
 
@@ -104,8 +105,7 @@
   void AutoDetach(DevToolsAgentHost* host);
   Response FindSession(Maybe<std::string> session_id,
                        Maybe<std::string> target_id,
-                       Session** session,
-                       bool fall_through);
+                       Session** session);
   void ClearThrottles();
 
   // DevToolsAgentHostObserver implementation.
diff --git a/content/browser/devtools/render_frame_devtools_agent_host.cc b/content/browser/devtools/render_frame_devtools_agent_host.cc
index 96188ba2..fce65eef 100644
--- a/content/browser/devtools/render_frame_devtools_agent_host.cc
+++ b/content/browser/devtools/render_frame_devtools_agent_host.cc
@@ -247,7 +247,7 @@
       session->client()->MayDiscoverTargets()
           ? protocol::TargetHandler::AccessMode::kRegular
           : protocol::TargetHandler::AccessMode::kAutoAttachOnly,
-      GetId(), registry)));
+      GetId(), GetRendererChannel(), registry)));
   session->AddHandler(base::WrapUnique(new protocol::PageHandler(
       emulation_handler, session->client()->MayAffectLocalFiles())));
   session->AddHandler(base::WrapUnique(new protocol::SecurityHandler()));
@@ -721,7 +721,7 @@
   }
   int process_id = frame_host_ ? frame_host_->GetProcess()->GetID()
                                : ChildProcessHost::kInvalidUniqueID;
-  GetRendererChannel()->SetRenderer(
+  GetRendererChannel()->SetRendererAssociated(
       std::move(agent_ptr), std::move(host_request), process_id, frame_host_);
 }
 
diff --git a/content/browser/devtools/service_worker_devtools_agent_host.cc b/content/browser/devtools/service_worker_devtools_agent_host.cc
index c610a37..64621fd2 100644
--- a/content/browser/devtools/service_worker_devtools_agent_host.cc
+++ b/content/browser/devtools/service_worker_devtools_agent_host.cc
@@ -12,6 +12,7 @@
 #include "content/browser/devtools/protocol/network_handler.h"
 #include "content/browser/devtools/protocol/protocol.h"
 #include "content/browser/devtools/protocol/schema_handler.h"
+#include "content/browser/devtools/protocol/target_handler.h"
 #include "content/browser/devtools/service_worker_devtools_manager.h"
 #include "content/browser/service_worker/service_worker_context_core.h"
 #include "content/browser/service_worker/service_worker_version.h"
@@ -124,6 +125,9 @@
   session->AddHandler(base::WrapUnique(new protocol::NetworkHandler(
       GetId(), devtools_worker_token_, GetIOContext())));
   session->AddHandler(base::WrapUnique(new protocol::SchemaHandler()));
+  session->AddHandler(std::make_unique<protocol::TargetHandler>(
+      protocol::TargetHandler::AccessMode::kAutoAttachOnly, GetId(),
+      GetRendererChannel(), registry));
   if (state_ == WORKER_READY && sessions().empty())
     UpdateIsAttached(true);
   return true;
@@ -142,9 +146,9 @@
   state_ = WORKER_READY;
   blink::mojom::DevToolsAgentAssociatedPtr agent_ptr;
   agent_ptr.Bind(std::move(devtools_agent_ptr_info));
-  GetRendererChannel()->SetRenderer(std::move(agent_ptr),
-                                    std::move(host_request), worker_process_id_,
-                                    nullptr);
+  GetRendererChannel()->SetRendererAssociated(std::move(agent_ptr),
+                                              std::move(host_request),
+                                              worker_process_id_, nullptr);
   if (!sessions().empty())
     UpdateIsAttached(true);
 }
@@ -164,7 +168,7 @@
   state_ = WORKER_TERMINATED;
   for (auto* inspector : protocol::InspectorHandler::ForAgentHost(this))
     inspector->TargetCrashed();
-  GetRendererChannel()->SetRenderer(
+  GetRendererChannel()->SetRendererAssociated(
       nullptr, nullptr, ChildProcessHost::kInvalidUniqueID, nullptr);
   if (!sessions().empty())
     UpdateIsAttached(false);
diff --git a/content/browser/devtools/shared_worker_devtools_agent_host.cc b/content/browser/devtools/shared_worker_devtools_agent_host.cc
index 9d4dd11..bd36f73 100644
--- a/content/browser/devtools/shared_worker_devtools_agent_host.cc
+++ b/content/browser/devtools/shared_worker_devtools_agent_host.cc
@@ -10,6 +10,7 @@
 #include "content/browser/devtools/protocol/network_handler.h"
 #include "content/browser/devtools/protocol/protocol.h"
 #include "content/browser/devtools/protocol/schema_handler.h"
+#include "content/browser/devtools/protocol/target_handler.h"
 #include "content/browser/devtools/shared_worker_devtools_manager.h"
 #include "content/browser/shared_worker/shared_worker_host.h"
 #include "content/browser/shared_worker/shared_worker_instance.h"
@@ -74,6 +75,9 @@
   session->AddHandler(std::make_unique<protocol::NetworkHandler>(
       GetId(), devtools_worker_token_, GetIOContext()));
   session->AddHandler(std::make_unique<protocol::SchemaHandler>());
+  session->AddHandler(std::make_unique<protocol::TargetHandler>(
+      protocol::TargetHandler::AccessMode::kAutoAttachOnly, GetId(),
+      GetRendererChannel(), registry));
   return true;
 }
 
@@ -121,11 +125,11 @@
     blink::mojom::DevToolsAgentAssociatedPtr agent_ptr;
     worker_host_->BindDevToolsAgent(std::move(host_ptr_info),
                                     mojo::MakeRequest(&agent_ptr));
-    GetRendererChannel()->SetRenderer(std::move(agent_ptr),
-                                      std::move(host_request),
-                                      worker_host_->process_id(), nullptr);
+    GetRendererChannel()->SetRendererAssociated(
+        std::move(agent_ptr), std::move(host_request),
+        worker_host_->process_id(), nullptr);
   } else {
-    GetRendererChannel()->SetRenderer(
+    GetRendererChannel()->SetRendererAssociated(
         nullptr, nullptr, ChildProcessHost::kInvalidUniqueID, nullptr);
   }
 }
diff --git a/content/browser/devtools/worker_devtools_agent_host.cc b/content/browser/devtools/worker_devtools_agent_host.cc
new file mode 100644
index 0000000..96d60dc
--- /dev/null
+++ b/content/browser/devtools/worker_devtools_agent_host.cc
@@ -0,0 +1,90 @@
+// 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/devtools/worker_devtools_agent_host.h"
+
+#include "content/browser/devtools/devtools_session.h"
+#include "content/browser/devtools/protocol/target_handler.h"
+#include "content/browser/renderer_host/render_process_host_impl.h"
+#include "content/public/common/child_process_host.h"
+
+namespace content {
+
+WorkerDevToolsAgentHost::WorkerDevToolsAgentHost(
+    int process_id,
+    blink::mojom::DevToolsAgentPtr agent_ptr,
+    blink::mojom::DevToolsAgentHostRequest host_request,
+    const GURL& url,
+    const base::UnguessableToken& devtools_worker_token,
+    const std::string& parent_id,
+    base::OnceCallback<void(DevToolsAgentHostImpl*)> destroyed_callback)
+    : DevToolsAgentHostImpl(devtools_worker_token.ToString()),
+      process_id_(process_id),
+      url_(url),
+      parent_id_(parent_id),
+      destroyed_callback_(std::move(destroyed_callback)) {
+  DCHECK(agent_ptr);
+  DCHECK(!devtools_worker_token.is_empty());
+  AddRef();  // Self keep-alive while the worker agent is alive.
+  agent_ptr.set_connection_error_handler(base::BindOnce(
+      &WorkerDevToolsAgentHost::Disconnected, base::Unretained(this)));
+  NotifyCreated();
+  GetRendererChannel()->SetRenderer(
+      std::move(agent_ptr), std::move(host_request), process_id, nullptr);
+}
+
+WorkerDevToolsAgentHost::~WorkerDevToolsAgentHost() {}
+
+void WorkerDevToolsAgentHost::Disconnected() {
+  ForceDetachAllSessions();
+  GetRendererChannel()->SetRenderer(
+      nullptr, nullptr, ChildProcessHost::kInvalidUniqueID, nullptr);
+  std::move(destroyed_callback_).Run(this);
+  Release();  // Matches AddRef() in constructor.
+}
+
+BrowserContext* WorkerDevToolsAgentHost::GetBrowserContext() {
+  RenderProcessHost* process = RenderProcessHost::FromID(process_id_);
+  return process ? process->GetBrowserContext() : nullptr;
+}
+
+std::string WorkerDevToolsAgentHost::GetType() {
+  return kTypeDedicatedWorker;
+}
+
+std::string WorkerDevToolsAgentHost::GetTitle() {
+  return url_.spec();
+}
+
+std::string WorkerDevToolsAgentHost::GetParentId() {
+  return parent_id_;
+}
+
+GURL WorkerDevToolsAgentHost::GetURL() {
+  return url_;
+}
+
+bool WorkerDevToolsAgentHost::Activate() {
+  return false;
+}
+
+void WorkerDevToolsAgentHost::Reload() {}
+
+bool WorkerDevToolsAgentHost::Close() {
+  return false;
+}
+
+bool WorkerDevToolsAgentHost::AttachSession(DevToolsSession* session,
+                                            TargetRegistry* registry) {
+  session->AddHandler(std::make_unique<protocol::TargetHandler>(
+      protocol::TargetHandler::AccessMode::kAutoAttachOnly, GetId(),
+      GetRendererChannel(), registry));
+  return true;
+}
+
+void WorkerDevToolsAgentHost::DetachSession(DevToolsSession* session) {
+  // Destroying session automatically detaches in renderer.
+}
+
+}  // namespace content
diff --git a/content/browser/devtools/worker_devtools_agent_host.h b/content/browser/devtools/worker_devtools_agent_host.h
new file mode 100644
index 0000000..579c192b
--- /dev/null
+++ b/content/browser/devtools/worker_devtools_agent_host.h
@@ -0,0 +1,56 @@
+// 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_DEVTOOLS_WORKER_DEVTOOLS_AGENT_HOST_H_
+#define CONTENT_BROWSER_DEVTOOLS_WORKER_DEVTOOLS_AGENT_HOST_H_
+
+#include "base/macros.h"
+#include "base/unguessable_token.h"
+#include "content/browser/devtools/devtools_agent_host_impl.h"
+#include "third_party/blink/public/web/devtools_agent.mojom.h"
+#include "url/gurl.h"
+
+namespace content {
+
+class WorkerDevToolsAgentHost : public DevToolsAgentHostImpl {
+ public:
+  WorkerDevToolsAgentHost(
+      int process_id,
+      blink::mojom::DevToolsAgentPtr agent_ptr,
+      blink::mojom::DevToolsAgentHostRequest host_request,
+      const GURL& url,
+      const base::UnguessableToken& devtools_worker_token,
+      const std::string& parent_id,
+      base::OnceCallback<void(DevToolsAgentHostImpl*)> destroyed_callback);
+
+  // DevToolsAgentHost override.
+  BrowserContext* GetBrowserContext() override;
+  std::string GetType() override;
+  std::string GetTitle() override;
+  std::string GetParentId() override;
+  GURL GetURL() override;
+  bool Activate() override;
+  void Reload() override;
+  bool Close() override;
+
+ private:
+  ~WorkerDevToolsAgentHost() override;
+  void Disconnected();
+
+  // DevToolsAgentHostImpl overrides.
+  bool AttachSession(DevToolsSession* session,
+                     TargetRegistry* registry) override;
+  void DetachSession(DevToolsSession* session) override;
+
+  const int process_id_;
+  const GURL url_;
+  const std::string parent_id_;
+  base::OnceCallback<void(DevToolsAgentHostImpl*)> destroyed_callback_;
+
+  DISALLOW_COPY_AND_ASSIGN(WorkerDevToolsAgentHost);
+};
+
+}  // namespace content
+
+#endif  // CONTENT_BROWSER_DEVTOOLS_DEDICATED_WORKER_DEVTOOLS_AGENT_HOST_H_
diff --git a/content/browser/download/download_browsertest.cc b/content/browser/download/download_browsertest.cc
index 97421cd..d30fd21 100644
--- a/content/browser/download/download_browsertest.cc
+++ b/content/browser/download/download_browsertest.cc
@@ -3237,8 +3237,8 @@
 IN_PROC_BROWSER_TEST_F(DownloadContentTest, DownloadAttributeInvalidURL) {
   GURL url = embedded_test_server()->GetURL(
       "/download/download-attribute.html?target=about:version");
-  auto observer = std::make_unique<content::TestNavigationObserver>(
-      GURL(url::kAboutBlankURL));
+  auto observer =
+      std::make_unique<content::TestNavigationObserver>(GURL(kBlockedURL));
   observer->WatchExistingWebContents();
   observer->StartWatchingNewWebContents();
   NavigateToURL(shell(), url);
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index a214fd5..d9c0405 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -10,7 +10,6 @@
 #include "base/bind.h"
 #include "base/callback.h"
 #include "base/debug/alias.h"
-#include "base/debug/dump_without_crashing.h"
 #include "base/i18n/case_conversion.h"
 #include "base/logging.h"
 #include "base/memory/ptr_util.h"
@@ -547,18 +546,12 @@
   uint32_t max_id = download::DownloadItem::kInvalidId;
   for (auto& download : in_progress_downloads) {
     DCHECK(!base::ContainsKey(downloads_by_guid_, download->GetGuid()));
-    // It is problematic to have 2 downloads with the same ID. Log cases that
-    // this happens (without crashing) to track https://crbug.com/898859. Remove
-    // this once the issue is fixed.
+    // If this id is not unique, drop this download, this may happen due to a
+    // previous history DB failure. See http://crbug.com/898859.
+    // TODO(qinmin): remove the downloaded files too if wasn't completed.
     if (base::ContainsKey(downloads_, download->GetId())) {
-      static auto* download_id_error = base::debug::AllocateCrashKeyString(
-          "download_id_error", base::debug::CrashKeySize::Size32);
-      base::debug::SetCrashKeyString(
-          download_id_error,
-          base::StringPrintf(
-              "id = %d, same_guid = %d", download->GetId(),
-              download->GetGuid() == downloads_[download->GetId()]->GetGuid()));
-      base::debug::DumpWithoutCrashing();
+      in_progress_manager_->RemoveInProgressDownload(download->GetGuid());
+      continue;
     }
     uint32_t id = download->GetId();
     if (id > max_id)
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 23ad5f8cc..5014740 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -3683,7 +3683,7 @@
     // This is because the browser treats navigation to an empty GURL as a
     // navigation to the home page. This is often a privileged page
     // (chrome://newtab/) which is exactly what we don't want.
-    *url = GURL(url::kAboutBlankURL);
+    *url = GURL(kBlockedURL);
     return;
   }
 
@@ -3692,7 +3692,7 @@
     // URL.  This prevents us from storing the blocked URL and becoming confused
     // later.
     VLOG(1) << "Blocked URL " << url->spec();
-    *url = GURL(url::kAboutBlankURL);
+    *url = GURL(kBlockedURL);
   }
 }
 
diff --git a/content/browser/renderer_host/render_view_host_unittest.cc b/content/browser/renderer_host/render_view_host_unittest.cc
index 9eaeefd5..b9035ae 100644
--- a/content/browser/renderer_host/render_view_host_unittest.cc
+++ b/content/browser/renderer_host/render_view_host_unittest.cc
@@ -6,6 +6,7 @@
 
 #include "base/macros.h"
 #include "base/path_service.h"
+#include "base/strings/strcat.h"
 #include "base/strings/utf_string_conversions.h"
 #include "content/browser/child_process_security_policy_impl.h"
 #include "content/browser/frame_host/render_frame_host_impl.h"
@@ -73,8 +74,7 @@
   main_test_rfh()->NavigateAndCommitRendererInitiated(
       true, GURL("about:cache"));
   ASSERT_TRUE(controller().GetVisibleEntry());
-  EXPECT_EQ(GURL(url::kAboutBlankURL),
-            controller().GetVisibleEntry()->GetURL());
+  EXPECT_EQ(GURL(kBlockedURL), controller().GetVisibleEntry()->GetURL());
 }
 
 // Create a full screen popup RenderWidgetHost and View.
@@ -130,12 +130,13 @@
   web_contents->set_delegate_view(&delegate_view);
 
   DropData drop_data;
+  GURL blocked_url = GURL(kBlockedURL);
   GURL file_url = GURL("file:///home/user/secrets.txt");
   drop_data.url = file_url;
   drop_data.html_base_url = file_url;
   test_rvh()->TestOnStartDragging(drop_data);
-  EXPECT_EQ(GURL(url::kAboutBlankURL), delegate_view.drag_url());
-  EXPECT_EQ(GURL(url::kAboutBlankURL), delegate_view.html_base_url());
+  EXPECT_EQ(blocked_url, delegate_view.drag_url());
+  EXPECT_EQ(blocked_url, delegate_view.html_base_url());
 
   GURL http_url = GURL("http://www.domain.com/index.html");
   drop_data.url = http_url;
diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc
index 82af608..83ba2c4 100644
--- a/content/browser/security_exploit_browsertest.cc
+++ b/content/browser/security_exploit_browsertest.cc
@@ -1024,12 +1024,12 @@
   }
 
   // Verify that the malicious navigation was blocked.  Currently, this happens
-  // by rewriting the target URL to about:blank.
+  // by rewriting the target URL to about:blank#blocked.
   //
   // TODO(alexmos): Consider killing the renderer process in this case, since
   // this security check is already enforced in the renderer process.
   EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
-  EXPECT_EQ(GURL(url::kAboutBlankURL),
+  EXPECT_EQ(GURL(kBlockedURL),
             child->current_frame_host()->GetLastCommittedURL());
 
   // Navigate to the starting page again to recreate the proxy, then try the
@@ -1048,7 +1048,7 @@
         proxy->GetProcess()->GetChannel(), msg);
   }
   EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
-  EXPECT_EQ(GURL(url::kAboutBlankURL),
+  EXPECT_EQ(GURL(kBlockedURL),
             child->current_frame_host()->GetLastCommittedURL());
 }
 
diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc
index c64d2a37..366f3859 100644
--- a/content/browser/web_contents/web_contents_impl_unittest.cc
+++ b/content/browser/web_contents/web_contents_impl_unittest.cc
@@ -2481,6 +2481,7 @@
   // about:blank
   GURL url_normalized(url::kAboutBlankURL);
   GURL url_from_ipc("about:whatever");
+  GURL url_blocked(kBlockedURL);
 
   // We navigate the test WebContents to about:blank, since NavigateAndCommit
   // will use the given URL to create the NavigationEntry as well, and that
@@ -2490,7 +2491,7 @@
   // Check that an IPC with about:whatever is correctly normalized.
   contents()->TestDidFinishLoad(url_from_ipc);
 
-  EXPECT_EQ(url_normalized, observer.last_url());
+  EXPECT_EQ(url_blocked, observer.last_url());
 
   // Create and navigate another WebContents.
   std::unique_ptr<TestWebContents> other_contents(
@@ -2500,7 +2501,7 @@
 
   // Check that an IPC with about:whatever is correctly normalized.
   other_contents->TestDidFailLoadWithError(url_from_ipc, 1, base::string16());
-  EXPECT_EQ(url_normalized, other_observer.last_url());
+  EXPECT_EQ(url_blocked, other_observer.last_url());
 }
 
 // Test that if a pending contents is deleted before it is shown, we don't
diff --git a/content/public/browser/devtools_agent_host.h b/content/public/browser/devtools_agent_host.h
index 73e2bcc..86d07c8 100644
--- a/content/public/browser/devtools_agent_host.h
+++ b/content/public/browser/devtools_agent_host.h
@@ -40,6 +40,7 @@
  public:
   static const char kTypePage[];
   static const char kTypeFrame[];
+  static const char kTypeDedicatedWorker[];
   static const char kTypeSharedWorker[];
   static const char kTypeServiceWorker[];
   static const char kTypeBrowser[];
diff --git a/content/public/common/url_constants.cc b/content/public/common/url_constants.cc
index e4f7d81..bd65fff8 100644
--- a/content/public/common/url_constants.cc
+++ b/content/public/common/url_constants.cc
@@ -83,6 +83,8 @@
 // have a chrome:// scheme that might let it be confused with a WebUI page.
 const char kUnreachableWebDataURL[] = "chrome-error://chromewebdata/";
 
+const char kBlockedURL[] = "about:blank#blocked";
+
 const char kChromeUIResourcesURL[] = "chrome://resources/";
 const char kChromeUIShorthangURL[] = "chrome://shorthang/";
 
diff --git a/content/public/common/url_constants.h b/content/public/common/url_constants.h
index d134378..6bb00d8 100644
--- a/content/public/common/url_constants.h
+++ b/content/public/common/url_constants.h
@@ -90,6 +90,10 @@
 // Special URL used to start a navigation to an error page.
 CONTENT_EXPORT extern const char kUnreachableWebDataURL[];
 
+// Special URL used to rewrite URLs coming from untrusted processes, when the
+// source process is not allowed access to the initially requested URL.
+CONTENT_EXPORT extern const char kBlockedURL[];
+
 // Full about URLs (including schemes).
 CONTENT_EXPORT extern const char kChromeUINetworkViewCacheURL[];
 CONTENT_EXPORT extern const char kChromeUIResourcesURL[];
diff --git a/content/renderer/media/webrtc/rtc_video_encoder.cc b/content/renderer/media/webrtc/rtc_video_encoder.cc
index 87e80db..abeb4683 100644
--- a/content/renderer/media/webrtc/rtc_video_encoder.cc
+++ b/content/renderer/media/webrtc/rtc_video_encoder.cc
@@ -797,7 +797,6 @@
   webrtc::CodecSpecificInfo info;
   memset(&info, 0, sizeof(info));
   info.codecType = video_codec_type_;
-  info.codec_name = ImplementationName();
   if (video_codec_type_ == webrtc::kVideoCodecVP8) {
     info.codecSpecific.VP8.keyIdx = -1;
   }
@@ -977,4 +976,11 @@
   return RTCVideoEncoder::Impl::ImplementationName();
 }
 
+webrtc::VideoEncoder::EncoderInfo RTCVideoEncoder::GetEncoderInfo() const {
+  EncoderInfo info;
+  info.implementation_name = RTCVideoEncoder::Impl::ImplementationName();
+  info.supports_native_handle = true;
+  return info;
+}
+
 }  // namespace content
diff --git a/content/renderer/media/webrtc/rtc_video_encoder.h b/content/renderer/media/webrtc/rtc_video_encoder.h
index 57ffd31..123b46c0 100644
--- a/content/renderer/media/webrtc/rtc_video_encoder.h
+++ b/content/renderer/media/webrtc/rtc_video_encoder.h
@@ -62,6 +62,7 @@
                             uint32_t framerate) override;
   bool SupportsNativeHandle() const override;
   const char* ImplementationName() const override;
+  EncoderInfo GetEncoderInfo() const override;
 
  private:
   class Impl;
diff --git a/content/test/data/accessibility/aria/aria-directory-expected-android.txt b/content/test/data/accessibility/aria/aria-directory-expected-android.txt
index 53f15e5..53c5958 100644
--- a/content/test/data/accessibility/aria/aria-directory-expected-android.txt
+++ b/content/test/data/accessibility/aria/aria-directory-expected-android.txt
@@ -1,2 +1,2 @@
 android.webkit.WebView focusable focused scrollable
-++android.widget.ListView collection hierarchical
+++android.widget.ListView collection
diff --git a/content/test/data/accessibility/aria/aria-dropeffect-expected-android.txt b/content/test/data/accessibility/aria/aria-dropeffect-expected-android.txt
index d7ffd1b..a9c3977ce 100644
--- a/content/test/data/accessibility/aria/aria-dropeffect-expected-android.txt
+++ b/content/test/data/accessibility/aria/aria-dropeffect-expected-android.txt
@@ -1,5 +1,5 @@
 android.webkit.WebView focusable focused scrollable
-++android.widget.ListView collection hierarchical item_count=7 row_count=7
+++android.widget.ListView collection item_count=7 row_count=7
 ++++android.view.View collection_item
 ++++++android.view.View name='• '
 ++++++android.view.View name='copy'
@@ -20,4 +20,4 @@
 ++++++android.view.View name='none(default)'
 ++++android.view.View collection_item item_index=6 row_index=6
 ++++++android.view.View name='• '
-++++++android.view.View name='link'
\ No newline at end of file
+++++++android.view.View name='link'
diff --git a/content/test/data/accessibility/aria/aria-grabbed-expected-android.txt b/content/test/data/accessibility/aria/aria-grabbed-expected-android.txt
index ed14ee60f..84e095a 100644
--- a/content/test/data/accessibility/aria/aria-grabbed-expected-android.txt
+++ b/content/test/data/accessibility/aria/aria-grabbed-expected-android.txt
@@ -1,5 +1,5 @@
 android.webkit.WebView focusable focused scrollable
-++android.widget.ListView collection hierarchical item_count=3 row_count=3
+++android.widget.ListView collection item_count=3 row_count=3
 ++++android.view.View collection_item
 ++++++android.view.View name='• '
 ++++++android.view.View name='grabbed-true '
@@ -11,4 +11,4 @@
 ++++android.view.View collection_item item_index=2 row_index=2
 ++++++android.view.View name='• '
 ++++++android.view.View name='grabbed-undefined '
-++++++android.widget.Image role_description='graphic' name='blue'
\ No newline at end of file
+++++++android.widget.Image role_description='graphic' name='blue'
diff --git a/content/test/data/accessibility/aria/aria-list-expected-android.txt b/content/test/data/accessibility/aria/aria-list-expected-android.txt
index 0c0029c4..9f3ce12f6 100644
--- a/content/test/data/accessibility/aria/aria-list-expected-android.txt
+++ b/content/test/data/accessibility/aria/aria-list-expected-android.txt
@@ -1,5 +1,5 @@
 android.webkit.WebView focusable focused scrollable
-++android.widget.ListView collection hierarchical item_count=3 row_count=3
+++android.widget.ListView collection item_count=3 row_count=3
 ++++android.view.View collection_item name='1'
 ++++android.view.View collection_item name='2' item_index=1 row_index=1
-++++android.view.View collection_item name='3' item_index=2 row_index=2
\ No newline at end of file
+++++android.view.View collection_item name='3' item_index=2 row_index=2
diff --git a/content/test/data/accessibility/aria/aria-listitem-expected-android.txt b/content/test/data/accessibility/aria/aria-listitem-expected-android.txt
index 27afe5a..3ede4f2d 100644
--- a/content/test/data/accessibility/aria/aria-listitem-expected-android.txt
+++ b/content/test/data/accessibility/aria/aria-listitem-expected-android.txt
@@ -1,4 +1,4 @@
 android.webkit.WebView focusable focused scrollable
-++android.widget.ListView collection hierarchical item_count=2 row_count=2
+++android.widget.ListView collection item_count=2 row_count=2
 ++++android.view.View collection_item name='1'
-++++android.view.View collection_item name='2' item_index=1 row_index=1
\ No newline at end of file
+++++android.view.View collection_item name='2' item_index=1 row_index=1
diff --git a/content/test/data/accessibility/html/dd-expected-android.txt b/content/test/data/accessibility/html/dd-expected-android.txt
index a0f32eb2..5003558e 100644
--- a/content/test/data/accessibility/html/dd-expected-android.txt
+++ b/content/test/data/accessibility/html/dd-expected-android.txt
@@ -1,4 +1,4 @@
 android.webkit.WebView focusable focused scrollable
-++android.widget.ListView collection hierarchical item_count=2 row_count=2
+++android.widget.ListView collection item_count=2 row_count=2
 ++++android.view.View collection_item name='Coffee'
-++++android.view.View role_description='definition' name='Black hot drink'
\ No newline at end of file
+++++android.view.View role_description='definition' name='Black hot drink'
diff --git a/content/test/data/accessibility/html/dl-expected-android.txt b/content/test/data/accessibility/html/dl-expected-android.txt
index 94bf831..d98ab88 100644
--- a/content/test/data/accessibility/html/dl-expected-android.txt
+++ b/content/test/data/accessibility/html/dl-expected-android.txt
@@ -1,5 +1,5 @@
 android.webkit.WebView focusable focused scrollable
-++android.widget.ListView collection hierarchical item_count=2 row_count=2
+++android.widget.ListView collection item_count=2 row_count=2
 ++++android.view.View collection_item name='Term'
 ++++android.view.View role_description='definition' name='Description'
-++android.view.View role_description='definition' name='Definition'
\ No newline at end of file
+++android.view.View role_description='definition' name='Definition'
diff --git a/content/test/data/accessibility/html/dt-expected-android.txt b/content/test/data/accessibility/html/dt-expected-android.txt
index a0f32eb2..5003558e 100644
--- a/content/test/data/accessibility/html/dt-expected-android.txt
+++ b/content/test/data/accessibility/html/dt-expected-android.txt
@@ -1,4 +1,4 @@
 android.webkit.WebView focusable focused scrollable
-++android.widget.ListView collection hierarchical item_count=2 row_count=2
+++android.widget.ListView collection item_count=2 row_count=2
 ++++android.view.View collection_item name='Coffee'
-++++android.view.View role_description='definition' name='Black hot drink'
\ No newline at end of file
+++++android.view.View role_description='definition' name='Black hot drink'
diff --git a/content/test/data/accessibility/html/li-expected-android.txt b/content/test/data/accessibility/html/li-expected-android.txt
index a922e017..2b60dfd 100644
--- a/content/test/data/accessibility/html/li-expected-android.txt
+++ b/content/test/data/accessibility/html/li-expected-android.txt
@@ -1,5 +1,5 @@
 android.webkit.WebView focusable focused scrollable
-++android.widget.ListView collection hierarchical item_count=3 row_count=3
+++android.widget.ListView collection item_count=3 row_count=3
 ++++android.view.View collection_item
 ++++++android.view.View name='• '
 ++++++android.view.View name='Item 1'
diff --git a/content/test/data/accessibility/html/list-expected-android.txt b/content/test/data/accessibility/html/list-expected-android.txt
index cf3a171..b9f6f01 100644
--- a/content/test/data/accessibility/html/list-expected-android.txt
+++ b/content/test/data/accessibility/html/list-expected-android.txt
@@ -1,5 +1,5 @@
 android.webkit.WebView focusable focused scrollable
-++android.widget.ListView collection hierarchical item_count=3 row_count=3
+++android.widget.ListView collection item_count=3 row_count=3
 ++++android.view.View collection_item
 ++++++android.view.View name='• '
 ++++++android.view.View name='tic'
@@ -9,7 +9,7 @@
 ++++android.view.View collection_item item_index=2 row_index=2
 ++++++android.view.View name='• '
 ++++++android.view.View name='toe'
-++android.widget.ListView collection hierarchical item_count=5 row_count=5
+++android.widget.ListView collection item_count=5 row_count=5
 ++++android.view.View collection_item name='tic'
 ++++android.view.View name=' '
 ++++android.view.View collection_item name='tac' item_index=1 row_index=2
diff --git a/content/test/data/accessibility/html/nestedlist-expected-android.txt b/content/test/data/accessibility/html/nestedlist-expected-android.txt
new file mode 100644
index 0000000..dffe4e0
--- /dev/null
+++ b/content/test/data/accessibility/html/nestedlist-expected-android.txt
@@ -0,0 +1,30 @@
+android.webkit.WebView focusable focused scrollable
+++android.view.View name='This is a multi-leveled list'
+++android.widget.ListView collection hierarchical item_count=4 row_count=4
+++++android.view.View collection_item
+++++++android.view.View name='1. '
+++++++android.view.View name='Sports'
+++++++android.widget.ListView collection hierarchical item_count=2 row_count=2
+++++++++android.view.View collection_item
+++++++++++android.view.View name='1. '
+++++++++++android.view.View name='Tennis'
+++++++++android.view.View collection_item item_index=1 row_index=1
+++++++++++android.view.View name='2. '
+++++++++++android.view.View name='basketball'
+++++android.view.View collection_item item_index=1 row_index=1
+++++++android.view.View name='2. '
+++++++android.view.View name='Books'
+++++++android.widget.ListView collection hierarchical item_count=3 row_count=3
+++++++++android.view.View collection_item
+++++++++++android.view.View name='1. '
+++++++++++android.view.View name='Oliver Twist'
+++++++++android.view.View collection_item item_index=1 row_index=1
+++++++++++android.view.View name='2. '
+++++++++++android.view.View name='Kindred'
+++++++++android.view.View collection_item item_index=2 row_index=2
+++++++++++android.view.View name='3. '
+++++++++++android.view.View name='The Promise of Sleep'
+++++android.view.View collection_item item_index=2 row_index=2
+++++++android.view.View name='3. '
+++++++android.view.View name='Recipes'
+++++android.widget.ListView collection hierarchical
diff --git a/content/test/data/accessibility/html/nestedlist.html b/content/test/data/accessibility/html/nestedlist.html
new file mode 100644
index 0000000..f2dbd5f
--- /dev/null
+++ b/content/test/data/accessibility/html/nestedlist.html
@@ -0,0 +1,19 @@
+<p> This is a multi-leveled list </p>
+<ol>
+  <li> Sports
+    <ol>
+      <li> Tennis </li>
+      <li> basketball </li>
+    </ol>
+  </li>
+  <li> Books
+    <ol>
+      <li> Oliver Twist </li>
+      <li> Kindred </li>
+      <li> The Promise of Sleep </li>
+    </ol>
+  </li>
+  <li> Recipes </li>
+    <ol>
+    </ol>
+</ol>
diff --git a/content/test/data/accessibility/html/ol-expected-android.txt b/content/test/data/accessibility/html/ol-expected-android.txt
index f18a585..f821714 100644
--- a/content/test/data/accessibility/html/ol-expected-android.txt
+++ b/content/test/data/accessibility/html/ol-expected-android.txt
@@ -1,5 +1,5 @@
 android.webkit.WebView focusable focused scrollable
-++android.widget.ListView collection hierarchical item_count=3 row_count=3
+++android.widget.ListView collection item_count=3 row_count=3
 ++++android.view.View collection_item
 ++++++android.view.View name='1. '
 ++++++android.view.View name='Chrome'
@@ -9,7 +9,7 @@
 ++++android.view.View collection_item item_index=2 row_index=2
 ++++++android.view.View name='3. '
 ++++++android.view.View name='IE'
-++android.widget.ListView collection hierarchical item_count=3 row_count=3
+++android.widget.ListView collection item_count=3 row_count=3
 ++++android.view.View collection_item
 ++++++android.view.View name='10. '
 ++++++android.view.View name='Android'
diff --git a/content/test/gpu/gpu_tests/depth_capture_expectations.py b/content/test/gpu/gpu_tests/depth_capture_expectations.py
index d4ff0f9..08df17b2 100644
--- a/content/test/gpu/gpu_tests/depth_capture_expectations.py
+++ b/content/test/gpu/gpu_tests/depth_capture_expectations.py
@@ -21,5 +21,10 @@
                ['highsierra', ('amd', 0x6821)], bug=819661)
     self.Flaky('DepthCapture_depthStreamToRGBAUint8Texture',
                ['highsierra', ('intel', 0x0a2e)], bug=824438)
+
+    self.Flaky('DepthCapture_depthStreamToRGBAFloatTexture',
+               ['android', ('qualcomm', 'Adreno (TM) 418')], bug=899748)
+    self.Flaky('DepthCapture_depthStreamToRGBAUint8Texture',
+               ['android', ('qualcomm', 'Adreno (TM) 418')], bug=899748)
     self.Fail('DepthCapture_depthStreamToR32FloatTexture',
               ['android', ('qualcomm', 'Adreno (TM) 330')], bug=765913)
diff --git a/content/test/gpu/gpu_tests/pixel_expectations.py b/content/test/gpu/gpu_tests/pixel_expectations.py
index abc9869..9a709ef 100644
--- a/content/test/gpu/gpu_tests/pixel_expectations.py
+++ b/content/test/gpu/gpu_tests/pixel_expectations.py
@@ -20,14 +20,18 @@
     self.Fail('Pixel_OffscreenCanvasAccelerated2D')
     self.Fail('Pixel_OffscreenCanvasAccelerated2DWorker')
 
-    # Software compositing is not supported on Android; so we skip these tests
-    # that disables gpu compositing on Android platforms.
+    # Software compositing is not supported on Android: we skip the tests that
+    # disable GPU compositing (--disable-gpu-compositing).
     self.Skip('Pixel_OffscreenCanvasUnaccelerated2D', ['android'])
     self.Skip('Pixel_OffscreenCanvasUnaccelerated2DWorker', ['android'])
+    self.Skip('Pixel_OffscreenCanvasUnaccelerated2DGPUCompositing', ['android'])
+    self.Skip('Pixel_OffscreenCanvasUnaccelerated2DGPUCompositingWorker',
+              ['android'])
     self.Skip('Pixel_OffscreenCanvasWebGLSoftwareCompositing', ['android'])
     self.Skip('Pixel_OffscreenCanvasWebGLSoftwareCompositingWorker',
               ['android'])
     self.Skip('Pixel_CanvasDisplayLinearRGBUnaccelerated2D', ['android'])
+    self.Skip('Pixel_CanvasUnacceleratedLowLatency2D', ['android'])
 
     # Tests running with SwiftShader are skipped on platforms where SwiftShader
     # isn't supported.
@@ -45,15 +49,13 @@
     self.Fail('Pixel_ScissorTestWithPreserveDrawingBuffer',
         ['android'], bug=521588)
 
-    # Tests crashing on marshmallow bot
-    self.Fail('Pixel_CanvasLowLatency2D', ['android'], bug=865957)
-    self.Fail('Pixel_CanvasUnacceleratedLowLatency2D', ['android'], bug=865957)
+    # TODO(mcasas): Reenable after Android reference images are updated
+    self.Skip('Pixel_CanvasLowLatency2D', bug=865957)
 
     # TODO(vmiura) check / generate reference images for Android devices
     self.Fail('Pixel_SolidColorBackground', ['mac', 'android'], bug=624256)
 
-    self.Fail('Pixel_CSSFilterEffects',
-        ['mac', ('nvidia', 0xfe9)], bug=690277)
+    self.Fail('Pixel_CSSFilterEffects', ['mac', ('nvidia', 0xfe9)], bug=690277)
 
     # Became flaky on 10.13.6. When it flakes, it flakes 3 times, so
     # mark failing, unfortunately.
@@ -74,9 +76,9 @@
 
     # TODO(junov): rebaselining
     self.Fail('Pixel_OffscreenCanvasUnaccelerated2DGPUCompositing',
-              ['mac', 'linux', 'win', 'android', 'chromeos'], bug=788439)
+              ['mac', 'linux', 'win', 'chromeos'], bug=788439)
     self.Fail('Pixel_OffscreenCanvasUnaccelerated2DGPUCompositingWorker',
-              ['mac', 'linux', 'win', 'android', 'chromeos'], bug=788439)
+              ['mac', 'linux', 'win', 'chromeos'], bug=788439)
 
     # Flaky for unknown reasons only on macOS. Not planning to investigate
     # further.
diff --git a/content/test/gpu/gpu_tests/pixel_test_pages.py b/content/test/gpu/gpu_tests/pixel_test_pages.py
index 8a41bc83..f91c839 100644
--- a/content/test/gpu/gpu_tests/pixel_test_pages.py
+++ b/content/test/gpu/gpu_tests/pixel_test_pages.py
@@ -487,14 +487,14 @@
       'pixel_offscreenCanvas_2d_commit_main.html',
       base_name + '_OffscreenCanvasAccelerated2D',
       test_rect=[0, 0, 360, 200],
-      revision=11,
+      revision=12,
       browser_args=browser_args),
 
     PixelTestPage(
       'pixel_offscreenCanvas_2d_commit_worker.html',
       base_name + '_OffscreenCanvasAccelerated2DWorker',
       test_rect=[0, 0, 360, 200],
-      revision=11,
+      revision=12,
       browser_args=browser_args),
 
     PixelTestPage(
@@ -564,7 +564,7 @@
       'pixel_canvas_low_latency_2d.html',
       base_name + '_CanvasLowLatency2D',
       test_rect=[0, 0, 100, 100],
-      revision=2,
+      revision=3,
       browser_args=browser_args),
 
     PixelTestPage(
diff --git a/dbus/property.h b/dbus/property.h
index 41d6c241..6dc49474 100644
--- a/dbus/property.h
+++ b/dbus/property.h
@@ -441,6 +441,10 @@
   // |set_value_| of a property.
   void ReplaceSetValueForTesting(const T& value) { set_value_ = value; }
 
+  // Method used by test and stub implementations to retrieve the |set_value|
+  // of a property.
+  const T& GetSetValueForTesting() const { return set_value_; }
+
  private:
   // Current cached value of the property.
   T value_;
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc
index f8f2d72c..d6ea2f3 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -1520,6 +1520,11 @@
     validators_.shader_parameter.AddValue(GL_COMPLETION_STATUS_KHR);
     validators_.program_parameter.AddValue(GL_COMPLETION_STATUS_KHR);
   }
+
+  if (gfx::HasExtension(extensions, "GL_KHR_robust_buffer_access_behavior")) {
+    AddExtensionString("GL_KHR_robust_buffer_access_behavior");
+    feature_flags_.khr_robust_buffer_access_behavior = true;
+  }
 }
 
 void FeatureInfo::InitializeFloatAndHalfFloatFeatures(
diff --git a/gpu/command_buffer/service/feature_info.h b/gpu/command_buffer/service/feature_info.h
index ee9f949..852266a 100644
--- a/gpu/command_buffer/service/feature_info.h
+++ b/gpu/command_buffer/service/feature_info.h
@@ -133,6 +133,7 @@
     bool angle_multiview = false;
     bool khr_parallel_shader_compile = false;
     bool android_surface_control = false;
+    bool khr_robust_buffer_access_behavior = false;
   };
 
   FeatureInfo();
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
index 75e4590..562f650 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
@@ -733,6 +733,7 @@
           "GL_EXT_texture_storage",
           "GL_EXT_unpack_subimage",
           "GL_KHR_parallel_shader_compile",
+          "GL_KHR_robust_buffer_access_behavior",
           "GL_KHR_texture_compression_astc_hdr",
           "GL_KHR_texture_compression_astc_ldr",
           "GL_NV_pack_subimage",
@@ -766,27 +767,40 @@
   // TODO(geofflang): verify
   // feature_info_->feature_flags().angle_robust_resource_initialization and
   // api()->glIsEnabledFn(GL_ROBUST_RESOURCE_INITIALIZATION_ANGLE)
-  if (!feature_info_->feature_flags().angle_robust_client_memory ||
-      !feature_info_->feature_flags().chromium_bind_generates_resource ||
-      !feature_info_->feature_flags().chromium_copy_texture ||
-      !feature_info_->feature_flags().angle_client_arrays ||
-      api()->glIsEnabledFn(GL_CLIENT_ARRAYS_ANGLE) != GL_FALSE ||
-      feature_info_->feature_flags().angle_webgl_compatibility !=
-          IsWebGLContextType(attrib_helper.context_type) ||
-      !feature_info_->feature_flags().angle_request_extension ||
-      !feature_info_->feature_flags().khr_debug) {
-    Destroy(true);
-    LOG(ERROR) << "ContextResult::kFatalFailure: "
-                  "missing required extension";
-    return gpu::ContextResult::kFatalFailure;
+
+#define FAIL_INIT_IF_NOT(feature, message)                       \
+  if (!(feature)) {                                              \
+    Destroy(true);                                               \
+    LOG(ERROR) << "ContextResult::kFatalFailure: " << (message); \
+    return gpu::ContextResult::kFatalFailure;                    \
   }
 
-  if (attrib_helper.enable_oop_rasterization) {
-    Destroy(true);
-    LOG(ERROR) << "ContextResult::kFatalFailure: "
-                  "oop rasterization not supported";
-    return gpu::ContextResult::kFatalFailure;
-  }
+  FAIL_INIT_IF_NOT(feature_info_->feature_flags().angle_robust_client_memory,
+                   "missing GL_ANGLE_robust_client_memory");
+  FAIL_INIT_IF_NOT(
+      feature_info_->feature_flags().chromium_bind_generates_resource,
+      "missing GL_CHROMIUM_bind_generates_resource");
+  FAIL_INIT_IF_NOT(feature_info_->feature_flags().chromium_copy_texture,
+                   "missing GL_CHROMIUM_copy_texture");
+  FAIL_INIT_IF_NOT(feature_info_->feature_flags().angle_client_arrays,
+                   "missing GL_ANGLE_client_arrays");
+  FAIL_INIT_IF_NOT(api()->glIsEnabledFn(GL_CLIENT_ARRAYS_ANGLE) == GL_FALSE,
+                   "GL_ANGLE_client_arrays shouldn't be enabled");
+  FAIL_INIT_IF_NOT(feature_info_->feature_flags().angle_webgl_compatibility ==
+                       IsWebGLContextType(attrib_helper.context_type),
+                   "missing GL_ANGLE_webgl_compatibility");
+  FAIL_INIT_IF_NOT(feature_info_->feature_flags().angle_request_extension,
+                   "missing  GL_ANGLE_request_extension");
+  FAIL_INIT_IF_NOT(feature_info_->feature_flags().khr_debug,
+                   "missing GL_KHR_debug");
+  FAIL_INIT_IF_NOT(
+      !IsWebGL2ComputeContextType(attrib_helper.context_type) ||
+          feature_info_->feature_flags().khr_robust_buffer_access_behavior,
+      "missing GL_KHR_robust_buffer_access_behavior");
+  FAIL_INIT_IF_NOT(!attrib_helper.enable_oop_rasterization,
+                   "oop rasterization not supported");
+
+#undef FAIL_INIT_IF_NOT
 
   bind_generates_resource_ = group_->bind_generates_resource();
 
diff --git a/headless/app/headless_shell.cc b/headless/app/headless_shell.cc
index 2e82e58..9dd491c 100644
--- a/headless/app/headless_shell.cc
+++ b/headless/app/headless_shell.cc
@@ -7,7 +7,6 @@
 #include <string>
 #include <utility>
 
-#include "base/base64.h"
 #include "base/base_switches.h"
 #include "base/bind.h"
 #include "base/callback.h"
@@ -483,7 +482,7 @@
 
 void HeadlessShell::WriteFile(const std::string& file_path_switch,
                               const std::string& default_file_name,
-                              const std::string& base64_data) {
+                              const protocol::Binary& data) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
 
   base::FilePath file_name =
@@ -492,25 +491,17 @@
   if (file_name.empty())
     file_name = base::FilePath().AppendASCII(default_file_name);
 
-  std::string decoded_data;
-  if (!base::Base64Decode(base64_data, &decoded_data)) {
-    LOG(ERROR) << "Failed to decode base64 data";
-    OnFileOpened(std::string(), file_name, base::File::FILE_ERROR_FAILED);
-    return;
-  }
-
   file_proxy_ = std::make_unique<base::FileProxy>(file_task_runner_.get());
   if (!file_proxy_->CreateOrOpen(
           file_name, base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE,
           base::BindOnce(&HeadlessShell::OnFileOpened,
-                         weak_factory_.GetWeakPtr(), decoded_data,
-                         file_name))) {
+                         weak_factory_.GetWeakPtr(), data, file_name))) {
     // Operation could not be started.
-    OnFileOpened(std::string(), file_name, base::File::FILE_ERROR_FAILED);
+    OnFileOpened(protocol::Binary(), file_name, base::File::FILE_ERROR_FAILED);
   }
 }
 
-void HeadlessShell::OnFileOpened(const std::string& decoded_data,
+void HeadlessShell::OnFileOpened(const protocol::Binary& data,
                                  const base::FilePath file_name,
                                  base::File::Error error_code) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -520,16 +511,12 @@
                << base::File::ErrorToString(error_code);
     return;
   }
-
-  auto buf = base::MakeRefCounted<net::IOBufferWithSize>(decoded_data.size());
-  memcpy(buf->data(), decoded_data.data(), decoded_data.size());
-
   if (!file_proxy_->Write(
-          0, buf->data(), buf->size(),
+          0, reinterpret_cast<const char*>(data.data()), data.size(),
           base::BindOnce(&HeadlessShell::OnFileWritten,
-                         weak_factory_.GetWeakPtr(), file_name, buf->size()))) {
+                         weak_factory_.GetWeakPtr(), file_name, data.size()))) {
     // Operation may have completed successfully or failed.
-    OnFileWritten(file_name, buf->size(), base::File::FILE_ERROR_FAILED, 0);
+    OnFileWritten(file_name, data.size(), base::File::FILE_ERROR_FAILED, 0);
   }
 }
 
diff --git a/headless/app/headless_shell.h b/headless/app/headless_shell.h
index 3ed8887..604f0e6 100644
--- a/headless/app/headless_shell.h
+++ b/headless/app/headless_shell.h
@@ -80,10 +80,10 @@
 
   void OnPDFCreated(std::unique_ptr<page::PrintToPDFResult> result);
 
-  void WriteFile(const std::string& switch_string,
+  void WriteFile(const std::string& file_path_switch,
                  const std::string& default_file_name,
-                 const std::string& base64_data);
-  void OnFileOpened(const std::string& decoded_data,
+                 const protocol::Binary& data);
+  void OnFileOpened(const protocol::Binary& data,
                     const base::FilePath file_name,
                     base::File::Error error_code);
   void OnFileWritten(const base::FilePath file_name,
diff --git a/headless/lib/browser/headless_print_manager.cc b/headless/lib/browser/headless_print_manager.cc
index 4c55230f..0e3d270 100644
--- a/headless/lib/browser/headless_print_manager.cc
+++ b/headless/lib/browser/headless_print_manager.cc
@@ -8,6 +8,7 @@
 #include <utility>
 #include <vector>
 
+#include "base/memory/ref_counted_memory.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_piece.h"
 #include "base/strings/string_split.h"
@@ -145,7 +146,8 @@
   DCHECK(callback);
 
   if (callback_) {
-    std::move(callback).Run(SIMULTANEOUS_PRINT_ACTIVE, std::string());
+    std::move(callback).Run(SIMULTANEOUS_PRINT_ACTIVE,
+                            base::MakeRefCounted<base::RefCountedString>());
     return;
   }
   printing_rfh_ = rfh;
@@ -311,10 +313,13 @@
     return;
   }
 
-  if (result == PRINT_SUCCESS)
-    std::move(callback_).Run(result, std::move(data_));
-  else
-    std::move(callback_).Run(result, std::string());
+  if (result == PRINT_SUCCESS) {
+    std::move(callback_).Run(result,
+                             base::RefCountedString::TakeString(&data_));
+  } else {
+    std::move(callback_).Run(result,
+                             base::MakeRefCounted<base::RefCountedString>());
+  }
   printing_rfh_->Send(new PrintMsg_PrintingDone(printing_rfh_->GetRoutingID(),
                                                 result == PRINT_SUCCESS));
   Reset();
diff --git a/headless/lib/browser/headless_print_manager.h b/headless/lib/browser/headless_print_manager.h
index 6d94e4a..c5a76af 100644
--- a/headless/lib/browser/headless_print_manager.h
+++ b/headless/lib/browser/headless_print_manager.h
@@ -9,6 +9,7 @@
 #include <string>
 #include <vector>
 
+#include "base/memory/ref_counted_memory.h"
 #include "components/printing/browser/print_manager.h"
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/web_contents_user_data.h"
@@ -65,7 +66,8 @@
   };
 
   using GetPDFCallback =
-      base::OnceCallback<void(PrintResult, const std::string&)>;
+      base::OnceCallback<void(PrintResult,
+                              scoped_refptr<base::RefCountedMemory>)>;
 
   ~HeadlessPrintManager() override;
 
diff --git a/headless/lib/browser/protocol/headless_handler.cc b/headless/lib/browser/protocol/headless_handler.cc
index 4abf251..a7f4093 100644
--- a/headless/lib/browser/protocol/headless_handler.cc
+++ b/headless/lib/browser/protocol/headless_handler.cc
@@ -4,7 +4,6 @@
 
 #include "headless/lib/browser/protocol/headless_handler.h"
 
-#include "base/base64.h"
 #include "base/base_switches.h"
 #include "base/command_line.h"
 #include "base/lazy_instance.h"
@@ -34,9 +33,9 @@
 enum class ImageEncoding { kPng, kJpeg };
 constexpr int kDefaultScreenshotQuality = 80;
 
-std::string EncodeBitmap(const SkBitmap& bitmap,
-                         ImageEncoding encoding,
-                         int quality) {
+protocol::Binary EncodeBitmap(const SkBitmap& bitmap,
+                              ImageEncoding encoding,
+                              int quality) {
   gfx::Image image = gfx::Image::CreateFrom1xBitmap(bitmap);
   DCHECK(!image.IsEmpty());
 
@@ -48,16 +47,9 @@
     if (gfx::JPEG1xEncodedDataFromImage(image, quality, &bytes->data()))
       data = bytes;
   }
-
   if (!data || !data->front())
-    return std::string();
-
-  std::string base_64_data;
-  base::Base64Encode(
-      base::StringPiece(reinterpret_cast<const char*>(data->front()),
-                        data->size()),
-      &base_64_data);
-  return base_64_data;
+    return protocol::Binary();
+  return protocol::Binary::fromRefCounted(data);
 }
 
 void OnBeginFrameFinished(
@@ -67,11 +59,10 @@
     bool has_damage,
     std::unique_ptr<SkBitmap> bitmap) {
   if (!bitmap || bitmap->drawsNothing()) {
-    callback->sendSuccess(has_damage, Maybe<String>());
+    callback->sendSuccess(has_damage, Maybe<protocol::Binary>());
     return;
   }
-  std::string data = EncodeBitmap(*bitmap, encoding, quality);
-  callback->sendSuccess(has_damage, std::move(data));
+  callback->sendSuccess(has_damage, EncodeBitmap(*bitmap, encoding, quality));
 }
 
 }  // namespace
diff --git a/headless/lib/browser/protocol/page_handler.cc b/headless/lib/browser/protocol/page_handler.cc
index b42a208..6f695e2 100644
--- a/headless/lib/browser/protocol/page_handler.cc
+++ b/headless/lib/browser/protocol/page_handler.cc
@@ -4,7 +4,6 @@
 
 #include "headless/lib/browser/protocol/page_handler.h"
 
-#include "base/base64.h"
 #include "content/public/browser/web_contents.h"
 #include "printing/units.h"
 
@@ -21,12 +20,10 @@
 
 void PDFCreated(std::unique_ptr<PageHandler::PrintToPDFCallback> callback,
                 HeadlessPrintManager::PrintResult print_result,
-                const std::string& data) {
+                scoped_refptr<base::RefCountedMemory> data) {
   std::unique_ptr<base::DictionaryValue> response;
   if (print_result == HeadlessPrintManager::PRINT_SUCCESS) {
-    std::string base_64_data;
-    base::Base64Encode(data, &base_64_data);
-    callback->sendSuccess(base_64_data);
+    callback->sendSuccess(protocol::Binary::fromRefCounted(data));
   } else {
     callback->sendFailure(Response::Error(
         HeadlessPrintManager::PrintResultToString(print_result)));
diff --git a/headless/lib/headless_web_contents_browsertest.cc b/headless/lib/headless_web_contents_browsertest.cc
index 1bbff18..24147750 100644
--- a/headless/lib/headless_web_contents_browsertest.cc
+++ b/headless/lib/headless_web_contents_browsertest.cc
@@ -6,7 +6,6 @@
 #include <string>
 #include <vector>
 
-#include "base/base64.h"
 #include "base/command_line.h"
 #include "base/json/json_writer.h"
 #include "base/logging.h"
@@ -166,13 +165,8 @@
 }
 
 namespace {
-bool DecodePNG(std::string base64_data, SkBitmap* bitmap) {
-  std::string png_data;
-  if (!base::Base64Decode(base64_data, &png_data))
-    return false;
-  return gfx::PNGCodec::Decode(
-      reinterpret_cast<unsigned const char*>(png_data.data()), png_data.size(),
-      bitmap);
+bool DecodePNG(const protocol::Binary& png_data, SkBitmap* bitmap) {
+  return gfx::PNGCodec::Decode(png_data.data(), png_data.size(), bitmap);
 }
 }  // namespace
 
@@ -211,10 +205,10 @@
 
   void OnScreenshotCaptured(
       std::unique_ptr<page::CaptureScreenshotResult> result) {
-    std::string base64 = result->GetData();
-    EXPECT_GT(base64.length(), 0U);
+    protocol::Binary png_data = result->GetData();
+    EXPECT_GT(png_data.size(), 0U);
     SkBitmap result_bitmap;
-    EXPECT_TRUE(DecodePNG(base64, &result_bitmap));
+    EXPECT_TRUE(DecodePNG(png_data, &result_bitmap));
 
     EXPECT_EQ(800, result_bitmap.width());
     EXPECT_EQ(600, result_bitmap.height());
@@ -308,12 +302,9 @@
   }
 
   void OnPDFCreated(std::unique_ptr<page::PrintToPDFResult> result) {
-    std::string base64 = result->GetData();
-    EXPECT_GT(base64.length(), 0U);
-    std::string pdf_data;
-    EXPECT_TRUE(base::Base64Decode(base64, &pdf_data));
-
-    auto pdf_span = base::as_bytes(base::make_span(pdf_data));
+    protocol::Binary pdf_data = result->GetData();
+    EXPECT_GT(pdf_data.size(), 0U);
+    auto pdf_span = base::make_span(pdf_data.data(), pdf_data.size());
     int num_pages;
     EXPECT_TRUE(chrome_pdf::GetPDFDocInfo(pdf_span, &num_pages, nullptr));
     EXPECT_EQ(std::ceil(kDocHeight / kPaperHeight), num_pages);
@@ -472,7 +463,7 @@
 
     browser_devtools_client_->GetTarget()->GetExperimental()->CreateTarget(
         target::CreateTargetParams::Builder()
-            .SetUrl("about://blank")
+            .SetUrl("about:blank")
             .SetWidth(200)
             .SetHeight(200)
             .SetEnableBeginFrameControl(true)
@@ -650,10 +641,10 @@
       // First BeginFrame should have caused damage and have a screenshot.
       EXPECT_TRUE(result->GetHasDamage());
       ASSERT_TRUE(result->HasScreenshotData());
-      std::string base64 = result->GetScreenshotData();
-      EXPECT_LT(0u, base64.length());
+      protocol::Binary png_data = result->GetScreenshotData();
+      EXPECT_LT(0u, png_data.size());
       SkBitmap result_bitmap;
-      EXPECT_TRUE(DecodePNG(base64, &result_bitmap));
+      EXPECT_TRUE(DecodePNG(png_data, &result_bitmap));
       EXPECT_EQ(200, result_bitmap.width());
       EXPECT_EQ(200, result_bitmap.height());
       SkColor expected_color = SkColorSetRGB(0x00, 0x00, 0xff);
@@ -737,10 +728,10 @@
     EXPECT_TRUE(result->GetHasDamage());
     EXPECT_TRUE(result->HasScreenshotData());
     if (result->HasScreenshotData()) {
-      std::string base64 = result->GetScreenshotData();
-      EXPECT_LT(0u, base64.length());
+      protocol::Binary png_data = result->GetScreenshotData();
+      EXPECT_LT(0u, png_data.size());
       SkBitmap result_bitmap;
-      EXPECT_TRUE(DecodePNG(base64, &result_bitmap));
+      EXPECT_TRUE(DecodePNG(png_data, &result_bitmap));
 
       EXPECT_EQ(300, result_bitmap.width());
       EXPECT_EQ(300, result_bitmap.height());
diff --git a/infra/config/branch/cq.cfg b/infra/config/branch/cq.cfg
index 83357e37..5a6e413 100644
--- a/infra/config/branch/cq.cfg
+++ b/infra/config/branch/cq.cfg
@@ -173,8 +173,7 @@
         path_regexp: "ui/gl/.+"
       }
       builders { name: "win-libfuzzer-asan-rel" }
-      # TODO(martiniss): Re-add to CQ once outage is over. See crbug.com/899908
-      # builders { name: "win10_chromium_x64_rel_ng" }
+      builders { name: "win10_chromium_x64_rel_ng" }
       builders {
         name: "win7_chromium_rel_loc_exp"
         experiment_percentage: 20
diff --git a/ios/build/bots/scripts/test_runner.py b/ios/build/bots/scripts/test_runner.py
index 9329788..0d7b280 100644
--- a/ios/build/bots/scripts/test_runner.py
+++ b/ios/build/bots/scripts/test_runner.py
@@ -1237,7 +1237,7 @@
         ],
         cwd='{}/tsproxy'.format(self.wpr_tools_path),
         env=self.get_launch_env(),
-        stdout=open('stdout_proxy.txt', 'wb+'),
+        stdout=open(os.path.join(self.out_dir, 'stdout_proxy.txt'), 'wb+'),
         stderr=subprocess.STDOUT,
     )
 
@@ -1271,7 +1271,7 @@
         ],
         cwd='{}/web_page_replay_go/'.format(self.wpr_tools_path),
         env=self.get_launch_env(),
-        stdout=open('stdout_wprgo.txt', 'wb+'),
+        stdout=open(os.path.join(self.out_dir, 'stdout_wprgo.txt'), 'wb+'),
         stderr=subprocess.STDOUT,
     )
 
diff --git a/ios/chrome/app/application_delegate/app_state.mm b/ios/chrome/app/application_delegate/app_state.mm
index b0a8efa..a1126f9 100644
--- a/ios/chrome/app/application_delegate/app_state.mm
+++ b/ios/chrome/app/application_delegate/app_state.mm
@@ -421,6 +421,9 @@
 
   base::TimeDelta duration = base::TimeTicks::Now() - _sessionStartTime;
   UMA_HISTOGRAM_LONG_TIMES("Session.TotalDuration", duration);
+  UMA_HISTOGRAM_CUSTOM_TIMES("Session.TotalDurationMax1Day", duration,
+                             base::TimeDelta::FromMilliseconds(1),
+                             base::TimeDelta::FromHours(24), 50);
   [[[_browserLauncher browserViewInformation] mainTabModel]
       recordSessionMetrics];
 }
diff --git a/ios/web/web_state/js/resources/console.js b/ios/web/web_state/js/resources/console.js
index 6ace741..ab1189d 100644
--- a/ios/web/web_state/js/resources/console.js
+++ b/ios/web/web_state/js/resources/console.js
@@ -30,23 +30,33 @@
   });
 }
 
+var originalConsoleLog = console.log;
 console.log = function() {
   sendConsoleMessage('log', arguments);
+  return originalConsoleLog.apply(this, arguments);
 };
 
+var originalConsoleDebug = console.debug;
 console.debug = function() {
   sendConsoleMessage('debug', arguments);
+  return originalConsoleDebug.apply(this, arguments);
 };
 
+var originalConsoleInfo = console.info;
 console.info = function() {
   sendConsoleMessage('info', arguments);
+  return originalConsoleInfo.apply(this, arguments);
 };
 
+var originalConsoleWarn = console.warn;
 console.warn = function() {
   sendConsoleMessage('warn', arguments);
+  return originalConsoleWarn.apply(this, arguments);
 };
 
+var originalConsoleError = console.error;
 console.error = function() {
   sendConsoleMessage('error', arguments);
+  return originalConsoleError.apply(this, arguments);
 };
 }());
diff --git a/net/nqe/effective_connection_type_observer.h b/net/nqe/effective_connection_type_observer.h
index 0fa73bf7..cb6288f0 100644
--- a/net/nqe/effective_connection_type_observer.h
+++ b/net/nqe/effective_connection_type_observer.h
@@ -13,7 +13,7 @@
 namespace net {
 
 // Observes changes in effective connection type.
-class NET_EXPORT EffectiveConnectionTypeObserver {
+class NET_EXPORT_PRIVATE EffectiveConnectionTypeObserver {
  public:
   // Notifies the observer of a change in the effective connection type.
   // NetworkQualityEstimator computes the effective connection type once in
diff --git a/net/nqe/network_quality_estimator.h b/net/nqe/network_quality_estimator.h
index ec00e1e..bae2d3c5 100644
--- a/net/nqe/network_quality_estimator.h
+++ b/net/nqe/network_quality_estimator.h
@@ -63,7 +63,7 @@
 // A single instance of NQE can be attached to multiple URLRequestContexts,
 // thereby increasing the single NQE instance's accuracy by providing more
 // observed traffic characteristics.
-class NET_EXPORT NetworkQualityEstimator
+class NET_EXPORT_PRIVATE NetworkQualityEstimator
     : public NetworkChangeNotifier::ConnectionTypeObserver {
  public:
   // Observes measurements of round trip time.
diff --git a/net/nqe/network_quality_store.h b/net/nqe/network_quality_store.h
index 7032b15f..5250e52 100644
--- a/net/nqe/network_quality_store.h
+++ b/net/nqe/network_quality_store.h
@@ -27,7 +27,7 @@
 class NET_EXPORT_PRIVATE NetworkQualityStore {
  public:
   // Observes changes in the cached network qualities.
-  class NET_EXPORT NetworkQualitiesCacheObserver {
+  class NET_EXPORT_PRIVATE NetworkQualitiesCacheObserver {
    public:
     // Notifies the observer of a change in the cached network quality. The
     // observer must register and unregister itself on the IO thread. All the
diff --git a/net/nqe/rtt_throughput_estimates_observer.h b/net/nqe/rtt_throughput_estimates_observer.h
index bf05c5d..27f9043 100644
--- a/net/nqe/rtt_throughput_estimates_observer.h
+++ b/net/nqe/rtt_throughput_estimates_observer.h
@@ -15,7 +15,7 @@
 namespace net {
 
 // Observes changes in the network quality.
-class NET_EXPORT RTTAndThroughputEstimatesObserver {
+class NET_EXPORT_PRIVATE RTTAndThroughputEstimatesObserver {
  public:
   // Notifies the observer when estimated HTTP RTT, estimated transport RTT or
   // estimated downstream throughput is computed. NetworkQualityEstimator
diff --git a/services/device/bluetooth/BUILD.gn b/services/device/bluetooth/BUILD.gn
index e598c5f..b5fe1f1e 100644
--- a/services/device/bluetooth/BUILD.gn
+++ b/services/device/bluetooth/BUILD.gn
@@ -37,6 +37,7 @@
 
   deps = [
     ":bluetooth_system",
+    "//base/test:test_support",
     "//dbus",
     "//device/bluetooth",
     "//net",
diff --git a/services/device/bluetooth/bluetooth_system_unittest.cc b/services/device/bluetooth/bluetooth_system_unittest.cc
index e27fa7af..cc5b767 100644
--- a/services/device/bluetooth/bluetooth_system_unittest.cc
+++ b/services/device/bluetooth/bluetooth_system_unittest.cc
@@ -13,6 +13,7 @@
 #include "base/observer_list.h"
 #include "base/run_loop.h"
 #include "base/strings/stringprintf.h"
+#include "base/test/bind_test_util.h"
 #include "device/bluetooth/dbus/bluetooth_adapter_client.h"
 #include "device/bluetooth/dbus/bluez_dbus_manager.h"
 #include "mojo/public/cpp/bindings/binding.h"
@@ -28,6 +29,12 @@
 
 namespace {
 
+bool GetValueAndReset(base::Optional<bool>* opt) {
+  base::Optional<bool> tmp;
+  tmp.swap(*opt);
+  return tmp.value();
+}
+
 // Exposes high-level methods to simulate Bluetooth events e.g. a new adapter
 // was added, adapter power state changed, etc.
 //
@@ -47,13 +54,18 @@
               callback) {}
     ~Properties() override = default;
 
-    void ResetCallCount() { set_powered_call_count_ = 0; }
+    void ResetCallCount() {
+      set_powered_call_count_ = 0;
+      last_set_powered_value_.reset();
+    }
 
     void SetNextSetPoweredResponse(bool next_response) {
       DCHECK(!next_set_powered_response_);
       next_set_powered_response_ = next_response;
     }
 
+    bool GetLastSetPoweredValue() { return last_set_powered_value_.value(); }
+
     // dbus::PropertySet override
     void Get(dbus::PropertyBase* property,
              dbus::PropertySet::GetCallback callback) override {
@@ -71,16 +83,25 @@
       DVLOG(1) << "Set " << property->name();
       if (property->name() == powered.name()) {
         ++set_powered_call_count_;
-        base::Optional<bool> response;
-        response.swap(next_set_powered_response_);
-        callback.Run(response.value());
-        return;
+        last_set_powered_value_ = powered.GetSetValueForTesting();
+        if (next_set_powered_response_) {
+          callback.Run(GetValueAndReset(&next_set_powered_response_));
+          return;
+        }
+        set_property_callbacks_.push_back(callback);
+      } else {
+        NOTIMPLEMENTED();
       }
-      NOTIMPLEMENTED();
     }
 
     size_t set_powered_call_count_ = 0;
     base::Optional<bool> next_set_powered_response_;
+    base::Optional<bool> last_set_powered_value_;
+
+    // Saved `Set()` callbacks. If there is no next response set for a `Set()`
+    // call, then the callback is saved here. TestBluetoothAdapterClient
+    // runs all these callbacks after the adapter is removed.
+    std::vector<base::OnceCallback<void(bool)>> set_property_callbacks_;
   };
 
   TestBluetoothAdapterClient() = default;
@@ -88,7 +109,7 @@
 
   void ResetCallCount() {
     for (auto& path_to_properties : adapter_object_paths_to_properties_) {
-      path_to_properties.second.ResetCallCount();
+      path_to_properties.second->ResetCallCount();
     }
   }
 
@@ -102,9 +123,9 @@
     ObjectPathToProperties::iterator it;
     bool was_inserted;
     std::tie(it, was_inserted) = adapter_object_paths_to_properties_.emplace(
-        object_path,
-        base::BindRepeating(&TestBluetoothAdapterClient::OnPropertyChanged,
-                            base::Unretained(this), object_path));
+        object_path, std::make_unique<Properties>(base::BindRepeating(
+                         &TestBluetoothAdapterClient::OnPropertyChanged,
+                         base::Unretained(this), object_path)));
     DCHECK(was_inserted);
 
     for (auto& observer : observers_)
@@ -125,8 +146,15 @@
     for (auto& observer : observers_)
       observer.AdapterRemoved(object_path);
 
+    auto properties =
+        std::move(adapter_object_paths_to_properties_[object_path]);
     size_t removed = adapter_object_paths_to_properties_.erase(object_path);
     DCHECK_EQ(1u, removed);
+
+    // After the adapter is removed, any pending Set calls get run with `false`.
+    for (auto& set_property_callback : properties->set_property_callbacks_) {
+      std::move(set_property_callback).Run(false);
+    }
   }
 
   // Simulates adapter at |object_path_str| changing its powered state to
@@ -148,14 +176,12 @@
         dbus::ObjectPath(object_path_str));
     DCHECK(it != adapter_object_paths_to_properties_.end());
 
-    return it->second.set_powered_call_count_;
+    return it->second->set_powered_call_count_;
   }
 
-  // Simulates the adapter changing states in response to a previous call to
-  // change the "powered" property.
-  void SimulateSetPoweredCompleted(const std::string& object_path_str) {
-    GetProperties(dbus::ObjectPath(object_path_str))
-        ->powered.ReplaceValueWithSetValue();
+  bool GetLastSetPoweredValue(const std::string& object_path_str) {
+    return GetProperties(dbus::ObjectPath(object_path_str))
+        ->GetLastSetPoweredValue();
   }
 
   // Simulates adapter at |object_path_str| changing its discovering state to
@@ -200,7 +226,7 @@
     auto it = adapter_object_paths_to_properties_.find(object_path);
     if (it == adapter_object_paths_to_properties_.end())
       return nullptr;
-    return &(it->second);
+    return it->second.get();
   }
 
   void StartDiscovery(const dbus::ObjectPath& object_path,
@@ -263,7 +289,8 @@
     }
   }
 
-  using ObjectPathToProperties = std::map<dbus::ObjectPath, Properties>;
+  using ObjectPathToProperties =
+      std::map<dbus::ObjectPath, std::unique_ptr<Properties>>;
   ObjectPathToProperties adapter_object_paths_to_properties_;
 
   base::ObserverList<Observer>::Unchecked observers_;
@@ -629,20 +656,24 @@
   auto system = CreateBluetoothSystem();
   EXPECT_EQ(mojom::BluetoothSystem::State::kPoweredOn, GetStateAndWait(system));
 
+  // Try to power off the adapter.
   test_bluetooth_adapter_client_->SetNextSetPoweredResponse(kFooObjectPathStr,
                                                             true);
   EXPECT_EQ(mojom::BluetoothSystem::SetPoweredResult::kSuccess,
             SetPoweredAndWait(system, false));
   EXPECT_EQ(1u, test_bluetooth_adapter_client_->GetSetPoweredCallCount(
                     kFooObjectPathStr));
+  EXPECT_FALSE(test_bluetooth_adapter_client_->GetLastSetPoweredValue(
+      kFooObjectPathStr));
   EXPECT_EQ(mojom::BluetoothSystem::State::kTransitioning,
             GetStateAndWait(system));
   EXPECT_EQ(StateVector({mojom::BluetoothSystem::State::kTransitioning}),
             on_state_changed_states_);
   ResetResults();
 
-  test_bluetooth_adapter_client_->SimulateSetPoweredCompleted(
-      kFooObjectPathStr);
+  // Simulate the adapter actually powering off.
+  test_bluetooth_adapter_client_->SimulateAdapterPowerStateChanged(
+      kFooObjectPathStr, false);
 
   EXPECT_EQ(mojom::BluetoothSystem::State::kPoweredOff,
             GetStateAndWait(system));
@@ -657,20 +688,24 @@
 
   auto system = CreateBluetoothSystem();
 
+  // Try to power on the adapter.
   test_bluetooth_adapter_client_->SetNextSetPoweredResponse(kFooObjectPathStr,
                                                             true);
   EXPECT_EQ(mojom::BluetoothSystem::SetPoweredResult::kSuccess,
             SetPoweredAndWait(system, true));
   EXPECT_EQ(1u, test_bluetooth_adapter_client_->GetSetPoweredCallCount(
                     kFooObjectPathStr));
+  EXPECT_TRUE(test_bluetooth_adapter_client_->GetLastSetPoweredValue(
+      kFooObjectPathStr));
   EXPECT_EQ(mojom::BluetoothSystem::State::kTransitioning,
             GetStateAndWait(system));
   EXPECT_EQ(StateVector({mojom::BluetoothSystem::State::kTransitioning}),
             on_state_changed_states_);
   ResetResults();
 
-  test_bluetooth_adapter_client_->SimulateSetPoweredCompleted(
-      kFooObjectPathStr);
+  // Simulate the adapter actually powering on.
+  test_bluetooth_adapter_client_->SimulateAdapterPowerStateChanged(
+      kFooObjectPathStr, true);
 
   EXPECT_EQ(mojom::BluetoothSystem::State::kPoweredOn, GetStateAndWait(system));
   EXPECT_EQ(StateVector({mojom::BluetoothSystem::State::kPoweredOn}),
@@ -690,6 +725,8 @@
             SetPoweredAndWait(system, false));
   EXPECT_EQ(1u, test_bluetooth_adapter_client_->GetSetPoweredCallCount(
                     kFooObjectPathStr));
+  EXPECT_FALSE(test_bluetooth_adapter_client_->GetLastSetPoweredValue(
+      kFooObjectPathStr));
   EXPECT_EQ(mojom::BluetoothSystem::State::kPoweredOn, GetStateAndWait(system));
   EXPECT_EQ(StateVector({mojom::BluetoothSystem::State::kTransitioning,
                          mojom::BluetoothSystem::State::kPoweredOn}),
@@ -709,6 +746,8 @@
             SetPoweredAndWait(system, true));
   EXPECT_EQ(1u, test_bluetooth_adapter_client_->GetSetPoweredCallCount(
                     kFooObjectPathStr));
+  EXPECT_TRUE(test_bluetooth_adapter_client_->GetLastSetPoweredValue(
+      kFooObjectPathStr));
   EXPECT_EQ(mojom::BluetoothSystem::State::kPoweredOff,
             GetStateAndWait(system));
   EXPECT_EQ(StateVector({mojom::BluetoothSystem::State::kTransitioning,
@@ -716,6 +755,92 @@
             on_state_changed_states_);
 }
 
+// Tests that the state is correctly updated if the adapter is removed
+// when a call to set powered to "On" is pending.
+TEST_F(BluetoothSystemTest, SetPoweredOn_AdapterRemovedWhilePending) {
+  test_bluetooth_adapter_client_->SimulateAdapterAdded(kFooObjectPathStr);
+  // Added adapters are Off by default.
+
+  auto system = CreateBluetoothSystem();
+
+  base::Optional<mojom::BluetoothSystem::SetPoweredResult> result;
+
+  // Start a SetPowered call and wait for the state to change to kTransitioning.
+  base::RunLoop set_powered_run_loop;
+  system->SetPowered(true, base::BindLambdaForTesting(
+                               [&](mojom::BluetoothSystem::SetPoweredResult r) {
+                                 result = r;
+                                 set_powered_run_loop.Quit();
+                               }));
+  EXPECT_EQ(mojom::BluetoothSystem::State::kTransitioning,
+            GetStateAndWait(system));
+  EXPECT_EQ(StateVector({mojom::BluetoothSystem::State::kTransitioning}),
+            on_state_changed_states_);
+  ResetResults();
+
+  // Simulate the adapter being removed. This immediately changes the "powered"
+  // property of the adapter to `false` and then removes the adapter.
+  test_bluetooth_adapter_client_->SimulateAdapterRemoved(kFooObjectPathStr);
+  EXPECT_EQ(mojom::BluetoothSystem::State::kUnavailable,
+            GetStateAndWait(system));
+  EXPECT_EQ(StateVector({mojom::BluetoothSystem::State::kPoweredOff,
+                         mojom::BluetoothSystem::State::kUnavailable}),
+            on_state_changed_states_);
+  ResetResults();
+
+  // Wait for SetPowered() to reply.
+  set_powered_run_loop.Run();
+
+  EXPECT_EQ(mojom::BluetoothSystem::SetPoweredResult::kFailedUnknownReason,
+            result.value());
+
+  // There should not be any state changes when SetPowered eventually fails.
+  EXPECT_TRUE(on_state_changed_states_.empty());
+}
+
+// Tests that the state is correctly updated if the adapter is removed
+// when a call to set powered to "Off" is pending.
+TEST_F(BluetoothSystemTest, SetPoweredOff_AdapterRemovedWhilePending) {
+  test_bluetooth_adapter_client_->SimulatePoweredOnAdapter(kFooObjectPathStr);
+
+  auto system = CreateBluetoothSystem();
+
+  base::Optional<mojom::BluetoothSystem::SetPoweredResult> result;
+
+  // Start a SetPowered call and wait for the state to change to kTransitioning.
+  base::RunLoop set_powered_run_loop;
+  system->SetPowered(false,
+                     base::BindLambdaForTesting(
+                         [&](mojom::BluetoothSystem::SetPoweredResult r) {
+                           result = r;
+                           set_powered_run_loop.Quit();
+                         }));
+  EXPECT_EQ(mojom::BluetoothSystem::State::kTransitioning,
+            GetStateAndWait(system));
+  EXPECT_EQ(StateVector({mojom::BluetoothSystem::State::kTransitioning}),
+            on_state_changed_states_);
+  ResetResults();
+
+  // Simulate the adapter being removed. This immediately changes the "powered"
+  // property of the adapter to `false` and then removes the adapter.
+  test_bluetooth_adapter_client_->SimulateAdapterRemoved(kFooObjectPathStr);
+  EXPECT_EQ(mojom::BluetoothSystem::State::kUnavailable,
+            GetStateAndWait(system));
+  EXPECT_EQ(StateVector({mojom::BluetoothSystem::State::kPoweredOff,
+                         mojom::BluetoothSystem::State::kUnavailable}),
+            on_state_changed_states_);
+  ResetResults();
+
+  // Wait for SetPowered() to reply.
+  set_powered_run_loop.Run();
+
+  EXPECT_EQ(mojom::BluetoothSystem::SetPoweredResult::kFailedUnknownReason,
+            result.value());
+
+  // There should not be any state changes when SetPowered eventually fails.
+  EXPECT_TRUE(on_state_changed_states_.empty());
+}
+
 // Tests scan state is kNotScanning when there is no adapter.
 TEST_F(BluetoothSystemTest, ScanState_NoAdapter) {
   auto system = CreateBluetoothSystem();
diff --git a/services/viz/public/cpp/compositing/quads_struct_traits.cc b/services/viz/public/cpp/compositing/quads_struct_traits.cc
index 47121a2..af3742e9 100644
--- a/services/viz/public/cpp/compositing/quads_struct_traits.cc
+++ b/services/viz/public/cpp/compositing/quads_struct_traits.cc
@@ -79,6 +79,7 @@
     return false;
   }
   quad->force_anti_aliasing_off = data.force_anti_aliasing_off();
+  quad->backdrop_filter_quality = data.backdrop_filter_quality();
   return true;
 }
 
diff --git a/services/viz/public/cpp/compositing/quads_struct_traits.h b/services/viz/public/cpp/compositing/quads_struct_traits.h
index ac28fea3..129fcd1c 100644
--- a/services/viz/public/cpp/compositing/quads_struct_traits.h
+++ b/services/viz/public/cpp/compositing/quads_struct_traits.h
@@ -189,6 +189,12 @@
     return quad->force_anti_aliasing_off;
   }
 
+  static float backdrop_filter_quality(const viz::DrawQuad& input) {
+    const viz::RenderPassDrawQuad* quad =
+        viz::RenderPassDrawQuad::MaterialCast(&input);
+    return quad->backdrop_filter_quality;
+  }
+
   static bool Read(viz::mojom::RenderPassQuadStateDataView data,
                    viz::DrawQuad* out);
 };
diff --git a/services/viz/public/cpp/compositing/struct_traits_unittest.cc b/services/viz/public/cpp/compositing/struct_traits_unittest.cc
index fdc693e..0cb36c0 100644
--- a/services/viz/public/cpp/compositing/struct_traits_unittest.cc
+++ b/services/viz/public/cpp/compositing/struct_traits_unittest.cc
@@ -903,6 +903,7 @@
   const gfx::Rect rect2(2468, 8642, 4321, 1234);
   const uint32_t color2 = 0xffffffff;
   const bool force_anti_aliasing_off = true;
+  const float backdrop_filter_quality = 1.0f;
   SolidColorDrawQuad* solid_quad =
       render_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
   solid_quad->SetNew(sqs, rect2, rect2, color2, force_anti_aliasing_off);
@@ -934,7 +935,7 @@
   render_pass_quad->SetNew(sqs, rect4, rect4, render_pass_id, resource_id4,
                            mask_uv_rect, mask_texture_size, filters_scale,
                            filters_origin, tex_coord_rect,
-                           force_anti_aliasing_off);
+                           force_anti_aliasing_off, backdrop_filter_quality);
 
   const gfx::Rect rect5(123, 567, 91011, 131415);
   const ResourceId resource_id5(1337);
diff --git a/services/viz/public/interfaces/compositing/quads.mojom b/services/viz/public/interfaces/compositing/quads.mojom
index b1eaad0..3f12a14 100644
--- a/services/viz/public/interfaces/compositing/quads.mojom
+++ b/services/viz/public/interfaces/compositing/quads.mojom
@@ -41,6 +41,7 @@
   gfx.mojom.RectF tex_coord_rect;
 
   bool force_anti_aliasing_off;
+  float backdrop_filter_quality;
 };
 
 struct SolidColorQuadState {
diff --git a/services/ws/BUILD.gn b/services/ws/BUILD.gn
index 55bc5a1..ef33a275 100644
--- a/services/ws/BUILD.gn
+++ b/services/ws/BUILD.gn
@@ -148,6 +148,8 @@
     "test_window_tree_client.h",
     "window_server_service_test_base.cc",
     "window_server_service_test_base.h",
+    "window_service_test_helper.cc",
+    "window_service_test_helper.h",
     "window_service_test_setup.cc",
     "window_service_test_setup.h",
     "window_tree_test_helper.cc",
@@ -171,6 +173,7 @@
     "//ui/aura:test_support",
     "//ui/compositor:test_support",
     "//ui/display:test_support",
+    "//ui/events:test_support",
     "//ui/gfx/geometry/mojo",
     "//ui/gl",
     "//ui/gl:test_support",
@@ -200,6 +203,7 @@
     "client_root_unittest.cc",
     "drag_drop_delegate_unittest.cc",
     "embedding_unittest.cc",
+    "event_injector_unittest.cc",
     "event_queue_unittest.cc",
     "focus_handler_unittest.cc",
     "injected_event_handler_unittest.cc",
diff --git a/services/ws/event_injector.cc b/services/ws/event_injector.cc
index 2b984a0f..e87f67b4 100644
--- a/services/ws/event_injector.cc
+++ b/services/ws/event_injector.cc
@@ -7,9 +7,9 @@
 #include "base/bind.h"
 #include "base/stl_util.h"
 #include "services/ws/event_queue.h"
+#include "services/ws/host_event_queue.h"
 #include "services/ws/injected_event_handler.h"
 #include "services/ws/window_service.h"
-#include "services/ws/window_service_delegate.h"
 #include "ui/aura/window_tree_host.h"
 #include "ui/display/display.h"
 #include "ui/display/screen.h"
@@ -65,12 +65,19 @@
   NOTREACHED();
 }
 
+aura::WindowTreeHost* EventInjector::GetWindowTreeHostForDisplayId(
+    int64_t display_id) {
+  HostEventQueue* host_event_queue =
+      window_service_->event_queue()->GetHostEventQueueForDisplay(display_id);
+  return host_event_queue ? host_event_queue->window_tree_host() : nullptr;
+}
+
 EventInjector::EventAndHost EventInjector::DetermineEventAndHost(
     int64_t display_id,
     std::unique_ptr<ui::Event> event) {
   EventAndHost event_and_host;
   aura::WindowTreeHost* window_tree_host =
-      window_service_->delegate()->GetWindowTreeHostForDisplayId(display_id);
+      GetWindowTreeHostForDisplayId(display_id);
   if (!window_tree_host) {
     DVLOG(1) << "InjectEvent(): invalid display " << display_id;
     return event_and_host;
@@ -100,8 +107,7 @@
   queued_events_.pop_front();
 
   aura::WindowTreeHost* window_tree_host =
-      window_service_->delegate()->GetWindowTreeHostForDisplayId(
-          queued_event.display_id);
+      GetWindowTreeHostForDisplayId(queued_event.display_id);
   if (!window_tree_host) {
     std::move(queued_event.callback).Run(false);
     return;
@@ -119,6 +125,19 @@
   handler->Inject(std::move(queued_event.event), std::move(callback));
 }
 
+void EventInjector::InjectEventNoAckImpl(int64_t display_id,
+                                         std::unique_ptr<ui::Event> event,
+                                         bool honor_rewriters) {
+  EventAndHost event_and_host =
+      DetermineEventAndHost(display_id, std::move(event));
+  if (!event_and_host.window_tree_host)
+    return;
+
+  EventQueue::DispatchOrQueueEvent(window_service_,
+                                   event_and_host.window_tree_host,
+                                   event_and_host.event.get(), honor_rewriters);
+}
+
 void EventInjector::InjectEvent(int64_t display_id,
                                 std::unique_ptr<ui::Event> event,
                                 InjectEventCallback cb) {
@@ -143,14 +162,15 @@
 
 void EventInjector::InjectEventNoAck(int64_t display_id,
                                      std::unique_ptr<ui::Event> event) {
-  EventAndHost event_and_host =
-      DetermineEventAndHost(display_id, std::move(event));
-  if (!event_and_host.window_tree_host)
-    return;
+  InjectEventNoAckImpl(display_id, std::move(event),
+                       /* honor_rewriters */ true);
+}
 
-  EventQueue::DispatchOrQueueEvent(window_service_,
-                                   event_and_host.window_tree_host,
-                                   event_and_host.event.get());
+void EventInjector::InjectEventNoAckNoRewriters(
+    int64_t display_id,
+    std::unique_ptr<ui::Event> event) {
+  InjectEventNoAckImpl(display_id, std::move(event),
+                       /* honor_rewriters */ false);
 }
 
 }  // namespace ws
diff --git a/services/ws/event_injector.h b/services/ws/event_injector.h
index 65afdb21..4a9edc80 100644
--- a/services/ws/event_injector.h
+++ b/services/ws/event_injector.h
@@ -5,6 +5,8 @@
 #ifndef SERVICES_WS_EVENT_INJECTOR_H_
 #define SERVICES_WS_EVENT_INJECTOR_H_
 
+#include <stdint.h>
+
 #include <vector>
 
 #include "base/containers/circular_deque.h"
@@ -12,6 +14,10 @@
 #include "mojo/public/cpp/bindings/binding_set.h"
 #include "services/ws/public/mojom/event_injector.mojom.h"
 
+namespace aura {
+class WindowTreeHost;
+}
+
 namespace ws {
 
 class InjectedEventHandler;
@@ -26,6 +32,9 @@
 
   void AddBinding(mojom::EventInjectorRequest request);
 
+  // Returns true if any injected events have been queued for dispatch.
+  bool HasQueuedEvents() const { return !queued_events_.empty(); }
+
  private:
   struct EventAndHost;
   struct QueuedEvent;
@@ -33,6 +42,8 @@
 
   void OnEventDispatched(InjectedEventHandler* handler);
 
+  aura::WindowTreeHost* GetWindowTreeHostForDisplayId(int64_t display_id);
+
   // Determines the target WindowTreeHost and provides an mapping on |event|
   // before dispatch. If the returned EventAndHost has a null
   // |window_tree_host| there was a problem in conversion and the event should
@@ -42,12 +53,19 @@
 
   void DispatchNextQueuedEvent();
 
+  // Both InjectEventNoAck() implementations call to this.
+  void InjectEventNoAckImpl(int64_t display_id,
+                            std::unique_ptr<ui::Event> event,
+                            bool honor_rewriters);
+
   // mojom::EventInjector:
   void InjectEvent(int64_t display_id,
                    std::unique_ptr<ui::Event> event,
                    InjectEventCallback cb) override;
   void InjectEventNoAck(int64_t display_id,
                         std::unique_ptr<ui::Event> event) override;
+  void InjectEventNoAckNoRewriters(int64_t display_id,
+                                   std::unique_ptr<ui::Event> event) override;
 
   WindowService* window_service_;
 
diff --git a/services/ws/event_injector_unittest.cc b/services/ws/event_injector_unittest.cc
new file mode 100644
index 0000000..2d65def
--- /dev/null
+++ b/services/ws/event_injector_unittest.cc
@@ -0,0 +1,60 @@
+// 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 "services/ws/injected_event_handler.h"
+
+#include <memory>
+
+#include "services/ws/event_injector.h"
+#include "services/ws/window_service.h"
+#include "services/ws/window_service_test_helper.h"
+#include "services/ws/window_service_test_setup.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/aura/test/aura_test_helper.h"
+#include "ui/aura/window.h"
+#include "ui/aura/window_tree_host.h"
+#include "ui/display/display.h"
+#include "ui/display/screen.h"
+#include "ui/events/event_source.h"
+#include "ui/events/test/test_event_rewriter.h"
+
+namespace ws {
+namespace {
+
+std::unique_ptr<ui::Event> CreateTestEvent() {
+  return std::make_unique<ui::MouseEvent>(ui::ET_MOUSE_PRESSED, gfx::Point(),
+                                          gfx::Point(), base::TimeTicks::Now(),
+                                          ui::EF_NONE, ui::EF_NONE);
+}
+
+}  // namespace
+
+TEST(EventInjectorTest, NoAck) {
+  WindowServiceTestSetup test_setup;
+  test_setup.service()->OnStart();
+  ui::EventSource* event_source =
+      test_setup.aura_test_helper()->root_window()->GetHost()->GetEventSource();
+  ui::test::TestEventRewriter test_event_rewriter;
+  event_source->AddEventRewriter(&test_event_rewriter);
+
+  const int64_t display_id =
+      display::Screen::GetScreen()->GetPrimaryDisplay().id();
+  EventInjector* event_injector =
+      WindowServiceTestHelper(test_setup.service()).event_injector();
+  mojom::EventInjector* mojom_event_injector =
+      static_cast<mojom::EventInjector*>(event_injector);
+  mojom_event_injector->InjectEventNoAck(display_id, CreateTestEvent());
+  EXPECT_EQ(1, test_event_rewriter.events_seen());
+  EXPECT_FALSE(event_injector->HasQueuedEvents());
+  test_event_rewriter.clear_events_seen();
+
+  // Repeat, using the API that circumvents rewriters.
+  mojom_event_injector->InjectEventNoAckNoRewriters(display_id,
+                                                    CreateTestEvent());
+  EXPECT_EQ(0, test_event_rewriter.events_seen());
+  EXPECT_FALSE(event_injector->HasQueuedEvents());
+  event_source->RemoveEventRewriter(&test_event_rewriter);
+}
+
+}  // namespace ws
diff --git a/services/ws/event_queue.cc b/services/ws/event_queue.cc
index 5b5684da..3b88500 100644
--- a/services/ws/event_queue.cc
+++ b/services/ws/event_queue.cc
@@ -18,6 +18,13 @@
 namespace ws {
 namespace {
 
+constexpr base::TimeDelta kEventAckTimeout =
+#if defined(NDEBUG)
+    base::TimeDelta::FromMilliseconds(100);
+#else
+    base::TimeDelta::FromMilliseconds(1000);
+#endif
+
 bool IsQueableEvent(const ui::Event& event) {
   return event.IsKeyEvent();
 }
@@ -27,6 +34,8 @@
 struct EventQueue::QueuedEvent {
   HostEventQueue* host = nullptr;
   std::unique_ptr<ui::Event> event;
+  bool honor_rewriters = false;
+
   base::OnceClosure callback;
 };
 
@@ -48,13 +57,14 @@
 // static
 void EventQueue::DispatchOrQueueEvent(WindowService* service,
                                       aura::WindowTreeHost* window_tree_host,
-                                      ui::Event* event) {
+                                      ui::Event* event,
+                                      bool honor_rewriters) {
   DCHECK(window_tree_host);
   HostEventQueue* host_event_queue =
-      service->event_queue()->FindHostEventQueueForWindowTreeHost(
-          window_tree_host);
+      service->event_queue()->GetHostEventQueueForDisplay(
+          window_tree_host->GetDisplayId());
   DCHECK(host_event_queue);
-  host_event_queue->DispatchOrQueueEvent(event);
+  host_event_queue->DispatchOrQueueEvent(event, honor_rewriters);
 }
 
 bool EventQueue::ShouldQueueEvent(HostEventQueue* host_queue,
@@ -81,15 +91,20 @@
   }
 }
 
-HostEventQueue* EventQueue::FindHostEventQueueForWindowTreeHost(
-    aura::WindowTreeHost* host) {
+HostEventQueue* EventQueue::GetHostEventQueueForDisplay(int64_t display_id) {
   for (HostEventQueue* host_queue : host_event_queues_) {
-    if (host_queue->window_tree_host() == host)
+    if (host_queue->window_tree_host()->GetDisplayId() == display_id)
       return host_queue;
   }
   return nullptr;
 }
 
+void EventQueue::OnClientTookTooLongToAckEvent() {
+  DVLOG(1) << "Client took too long to respond to event";
+  DCHECK(in_flight_event_);
+  OnClientAckedEvent(in_flight_event_->client_id, in_flight_event_->event_id);
+}
+
 void EventQueue::OnHostEventQueueCreated(HostEventQueue* host) {
   host_event_queues_.insert(host);
 }
@@ -102,11 +117,14 @@
   host_event_queues_.erase(host);
 }
 
-void EventQueue::QueueEvent(HostEventQueue* host, const ui::Event& event) {
+void EventQueue::QueueEvent(HostEventQueue* host,
+                            const ui::Event& event,
+                            bool honor_rewriters) {
   DCHECK(ShouldQueueEvent(host, event));
   std::unique_ptr<QueuedEvent> queued_event = std::make_unique<QueuedEvent>();
   queued_event->host = host;
   queued_event->event = ui::Event::Clone(event);
+  queued_event->honor_rewriters = honor_rewriters;
   queued_events_.push_back(std::move(queued_event));
 }
 
@@ -118,8 +136,8 @@
     if (queued_event->callback) {
       std::move(queued_event->callback).Run();
     } else {
-      queued_event->host->host_event_dispatcher()->DispatchEventFromQueue(
-          queued_event->event.get());
+      queued_event->host->DispatchEventDontQueue(queued_event->event.get(),
+                                                 queued_event->honor_rewriters);
     }
   }
 }
@@ -132,7 +150,8 @@
     in_flight_event_ = InFlightEvent();
     in_flight_event_->client_id = client_id;
     in_flight_event_->event_id = event_id;
-    // TODO(sky): kick off timer.
+    ack_timer_.Start(FROM_HERE, kEventAckTimeout, this,
+                     &EventQueue::OnClientTookTooLongToAckEvent);
   }
 }
 
@@ -143,6 +162,7 @@
     return;
   }
   in_flight_event_.reset();
+  ack_timer_.Stop();
   DispatchNextQueuedEvent();
 }
 
diff --git a/services/ws/event_queue.h b/services/ws/event_queue.h
index 7b3ca820..eac1fb0 100644
--- a/services/ws/event_queue.h
+++ b/services/ws/event_queue.h
@@ -16,6 +16,7 @@
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/optional.h"
+#include "base/timer/timer.h"
 #include "services/ws/ids.h"
 #include "services/ws/window_service_observer.h"
 
@@ -49,10 +50,15 @@
       HostEventDispatcher* dispatcher);
 
   // Convenience to locate the HostEventDispatcher for |window_tree_host|
-  // and call DispatchOrQueueEvent() on it with |event|.
+  // and call DispatchOrQueueEvent() on it with |event|. If |honor_rewriters|
+  // is true, the event is passed through EventRewriters first. Events received
+  // from the platform go through EventRewriters, so generally
+  // |honor_rewriters| should be true, remote injection may need to circumvent
+  // that though.
   static void DispatchOrQueueEvent(WindowService* service,
                                    aura::WindowTreeHost* window_tree_host,
-                                   ui::Event* event);
+                                   ui::Event* event,
+                                   bool honor_rewriters);
 
   // Returns true if |event| should be queued at this time.
   bool ShouldQueueEvent(HostEventQueue* host, const ui::Event& event);
@@ -61,9 +67,8 @@
   // which may be immediately.
   void NotifyWhenReadyToDispatch(base::OnceClosure closure);
 
-  // Returns the HostEventQueue associated with |host|.
-  HostEventQueue* FindHostEventQueueForWindowTreeHost(
-      aura::WindowTreeHost* host);
+  // Returns the HostEventQueue associated with the specified display.
+  HostEventQueue* GetHostEventQueueForDisplay(int64_t display_id);
 
  private:
   friend class EventQueueTestHelper;
@@ -77,12 +82,18 @@
     uint32_t event_id = 0u;
   };
 
+  // Called by |ack_timer_| if the client does not respond to the event in a
+  // timely manner.
+  void OnClientTookTooLongToAckEvent();
+
   // Called when a HostEventQueue is created/deleted.
   void OnHostEventQueueCreated(HostEventQueue* host);
   void OnHostEventQueueDestroyed(HostEventQueue* host);
 
   // Adds |event| to |queued_events_|.
-  void QueueEvent(HostEventQueue* host, const ui::Event& event);
+  void QueueEvent(HostEventQueue* host,
+                  const ui::Event& event,
+                  bool honor_rewriters);
 
   // Processes QueuedEvents until |queued_events_| is empty, or there is an
   // event sent to a client.
@@ -106,6 +117,8 @@
   // Set of HostEventQueues.
   std::set<HostEventQueue*> host_event_queues_;
 
+  base::OneShotTimer ack_timer_;
+
   // Because of destruction order HostEventQueues may outlive this.
   base::WeakPtrFactory<EventQueue> weak_factory_{this};
 
diff --git a/services/ws/event_queue_test_helper.cc b/services/ws/event_queue_test_helper.cc
index 5bea43d8..3cac5bf 100644
--- a/services/ws/event_queue_test_helper.cc
+++ b/services/ws/event_queue_test_helper.cc
@@ -34,4 +34,8 @@
   NOTREACHED();
 }
 
+void EventQueueTestHelper::RunAckTimer() {
+  event_queue_->ack_timer_.FireNow();
+}
+
 }  // namespace ws
diff --git a/services/ws/event_queue_test_helper.h b/services/ws/event_queue_test_helper.h
index dd10b139..a05e1a79 100644
--- a/services/ws/event_queue_test_helper.h
+++ b/services/ws/event_queue_test_helper.h
@@ -21,6 +21,9 @@
 
   void AckInFlightEvent();
 
+  // Forces |EventQueue::ack_timer_| to run now.
+  void RunAckTimer();
+
  private:
   EventQueue* event_queue_;
 
diff --git a/services/ws/event_queue_unittest.cc b/services/ws/event_queue_unittest.cc
index 7871a91..64c07f0 100644
--- a/services/ws/event_queue_unittest.cc
+++ b/services/ws/event_queue_unittest.cc
@@ -11,16 +11,15 @@
 #include "services/ws/event_queue_test_helper.h"
 #include "services/ws/window_service.h"
 #include "services/ws/window_service_test_setup.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/aura/window.h"
-#include "ui/events/event.h"
-#include "ui/events/test/event_generator.h"
-
 #include "services/ws/window_tree_test_helper.h"
+#include "testing/gtest/include/gtest/gtest.h"
 #include "ui/aura/client/aura_constants.h"
 #include "ui/aura/mus/property_converter.h"
+#include "ui/aura/window.h"
 #include "ui/aura/window_observer.h"
 #include "ui/aura/window_tracker.h"
+#include "ui/events/event.h"
+#include "ui/events/test/event_generator.h"
 
 namespace ws {
 namespace {
@@ -118,5 +117,33 @@
   EXPECT_TRUE(was_dispatch_closure_run);
 }
 
+TEST(EventQueueTest, Timeout) {
+  WindowServiceTestSetup setup;
+  setup.set_ack_events_immediately(false);
+
+  // Events are only queued if they target a window with a remote client.
+  aura::Window* top_level =
+      setup.window_tree_test_helper()->NewTopLevelWindow();
+  ASSERT_TRUE(top_level);
+  top_level->Show();
+  top_level->Focus();
+  EXPECT_TRUE(top_level->HasFocus());
+
+  // Generate a single key event.
+  EventQueueTestHelper event_queue_test_helper(setup.service()->event_queue());
+  ui::test::EventGenerator event_generator(setup.root());
+  event_generator.PressKey(ui::VKEY_A, ui::EF_NONE);
+  EXPECT_TRUE(event_queue_test_helper.HasInFlightEvent());
+
+  // Add a closure to be run when the event is acked, or the timeout occurs.
+  bool was_dispatch_closure_run = false;
+  setup.service()->event_queue()->NotifyWhenReadyToDispatch(
+      base::BindLambdaForTesting([&]() { was_dispatch_closure_run = true; }));
+  EXPECT_FALSE(was_dispatch_closure_run);
+
+  event_queue_test_helper.RunAckTimer();
+  EXPECT_TRUE(was_dispatch_closure_run);
+}
+
 }  // namespace
 }  // namespace ws
diff --git a/services/ws/host_event_queue.cc b/services/ws/host_event_queue.cc
index 66e2dfc..1fe7459 100644
--- a/services/ws/host_event_queue.cc
+++ b/services/ws/host_event_queue.cc
@@ -6,6 +6,8 @@
 
 #include "services/ws/event_queue.h"
 #include "services/ws/host_event_dispatcher.h"
+#include "ui/aura/window_tree_host.h"
+#include "ui/events/event_sink.h"
 
 namespace ws {
 
@@ -23,11 +25,22 @@
     event_queue_->OnHostEventQueueDestroyed(this);
 }
 
-void HostEventQueue::DispatchOrQueueEvent(ui::Event* event) {
+void HostEventQueue::DispatchOrQueueEvent(ui::Event* event,
+                                          bool honor_rewriters) {
   if (event_queue_ && event_queue_->ShouldQueueEvent(this, *event))
-    event_queue_->QueueEvent(this, *event);
+    event_queue_->QueueEvent(this, *event, honor_rewriters);
   else
+    DispatchEventDontQueue(event, honor_rewriters);
+}
+
+void HostEventQueue::DispatchEventDontQueue(ui::Event* event,
+                                            bool honor_rewriters) {
+  if (honor_rewriters) {
     host_event_dispatcher_->DispatchEventFromQueue(event);
+  } else {
+    // No need to do anything with the result of sending the event.
+    ignore_result(window_tree_host_->event_sink()->OnEventFromSource(event));
+  }
 }
 
 }  // namespace ws
diff --git a/services/ws/host_event_queue.h b/services/ws/host_event_queue.h
index 541e8747..1015e81 100644
--- a/services/ws/host_event_queue.h
+++ b/services/ws/host_event_queue.h
@@ -38,7 +38,7 @@
 
   // If necessary, queues the event. If the event need not be queued,
   // HostEventDispatcher::DispatchEventFromQueue() is called synchronously.
-  void DispatchOrQueueEvent(ui::Event* event);
+  void DispatchOrQueueEvent(ui::Event* event, bool honor_rewriters = true);
 
   aura::WindowTreeHost* window_tree_host() { return window_tree_host_; }
 
@@ -47,6 +47,12 @@
   }
 
  private:
+  friend class EventQueue;
+
+  // Dispatches an event directly, circumventing any queuing. This is private as
+  // it's only useful internally.
+  void DispatchEventDontQueue(ui::Event* event, bool honor_rewriters);
+
   // Because of shutdown ordering, HostEventQueue may be deleted *after*
   // EventQueue.
   base::WeakPtr<EventQueue> event_queue_;
diff --git a/services/ws/injected_event_handler.cc b/services/ws/injected_event_handler.cc
index 652ab2f7..d4b80e3 100644
--- a/services/ws/injected_event_handler.cc
+++ b/services/ws/injected_event_handler.cc
@@ -57,7 +57,7 @@
   pre_target_register_ = std::make_unique<ScopedPreTargetRegister>(
       window_tree_host_->window(), this);
   EventQueue::DispatchOrQueueEvent(window_service_, window_tree_host_,
-                                   event.get());
+                                   event.get(), /* honors_rewriters */ true);
   if (!this_ref)
     return;
   // |pre_target_register_| needs to be a member to ensure it's destroyed
diff --git a/services/ws/public/cpp/input_devices/input_device_client.cc b/services/ws/public/cpp/input_devices/input_device_client.cc
index d1fdc5a..1c0b122 100644
--- a/services/ws/public/cpp/input_devices/input_device_client.cc
+++ b/services/ws/public/cpp/input_devices/input_device_client.cc
@@ -158,4 +158,9 @@
     observer.OnTouchscreenDeviceConfigurationChanged();
 }
 
+void InputDeviceClient::NotifyObserversTouchpadDeviceConfigurationChanged() {
+  for (auto& observer : observers_)
+    observer.OnTouchpadDeviceConfigurationChanged();
+}
+
 }  // namespace ws
diff --git a/services/ws/public/cpp/input_devices/input_device_client.h b/services/ws/public/cpp/input_devices/input_device_client.h
index e3c2f447e6..8b8b8c6 100644
--- a/services/ws/public/cpp/input_devices/input_device_client.h
+++ b/services/ws/public/cpp/input_devices/input_device_client.h
@@ -75,6 +75,7 @@
   void NotifyObserversDeviceListsComplete();
   void NotifyObserversKeyboardDeviceConfigurationChanged();
   void NotifyObserversTouchscreenDeviceConfigurationChanged();
+  void NotifyObserversTouchpadDeviceConfigurationChanged();
 
   mojo::Binding<mojom::InputDeviceObserverMojo> binding_;
 
diff --git a/services/ws/public/cpp/input_devices/input_device_client_test_api.cc b/services/ws/public/cpp/input_devices/input_device_client_test_api.cc
index 9e60a19..20f630d 100644
--- a/services/ws/public/cpp/input_devices/input_device_client_test_api.cc
+++ b/services/ws/public/cpp/input_devices/input_device_client_test_api.cc
@@ -52,6 +52,16 @@
   }
 }
 
+void InputDeviceClientTestApi::
+    NotifyObserversTouchpadDeviceConfigurationChanged() {
+  if (ui::DeviceDataManager::instance_) {
+    ui::DeviceDataManager::instance_
+        ->NotifyObserversTouchpadDeviceConfigurationChanged();
+  } else {
+    GetInputDeviceClient()->NotifyObserversTouchpadDeviceConfigurationChanged();
+  }
+}
+
 void InputDeviceClientTestApi::OnDeviceListsComplete() {
   if (ui::DeviceDataManager::instance_)
     ui::DeviceDataManager::instance_->OnDeviceListsComplete();
@@ -88,6 +98,15 @@
   }
 }
 
+void InputDeviceClientTestApi::SetTouchpadDevices(
+    const std::vector<ui::InputDevice>& devices) {
+  if (ui::DeviceDataManager::instance_) {
+    ui::DeviceDataManager::instance_->OnTouchpadDevicesUpdated(devices);
+  } else {
+    GetInputDeviceClient()->OnTouchpadDeviceConfigurationChanged(devices);
+  }
+}
+
 InputDeviceClient* InputDeviceClientTestApi::GetInputDeviceClient() {
   if (ui::DeviceDataManager::instance_ ||
       !ui::InputDeviceManager::HasInstance())
diff --git a/services/ws/public/cpp/input_devices/input_device_client_test_api.h b/services/ws/public/cpp/input_devices/input_device_client_test_api.h
index cda4f61..9b24c83e 100644
--- a/services/ws/public/cpp/input_devices/input_device_client_test_api.h
+++ b/services/ws/public/cpp/input_devices/input_device_client_test_api.h
@@ -36,10 +36,12 @@
   void NotifyObserversKeyboardDeviceConfigurationChanged();
   void NotifyObserversStylusStateChanged(ui::StylusState stylus_state);
   void NotifyObserversTouchscreenDeviceConfigurationChanged();
+  void NotifyObserversTouchpadDeviceConfigurationChanged();
   void OnDeviceListsComplete();
 
   void SetKeyboardDevices(const std::vector<ui::InputDevice>& devices);
   void SetMouseDevices(const std::vector<ui::InputDevice>& devices);
+  void SetTouchpadDevices(const std::vector<ui::InputDevice>& devices);
 
   // |are_touchscreen_target_displays_valid| is only applicable to
   // InputDeviceClient. See
diff --git a/services/ws/public/mojom/event_injector.mojom b/services/ws/public/mojom/event_injector.mojom
index 80d1831..17d6b21 100644
--- a/services/ws/public/mojom/event_injector.mojom
+++ b/services/ws/public/mojom/event_injector.mojom
@@ -21,4 +21,7 @@
   // Takes an event and dispatches it as if it came from the native platform.
   // Similar to InjectEvent() but does not respond when processing is complete.
   InjectEventNoAck(int64 display_id, ui.mojom.Event event);
+
+  // Similar to InjectEventNoAck(), but skips event rewriters.
+  InjectEventNoAckNoRewriters(int64 display_id, ui.mojom.Event event);
 };
diff --git a/services/ws/test_host_event_dispatcher.cc b/services/ws/test_host_event_dispatcher.cc
index 810d4924..4c2dea5 100644
--- a/services/ws/test_host_event_dispatcher.cc
+++ b/services/ws/test_host_event_dispatcher.cc
@@ -6,6 +6,7 @@
 
 #include "ui/aura/window_tree_host.h"
 #include "ui/events/event_sink.h"
+#include "ui/events/test/events_test_utils.h"
 
 namespace ws {
 
@@ -18,7 +19,8 @@
 TestHostEventDispatcher::~TestHostEventDispatcher() = default;
 
 void TestHostEventDispatcher::DispatchEventFromQueue(ui::Event* event) {
-  ignore_result(window_tree_host_->event_sink()->OnEventFromSource(event));
+  ignore_result(
+      ui::EventSourceTestApi(window_tree_host_).SendEventToSink(event));
 }
 
 }  // namespace ws
diff --git a/services/ws/test_ws/test_window_service.cc b/services/ws/test_ws/test_window_service.cc
index 6476bfe5..d725405 100644
--- a/services/ws/test_ws/test_window_service.cc
+++ b/services/ws/test_ws/test_window_service.cc
@@ -92,11 +92,6 @@
   drag_drop_client_.DragCancel();
 }
 
-aura::WindowTreeHost* TestWindowService::GetWindowTreeHostForDisplayId(
-    int64_t display_id) {
-  return aura_test_helper_->host();
-}
-
 void TestWindowService::OnStart() {
   CHECK(!started_);
   started_ = true;
diff --git a/services/ws/test_ws/test_window_service.h b/services/ws/test_ws/test_window_service.h
index ffc568c..972d2dc 100644
--- a/services/ws/test_ws/test_window_service.h
+++ b/services/ws/test_ws/test_window_service.h
@@ -69,8 +69,6 @@
                    ui::DragDropTypes::DragEventSource source,
                    DragDropCompletedCallback callback) override;
   void CancelDragLoop(aura::Window* window) override;
-  aura::WindowTreeHost* GetWindowTreeHostForDisplayId(
-      int64_t display_id) override;
 
   // service_manager::Service:
   void OnStart() override;
diff --git a/services/ws/window_service.h b/services/ws/window_service.h
index ee1a58d..a525de1d 100644
--- a/services/ws/window_service.h
+++ b/services/ws/window_service.h
@@ -188,6 +188,7 @@
 
  private:
   friend class WindowServerTestImpl;
+  friend class WindowServiceTestHelper;
 
   // Sets a callback to be called whenever a surface is activated. This
   // corresponds to a client submitting a new CompositorFrame for a Window. This
diff --git a/services/ws/window_service_delegate.cc b/services/ws/window_service_delegate.cc
index dc3b0c8..4b764495 100644
--- a/services/ws/window_service_delegate.cc
+++ b/services/ws/window_service_delegate.cc
@@ -34,11 +34,6 @@
   return nullptr;
 }
 
-aura::WindowTreeHost* WindowServiceDelegate::GetWindowTreeHostForDisplayId(
-    int64_t display_id) {
-  return nullptr;
-}
-
 aura::Window* WindowServiceDelegate::GetTopmostWindowAtPoint(
     const gfx::Point& location_in_screen,
     const std::set<aura::Window*>& ignore,
diff --git a/services/ws/window_service_delegate.h b/services/ws/window_service_delegate.h
index d1f2c684..7d4e88f 100644
--- a/services/ws/window_service_delegate.h
+++ b/services/ws/window_service_delegate.h
@@ -23,7 +23,6 @@
 namespace aura {
 class PropertyConverter;
 class Window;
-class WindowTreeHost;
 }  // namespace aura
 
 namespace gfx {
@@ -118,11 +117,6 @@
   // injection.
   virtual ui::SystemInputInjector* GetSystemInputInjector();
 
-  // Returns the WindowTreeHost for the specified display id, null if not a
-  // valid display.
-  virtual aura::WindowTreeHost* GetWindowTreeHostForDisplayId(
-      int64_t display_id);
-
   // Returns the topmost visible window at the location in screen coordinate,
   // excluding |ignore|. |real_topmost| is updated to the topmost visible window
   // at the location without excluding |ignore|.
diff --git a/services/ws/window_service_test_helper.cc b/services/ws/window_service_test_helper.cc
new file mode 100644
index 0000000..6c8b8890
--- /dev/null
+++ b/services/ws/window_service_test_helper.cc
@@ -0,0 +1,16 @@
+// 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 "services/ws/window_service_test_helper.h"
+
+#include "services/ws/window_service.h"
+
+namespace ws {
+
+WindowServiceTestHelper::WindowServiceTestHelper(WindowService* window_service)
+    : window_service_(window_service) {}
+
+WindowServiceTestHelper::~WindowServiceTestHelper() = default;
+
+}  // namespace ws
diff --git a/services/ws/window_service_test_helper.h b/services/ws/window_service_test_helper.h
new file mode 100644
index 0000000..a06a149
--- /dev/null
+++ b/services/ws/window_service_test_helper.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 SERVICES_WS_WINDOW_SERVICE_TEST_HELPER_H_
+#define SERVICES_WS_WINDOW_SERVICE_TEST_HELPER_H_
+
+#include "base/macros.h"
+#include "services/ws/window_service.h"
+
+namespace ws {
+
+// Used for accessing private members of WindowService in tests.
+class WindowServiceTestHelper {
+ public:
+  explicit WindowServiceTestHelper(WindowService* window_service);
+  ~WindowServiceTestHelper();
+
+  EventInjector* event_injector() {
+    return window_service_->event_injector_.get();
+  }
+
+ private:
+  WindowService* window_service_;
+
+  DISALLOW_COPY_AND_ASSIGN(WindowServiceTestHelper);
+};
+
+}  // namespace ws
+
+#endif  // SERVICES_WS_WINDOW_SERVICE_TEST_HELPER_H_
diff --git a/services/ws/window_service_test_setup.cc b/services/ws/window_service_test_setup.cc
index c5e0c5e..df46b7f 100644
--- a/services/ws/window_service_test_setup.cc
+++ b/services/ws/window_service_test_setup.cc
@@ -15,6 +15,7 @@
 #include "services/ws/window_tree_binding.h"
 #include "ui/aura/client/screen_position_client.h"
 #include "ui/aura/test/event_generator_delegate_aura.h"
+#include "ui/aura/window_tree_host.h"
 #include "ui/display/screen.h"
 #include "ui/events/event_target_iterator.h"
 #include "ui/gl/test/gl_surface_test_support.h"
@@ -154,8 +155,8 @@
   DCHECK(root_window->GetHost());
   return std::make_unique<EventGeneratorDelegateWs>(
       test_setup,
-      test_setup->service()->event_queue()->FindHostEventQueueForWindowTreeHost(
-          root_window->GetHost()));
+      test_setup->service()->event_queue()->GetHostEventQueueForDisplay(
+          root_window->GetHost()->GetDisplayId()));
 }
 
 }  // namespace
diff --git a/skia/config/SkUserConfig.h b/skia/config/SkUserConfig.h
index 75316aa..2795820 100644
--- a/skia/config/SkUserConfig.h
+++ b/skia/config/SkUserConfig.h
@@ -141,6 +141,8 @@
 #   define SK_SUPPORT_LEGACY_ANISOTROPIC_MIPMAP_SCALE
 #endif
 
+#define SK_LEGACY_OP_COLOR_AS_BYTES
+
 // Remove this after we fixed all the issues related to the new SDF algorithm
 // (https://codereview.chromium.org/1643143002)
 #ifndef SK_USE_LEGACY_DISTANCE_FIELDS
diff --git a/testing/buildbot/chromium.gpu.fyi.json b/testing/buildbot/chromium.gpu.fyi.json
index ca9721cb..53dce71 100644
--- a/testing/buildbot/chromium.gpu.fyi.json
+++ b/testing/buildbot/chromium.gpu.fyi.json
@@ -17822,30 +17822,6 @@
           "idempotent": false,
           "shards": 2
         }
-      },
-      {
-        "args": [
-          "webgl_conformance",
-          "--show-stdout",
-          "--browser=debug",
-          "--passthrough",
-          "-v",
-          "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-angle=vulkan --use-cmd-decoder=passthrough"
-        ],
-        "isolate_name": "telemetry_gpu_integration_test",
-        "name": "webgl_conformance_vulkan_passthrough_tests",
-        "swarming": {
-          "can_use_on_swarming_builders": true,
-          "dimension_sets": [
-            {
-              "gpu": "1002:6613",
-              "os": "Windows-2008ServerR2-SP1",
-              "pool": "Chrome-GPU"
-            }
-          ],
-          "idempotent": false,
-          "shards": 2
-        }
       }
     ]
   },
diff --git a/testing/buildbot/filters/chromeos.mash.fyi.browser_tests.filter b/testing/buildbot/filters/chromeos.mash.fyi.browser_tests.filter
index 6efe7aba..48176ef 100644
--- a/testing/buildbot/filters/chromeos.mash.fyi.browser_tests.filter
+++ b/testing/buildbot/filters/chromeos.mash.fyi.browser_tests.filter
@@ -10,12 +10,6 @@
 # Unknown failure.
 -BrowserTabRestoreTest.*
 
-# Extensive use of ash::WindowState.
--InitiallyMaximized/AcceleratorCommandsFullscreenBrowserTest.*
--InitiallyMaximized/AcceleratorCommandsPlatformAppFullscreenBrowserTest.*
--InitiallyRestored/AcceleratorCommandsFullscreenBrowserTest.*
--InitiallyRestored/AcceleratorCommandsPlatformAppFullscreenBrowserTest.*
-
 # Volume adjustment fails.
 -WizardControllerTest.*ChromeVox
 
@@ -162,6 +156,9 @@
 # http://crbug.com/831826
 -ShelfAppBrowserTest.LaunchAppFromDisplayWithoutFocus*
 
+# Test fails. https://crbug.com/899867
+-ShelfAppBrowserTest.SettingsAndTaskManagerWindows
+
 # content::WaitForChildFrameSurfaceReady hangs.
 -SitePerProcessDevToolsSanityTest.InputDispatchEventsToOOPIF
 -ChromeMimeHandlerViewBrowserPluginTest.TouchFocusesBrowserPluginInEmbedder
@@ -206,6 +203,10 @@
 -VirtualKeyboardAppWindowTest.*
 -VirtualKeyboardStateTest.*
 -VirtualKeyboardWebContentTest.*
+-PolicyTest.VirtualKeyboardEnabled
+
+# Uses ash::LockWindow. https://crbug.com/899862
+-ShutdownPolicyLockerTest.*
 
 # Timeouts in content::WaitForChildFrameSurfaceReady()
 # Crashes in viz::HostFrameSinkManager::RegisterFrameSinkId()
@@ -274,4 +275,19 @@
 # https://crbug.com/671891
 -SiteDetailsBrowserTest.IsolateExtensions
 
+# Often timing out. https://crbug.com/899860
+-TopControlsSlideControllerTest.*
+
+# Crashing. https://crbug.com/899864
+-ExtensionDialogBoundsTest.*
+
+# Crashing. https://crbug.com/899865
+-MemoryTracingBrowserTest.TestMemoryInfra
+
+# Test crashes in Mash. https://crbug.com/897012
+-SelectFileDialogExtensionBrowserTest.SelectFileVirtualKeyboard_TabletMode
+
+# Use of Shell. https://crbug.com/899869
+-AutotestPrivateApiTest.AutotestPrivate
+
 # See comment at top of file regarding adding test exclusions.
diff --git a/testing/buildbot/filters/chromeos.single_process_mash.browser_tests.filter b/testing/buildbot/filters/chromeos.single_process_mash.browser_tests.filter
index aab12681..37fe6d97 100644
--- a/testing/buildbot/filters/chromeos.single_process_mash.browser_tests.filter
+++ b/testing/buildbot/filters/chromeos.single_process_mash.browser_tests.filter
@@ -5,12 +5,6 @@
 # Tests that are also blacklisted for Mash.
 # --------------------------------------------------
 
-# Extensive use of ash::WindowState.
--InitiallyMaximized/AcceleratorCommandsFullscreenBrowserTest.*
--InitiallyMaximized/AcceleratorCommandsPlatformAppFullscreenBrowserTest.*
--InitiallyRestored/AcceleratorCommandsFullscreenBrowserTest.*
--InitiallyRestored/AcceleratorCommandsPlatformAppFullscreenBrowserTest.*
-
 # Virtual keyboard not supported.
 -DefaultKeyboardExtensionBrowserTest.*
 -KeyboardEndToEndFocusTest.*
diff --git a/testing/buildbot/generate_buildbot_json.py b/testing/buildbot/generate_buildbot_json.py
index 1d49acd..548ee01 100755
--- a/testing/buildbot/generate_buildbot_json.py
+++ b/testing/buildbot/generate_buildbot_json.py
@@ -756,9 +756,6 @@
     is then applied to every dimension set in the test.
 
     """
-    # TODO(martiniss): Maybe make lists extend, possibly on a case by case
-    # basis. Motivation is 'args', where you want a common base, and then
-    # different mixins adding different sets of args.
     new_test = copy.deepcopy(test)
     mixin = copy.deepcopy(mixin)
 
@@ -777,6 +774,23 @@
       new_test['swarming'].update(swarming_mixin)
       del mixin['swarming']
 
+    if '$mixin_append' in mixin:
+      # Values specified under $mixin_append should be appended to existing
+      # lists, rather than replacing them.
+      mixin_append = mixin['$mixin_append']
+      for key in mixin_append:
+        new_test.setdefault(key, [])
+        if not isinstance(mixin_append[key], list):
+          raise BBGenErr(
+              'Key "' + key + '" in $mixin_append must be a list.')
+        if not isinstance(new_test[key], list):
+          raise BBGenErr(
+              'Cannot apply $mixin_append to non-list "' + key + '".')
+        new_test[key].extend(mixin_append[key])
+      if 'args' in mixin_append:
+        new_test['args'] = self.maybe_fixup_args_array(new_test['args'])
+      del mixin['$mixin_append']
+
     new_test.update(mixin)
 
     return new_test
diff --git a/testing/buildbot/generate_buildbot_json_unittest.py b/testing/buildbot/generate_buildbot_json_unittest.py
index d50b045..1317da1 100755
--- a/testing/buildbot/generate_buildbot_json_unittest.py
+++ b/testing/buildbot/generate_buildbot_json_unittest.py
@@ -2145,6 +2145,36 @@
 }
 """
 
+SWARMING_MIXINS_APPEND = """\
+{
+  'builder_mixin': {
+    '$mixin_append': {
+      'args': [ '--mixin-argument' ],
+    },
+  },
+}
+"""
+
+SWARMING_MIXINS_APPEND_NOT_LIST = """\
+{
+  'builder_mixin': {
+    '$mixin_append': {
+      'args': 'I am not a list',
+    },
+  },
+}
+"""
+
+SWARMING_MIXINS_APPEND_TO_SWARMING = """\
+{
+  'builder_mixin': {
+    '$mixin_append': {
+      'swarming': [ 'swarming!' ],
+    },
+  },
+}
+"""
+
 SWARMING_MIXINS_DUPLICATED = """\
 {
   'builder_mixin': {
@@ -2296,6 +2326,27 @@
 }
 """
 
+BUILDER_MIXIN_APPEND_ARGS_WATERFALL_OUTPUT = """\
+{
+  "AAAAA1 AUTOGENERATED FILE DO NOT EDIT": {},
+  "AAAAA2 See generate_buildbot_json.py to make changes": {},
+  "Fake Tester": {
+    "gtest_tests": [
+      {
+        "args": [
+          "--c_arg",
+          "--mixin-argument"
+        ],
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
+        "test": "foo_test"
+      }
+    ]
+  }
+}
+"""
+
 TEST_MIXIN_WATERFALL_OUTPUT = """\
 {
   "AAAAA1 AUTOGENERATED FILE DO NOT EDIT": {},
@@ -2530,6 +2581,39 @@
           '<snip>',
         ])
 
+  def test_mixin_append_args(self):
+    fbb = FakeBBGen(FOO_GTESTS_BUILDER_MIXIN_WATERFALL,
+                    FOO_TEST_SUITE_WITH_ARGS,
+                    EMPTY_PYL_FILE,
+                    SWARMING_MIXINS_APPEND,
+                    LUCI_MILO_CFG)
+    fbb.files['chromium.test.json'] = BUILDER_MIXIN_APPEND_ARGS_WATERFALL_OUTPUT
+    fbb.check_output_file_consistency(verbose=True)
+    self.assertFalse(fbb.printed_lines)
+
+  def test_mixin_append_mixin_field_not_list(self):
+    fbb = FakeBBGen(FOO_GTESTS_BUILDER_MIXIN_WATERFALL,
+                    FOO_TEST_SUITE_WITH_ARGS,
+                    EMPTY_PYL_FILE,
+                    SWARMING_MIXINS_APPEND_NOT_LIST,
+                    LUCI_MILO_CFG)
+    with self.assertRaisesRegexp(
+        generate_buildbot_json.BBGenErr,
+        'Key "args" in \$mixin_append must be a list.'):
+      fbb.check_output_file_consistency(verbose=True)
+    self.assertFalse(fbb.printed_lines)
+
+  def test_mixin_append_test_field_not_list(self):
+    fbb = FakeBBGen(FOO_GTESTS_BUILDER_MIXIN_WATERFALL,
+                    FOO_TEST_SUITE,
+                    EMPTY_PYL_FILE,
+                    SWARMING_MIXINS_APPEND_TO_SWARMING,
+                    LUCI_MILO_CFG)
+    with self.assertRaisesRegexp(
+        generate_buildbot_json.BBGenErr,
+        'Cannot apply \$mixin_append to non-list "swarming".'):
+      fbb.check_output_file_consistency(verbose=True)
+    self.assertFalse(fbb.printed_lines)
 
 if __name__ == '__main__':
   unittest.main()
diff --git a/testing/buildbot/mixins.pyl b/testing/buildbot/mixins.pyl
index bb9af5d..f1f3c7c7 100644
--- a/testing/buildbot/mixins.pyl
+++ b/testing/buildbot/mixins.pyl
@@ -18,9 +18,22 @@
 # exists.
 #
 # TODO: Potentially switch structure. It's possible we want swarming dimensions
-# to live in their own 'swarming' top level key. This could make things more
-# clear for users, but would require moving mixins into sections. Re-evaluate
-# if there are more uses of this potential feature.
+# to live in their own 'swarming' top level key in this file. The file would
+# then look something like:
+#
+# {
+#   'swarming': {
+#     'x86-64': {
+#       'cpu': 'x86-64',
+#     },
+#   },
+#   'coverage_data': {
+#     'isolate_coverage_data': True,
+#   },
+# }
+#
+# This could make things more clear for users, but would require moving mixins
+# into sections. Re-evaluate if there are more uses of this potential feature.
 #
 # Examples:
 #
diff --git a/testing/buildbot/test_suite_exceptions.pyl b/testing/buildbot/test_suite_exceptions.pyl
index dfdf52c..fe9065cb 100644
--- a/testing/buildbot/test_suite_exceptions.pyl
+++ b/testing/buildbot/test_suite_exceptions.pyl
@@ -1290,6 +1290,11 @@
       },
     },
   },
+  'webgl_conformance_vulkan_passthrough_tests': {
+    'remove_from': [
+      'Win7 FYI Debug (AMD)',
+    ],
+  },
   'webkit_layout_tests': {
     'remove_from': [
       # chromium.fyi
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json
index 2f4e0cf..053d02c 100644
--- a/testing/variations/fieldtrial_testing_config.json
+++ b/testing/variations/fieldtrial_testing_config.json
@@ -5341,6 +5341,21 @@
             ]
         }
     ],
+    "WebRTC-Audio-OpusMinPacketLossRate": [
+        {
+            "platforms": [
+                "windows",
+                "mac",
+                "chromeos",
+                "linux"
+            ],
+            "experiments": [
+                {
+                    "name": "Enabled"
+                }
+            ]
+        }
+    ],
     "WebRTC-EnableWebRtcEcdsa": [
         {
             "platforms": [
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
index 099ca536..1660813 100644
--- a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
+++ b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
@@ -58,15 +58,6 @@
 crbug.com/591099 fast/dom/nodesFromRect/nodesFromRect-basic.html [ Failure ]
 
 # New failures are appended below by the script.
-crbug.com/591099 accessibility/aom-relation-list-properties.html [ Failure ]
-crbug.com/591099 accessibility/aria-labelledby-stay-within.html [ Failure ]
-crbug.com/591099 accessibility/aria-owns.html [ Failure ]
-crbug.com/591099 accessibility/aria-tab-roles.html [ Failure ]
-crbug.com/591099 accessibility/focusable-div.html [ Failure ]
-crbug.com/591099 accessibility/listitem-presentation-inherited.html [ Failure ]
-crbug.com/591099 accessibility/name-calc-aria-owns.html [ Failure ]
-crbug.com/591099 accessibility/presentation-owned-elements.html [ Failure ]
-crbug.com/591099 accessibility/role-attribute.html [ Failure ]
 crbug.com/728378 compositing/culling/tile-occlusion-boundaries.html [ Failure ]
 crbug.com/864398 compositing/iframes/floating-self-painting-frame.html [ Failure ]
 crbug.com/591099 compositing/masks/mask-with-removed-filters.html [ Pass ]
@@ -274,7 +265,6 @@
 crbug.com/591099 external/wpt/picture-in-picture/request-picture-in-picture-twice.html [ Pass ]
 crbug.com/591099 external/wpt/picture-in-picture/request-picture-in-picture.html [ Pass ]
 crbug.com/591099 external/wpt/picture-in-picture/shadow-dom.html [ Pass ]
-crbug.com/591099 external/wpt/quirks/line-height-calculation.html [ Failure ]
 crbug.com/591099 external/wpt/requestidlecallback/callback-iframe.html [ Pass Timeout ]
 crbug.com/591099 external/wpt/service-workers/service-worker/navigation-preload/broken-chunked-encoding.https.html [ Pass ]
 crbug.com/591099 external/wpt/service-workers/service-worker/update-after-navigation-redirect.https.html [ Pass ]
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-gen-property-trees b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-gen-property-trees
index 63bc87c..8c1835b 100644
--- a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-gen-property-trees
+++ b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-gen-property-trees
@@ -1,6 +1,6 @@
 # Expectations for --enable-blink-gen-property-trees
-# TODO(pdr): Remove these expectations as blink-gen-property-trees is enabled as
-# experimental and runs by default on layout tests.
+# We are focused on scrolling, compositing, animations, threading, and paint
+# related tests with all other directories skipped to improve bot cycle time.
 
 Bug(none) app_banner/ [ Skip ]
 Bug(none) battery-status/ [ Skip ]
@@ -107,3 +107,57 @@
 Bug(none) webshare/ [ Skip ]
 Bug(none) xmlviewer/ [ Skip ]
 Bug(none) xr/ [ Skip ]
+
+# These tests failed in normal mode but are fixed with BlinkGenPropertyTrees.
+Bug(none) compositing/overflow/clip-escaping-reverse-order-should-not-crash.html [ Pass ]
+Bug(none) compositing/overflow/composited-scroll-with-fractional-translation.html [ Pass ]
+Bug(none) virtual/prefer_compositing_to_lcd_text/compositing/overflow/clip-escaping-reverse-order-should-not-crash.html [ Pass ]
+Bug(none) virtual/prefer_compositing_to_lcd_text/compositing/overflow/composited-scroll-with-fractional-translation.html [ Pass ]
+crbug.com/865039 compositing/masks/mask-with-added-filters.html [ Pass ]
+# Link highlights are no longer affected by ancestor effects.
+crbug.com/857501 compositing/gestures/gesture-tapHighlight-with-filter.html [ Pass ]
+crbug.com/400829 media/video-object-fit.html [ Pass ]
+crbug.com/400829 compositing/composited-canvas-with-overflowing-object-fit.html [ Pass ]
+
+# These tests are no longer applicable with layer list mode.
+# Move to NeverFixTests later.
+Bug(none) http/tests/devtools/layers/layer-sticky-position-constraint-get.js [ Skip ]
+Bug(none) inspector-protocol/layers/get-layers.js [ Skip ]
+
+# Backdrop filters are experimental (behind a flag) and do not really work with
+# or without BlinkGenPropertyTrees. These tests are marked as failing because
+# the expectations differ, but these do not block BlinkGenPropertyTrees.
+crbug.com/854189 css3/filters/backdrop-filter-rendering-no-background.html [ Failure ]
+crbug.com/854189 css3/filters/backdrop-filter-rendering.html [ Failure ]
+
+# These scrolling tests should pass.
+crbug.com/836913 virtual/threaded/external/wpt/css/css-scroll-snap/snap-at-user-scroll-end-manual.html [ Timeout ]
+
+# Reflection / mask ordering issue
+crbug.com/767318 compositing/reflections/nested-reflection-mask-change.html [ Failure ]
+
+# One line of pixels different when clipping the scrollbar.
+Bug(none) virtual/prefer_compositing_to_lcd_text/compositing/overflow/scaled-overflow.html [ Failure ]
+Bug(none) compositing/overflow/scaled-overflow.html [ Failure ]
+
+# Incorrect scrollbar invalidation.
+crbug.com/887000 virtual/prefer_compositing_to_lcd_text/scrollbars/hidden-scrollbars-invisible.html [ Failure ]
+
+crbug.com/882975 virtual/threaded/fast/events/pinch/gesture-pinch-zoom-prevent-in-handler.html [ Failure Pass ]
+crbug.com/882975 virtual/threaded/fast/events/pinch/scroll-visual-viewport-send-boundary-events.html [ Failure Pass ]
+crbug.com/882975 virtual/threaded/synthetic_gestures/synthetic-pinch-zoom-gesture-touchscreen-desktop.html [ Failure Pass ]
+
+crbug.com/882973 http/tests/devtools/layers/layer-tree-model.js [ Failure ]
+
+crbug.com/884239 virtual/threaded/animations/animationworklet/worklet-animation-local-time-undefined.html [ Failure ]
+
+# These tests have failures that were introduced between enabling BGPT for the
+# first time and later disabling it. These are not real failures and can be
+# rebaselined.
+Bug(none) compositing/geometry/foreground-layer.html [ Failure ]
+Bug(none) compositing/iframes/become-composited-nested-iframes.html [ Failure ]
+Bug(none) compositing/iframes/invisible-nested-iframe-show.html [ Failure ]
+Bug(none) compositing/iframes/overlapped-nested-iframes.html [ Failure ]
+Bug(none) paint/invalidation/compositing/repaint-overflow-scrolled-squashed-content.html [ Failure ]
+Bug(none) paint/invalidation/video-paint-invalidation.html [ Failure ]
+Bug(none) virtual/android/fullscreen/video-overlay-scroll.html [ Failure ]
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2 b/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
index 9bef153..57dadac0 100644
--- a/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
+++ b/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
@@ -1292,3 +1292,18 @@
 Bug(none) virtual/outofblink-cors-ns/http/tests/navigation/same-document-scroll-position-restore.html [ Timeout ]
 Bug(none) virtual/threaded/external/wpt/css/css-scroll-snap/snap-at-user-scroll-end-manual.html [ Timeout ]
 Bug(none) synthetic_gestures/animated-wheel-tiny-delta.html [ Failure ]
+
+# These tests have failures that were introduced between enabling BGPT for the
+# first time and later disabling it. These are not real failures and can be
+# rebaselined.
+Bug(none) compositing/overflow/siblings-composited-with-border-radius-ancestor.html [ Failure ]
+Bug(none) compositing/composited-translated-child-with-border-radius-parent-clip.html [ Failure ]
+Bug(none) compositing/composited-scaled-child-with-border-radius-parent-clip.html [ Failure ]
+Bug(none) compositing/overflow/border-radius-on-two-ancestors-composited-grandchild.html [ Failure ]
+Bug(none) compositing/overflow/border-radius-on-parent-composited-grandchild.html [ Failure ]
+Bug(none) compositing/overflow-trumps-transform-style.html [ Failure ]
+Bug(none) compositing/overflow/border-radius-on-grandparent-composited-grandchild.html [ Failure ]
+Bug(none) compositing/overflow/siblings-composited-with-border-radius-ancestor-one-clipped.html [ Failure ]
+Bug(none) compositing/overflow/grandchild-with-border-radius-ancestor.html [ Failure ]
+Bug(none) compositing/overflow/siblings-with-border-radius-ancestor.html [ Failure ]
+Bug(none) compositing/overflow/grandchild-composited-with-border-radius-ancestor.html [ Failure ]
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations
index 51b4291..c176e79 100644
--- a/third_party/WebKit/LayoutTests/TestExpectations
+++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -110,6 +110,8 @@
 crbug.com/891427 virtual/fractional_scrolling_threaded/fast/scrolling/no-hover-during-scroll.html [ Pass Failure Timeout Crash ]
 # More found by Findit:
 crbug.com/891427 virtual/threaded/animations/invisible-composited-animations-prevent-scroll.html [ Pass Failure Timeout Crash ]
+# One more from Findit: https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux_chromium_rel_ng/220243
+crbug.com/891427 rootscroller/set-root-scroller.html [ Pass Failure Timeout Crash ]
 
 # Remove these when --enable-display-compositor-pixel-dump becomes the
 # "default" setting. These will all need to be re-baselined at that point.
@@ -305,13 +307,6 @@
 crbug.com/807395 fast/multicol/mixed-opacity-test.html [ Failure ]
 # End of Slimming paint v1.75
 
-crbug.com/767318 compositing/reflections/nested-reflection-mask-change.html [ Failure ]
-crbug.com/854189 css3/filters/backdrop-filter-rendering-no-background.html [ Failure ]
-crbug.com/854189 css3/filters/backdrop-filter-rendering.html [ Failure ]
-crbug.com/882973 http/tests/devtools/layers/layer-tree-model.js [ Failure ]
-crbug.com/887000 virtual/prefer_compositing_to_lcd_text/scrollbars/hidden-scrollbars-invisible.html [ Failure ]
-crbug.com/898176 external/wpt/web-animations/timing-model/timelines/timelines.html [ Failure ]
-
 ########## Ref tests can't be rebaselined ##########
 crbug.com/504613 crbug.com/524248 [ Mac ] paint/images/image-backgrounds-not-antialiased.html [ Failure ]
 
@@ -2519,8 +2514,11 @@
 
 crbug.com/400841 media/video-canvas-draw.html [ Failure ]
 crbug.com/400841 virtual/video-surface-layer/media/video-canvas-draw.html [ Failure ]
+crbug.com/400829 media/video-object-fit.html [ Failure ]
+crbug.com/400829 virtual/video-surface-layer/media/video-object-fit.html [ Failure ]
 crbug.com/400829 virtual/stable/media/stable/video-object-fit-stable.html [ Failure ]
 crbug.com/400829 virtual/video-surface-layer/media/stable/video-object-fit-stable.html [ Failure ]
+crbug.com/400829 compositing/composited-canvas-with-overflowing-object-fit.html [ Failure ]
 crbug.com/400829 virtual/gpu/fast/canvas/canvas-with-overflowing-object-fit.html [ Failure ]
 
 # We only want to run one of the web-animations-api tests in stable mode.
@@ -4491,6 +4489,10 @@
 crbug.com/765116 virtual/outofblink-cors/external/wpt/xhr/responsexml-document-properties.htm [ Failure ]
 crbug.com/765116 virtual/outofblink-cors-ns/external/wpt/xhr/responsexml-document-properties.htm [ Failure ]
 
+# Link highlights currently paint under ancestor affects but this is being
+# changed with BlinkGenPropertyTrees. Until that launches, this test will fail.
+crbug.com/857501 compositing/gestures/gesture-tapHighlight-with-filter.html [ Failure ]
+
 crbug.com/716320 external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/broadcastchannel-success-and-failure.html [ Failure Timeout ]
 crbug.com/716320 external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/broadcastchannel-success.html [ Failure Timeout ]
 crbug.com/716320 [ Android ] external/wpt/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-messagechannel-success.html [ Failure Timeout ]
@@ -4769,6 +4771,10 @@
 # Antialiasing error
 crbug.com/845973 virtual/display-compositor-pixel-dump/fast/canvas/display-compositor-pixel-dump/OffscreenCanvas-opaque-background-compositing.html  [ Pass Failure ]
 
+# Workaround crbug.com/817175 . Very difficult to fix with old-world compositing. Pass with SPv2.
+crbug.com/817175 compositing/overflow/clip-escaping-reverse-order-should-not-crash.html [ Failure ]
+crbug.com/817175 virtual/prefer_compositing_to_lcd_text/compositing/overflow/clip-escaping-reverse-order-should-not-crash.html [ Failure ]
+
 # Tests occasionaly timing out (flaky) on WebKit Win7 dbg builder
 crbug.com/757955 [ Win7 Debug ] http/tests/devtools/sources/debugger-pause/pause-on-elements-panel.js [ Pass Timeout ]
 crbug.com/757955 [ Win7 Debug ] storage/indexeddb/mozilla/cursors.html [ Pass Timeout ]
@@ -5348,7 +5354,16 @@
 crbug.com/864888 [ Mac ] editing/selection/offset-from-point-complex-scripts.html [ Failure Pass ]
 crbug.com/864891 [ Mac ] virtual/scroll_customization/fast/scroll-behavior/scroll-customization/scroll-customization-property.html [ Timeout Pass ]
 
-crbug.com/595206 http/tests/devtools/console/console-custom-formatters.js [ Skip ]
+crbug.com/595206 http/tests/devtools/console/console-dir.js [ Skip ]
+crbug.com/595206 http/tests/devtools/console/console-format-classes.js [ Skip ]
+crbug.com/595206 http/tests/devtools/console/console-format-es6.js [ Skip ]
+crbug.com/595206 http/tests/devtools/console/console-format-es6-symbols-error.js [ Skip ]
+crbug.com/595206 http/tests/devtools/console/console-format.js [ Skip ]
+crbug.com/595206 http/tests/devtools/console/console-log-object-with-getter.js [ Skip ]
+crbug.com/595206 http/tests/devtools/console/console-tainted-globals.js [ Skip ]
+crbug.com/595206 http/tests/devtools/runtime/runtime-getProperties-isOwnProperty.js [ Skip ]
+crbug.com/595206 http/tests/devtools/sources/debugger-ui/function-generator-details.js [ Skip ]
+crbug.com/595206 http/tests/devtools/startup/console/console-format-startup.js [ Skip ]
 
 # Sheriff 2018-07-18
 crbug.com/864994 [ Mac ] external/wpt/encoding/legacy-mb-korean/euc-kr/euckr-decode-ksc_5601.html [ Timeout Failure Pass ]
@@ -5737,3 +5752,6 @@
 crbug.com/899710 [ Linux ] virtual/threaded/http/tests/devtools/tracing/timeline-paint/timeline-paint-with-layout-invalidations.js [ Failure Pass ]
 crbug.com/899715 [ Linux ] virtual/threaded/fast/scroll-behavior/wheel-and-touch-scroll-use-count.html [ Failure Pass ]
 crbug.com/898987 [ Android ] synthetic_gestures/smooth-scroll-tiny-delta.html [ Failure Pass ]
+
+# Sheriff 2018-10-30
+crbug.com/867668 [ Linux ] virtual/user-activation-v2/fast/events/middleClickAutoscroll-click-hyperlink.html [ Failure Pass ]
diff --git a/third_party/WebKit/LayoutTests/compositing/composited-scaled-child-with-border-radius-parent-clip-expected.png b/third_party/WebKit/LayoutTests/compositing/composited-scaled-child-with-border-radius-parent-clip-expected.png
index c692dda..446aa85 100644
--- a/third_party/WebKit/LayoutTests/compositing/composited-scaled-child-with-border-radius-parent-clip-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/composited-scaled-child-with-border-radius-parent-clip-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/composited-translated-child-with-border-radius-parent-clip-expected.png b/third_party/WebKit/LayoutTests/compositing/composited-translated-child-with-border-radius-parent-clip-expected.png
index 5bfd018..5393c95 100644
--- a/third_party/WebKit/LayoutTests/compositing/composited-translated-child-with-border-radius-parent-clip-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/composited-translated-child-with-border-radius-parent-clip-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/fixed-body-background-positioned-expected.txt b/third_party/WebKit/LayoutTests/compositing/fixed-body-background-positioned-expected.txt
index 3ec78909d..a9d5368 100644
--- a/third_party/WebKit/LayoutTests/compositing/fixed-body-background-positioned-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/fixed-body-background-positioned-expected.txt
@@ -10,6 +10,10 @@
       "drawsContent": false
     },
     {
+      "name": "Overscroll Elasticity Layer",
+      "drawsContent": false
+    },
+    {
       "name": "Page Scale Layer",
       "drawsContent": false
     },
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/clip-expected.txt b/third_party/WebKit/LayoutTests/compositing/geometry/clip-expected.txt
index 25c210da..100aca1 100644
--- a/third_party/WebKit/LayoutTests/compositing/geometry/clip-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/geometry/clip-expected.txt
@@ -26,6 +26,12 @@
       "transform": 2
     },
     {
+      "name": "Ancestor Clipping Layer",
+      "position": [215, 15],
+      "bounds": [110, 110],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow (relative positioned) DIV class='composited inner'",
       "bounds": [120, 120],
       "backgroundColor": "#00000033",
@@ -59,7 +65,8 @@
         [0, 1, 0, 0],
         [0, 0, 1, 0],
         [210, 10, 0, 1]
-      ]
+      ],
+      "flattenInheritedTransform": false
     },
     {
       "id": 4,
@@ -69,7 +76,8 @@
         [0, 1, 0, 0],
         [0, 0, 1, 0],
         [0, 0, 1, 1]
-      ]
+      ],
+      "flattenInheritedTransform": false
     }
   ]
 }
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/clip-inside-expected.txt b/third_party/WebKit/LayoutTests/compositing/geometry/clip-inside-expected.txt
index 5f640749..3566aba2 100644
--- a/third_party/WebKit/LayoutTests/compositing/geometry/clip-inside-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/geometry/clip-inside-expected.txt
@@ -27,6 +27,12 @@
       "transform": 2
     },
     {
+      "name": "Ancestor Clipping Layer",
+      "position": [225, 35],
+      "bounds": [90, 80],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow (relative positioned) DIV class='composited inner'",
       "bounds": [120, 120],
       "backgroundColor": "#00000033",
@@ -60,7 +66,8 @@
         [0, 1, 0, 0],
         [0, 0, 1, 0],
         [210, 10, 0, 1]
-      ]
+      ],
+      "flattenInheritedTransform": false
     },
     {
       "id": 4,
@@ -70,7 +77,8 @@
         [0, 1, 0, 0],
         [0, 0, 1, 0],
         [0, 0, 1, 1]
-      ]
+      ],
+      "flattenInheritedTransform": false
     }
   ]
 }
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/clip-with-shadow-expected.txt b/third_party/WebKit/LayoutTests/compositing/geometry/clip-with-shadow-expected.txt
index c0cdeeab..3a44c3e 100644
--- a/third_party/WebKit/LayoutTests/compositing/geometry/clip-with-shadow-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/geometry/clip-with-shadow-expected.txt
@@ -24,6 +24,12 @@
       "transform": 2
     },
     {
+      "name": "Ancestor Clipping Layer",
+      "position": [215, 15],
+      "bounds": [110, 110],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow (relative positioned) DIV class='composited inner'",
       "bounds": [120, 120],
       "backgroundColor": "#00000033",
@@ -57,7 +63,8 @@
         [0, 1, 0, 0],
         [0, 0, 1, 0],
         [210, 10, 0, 1]
-      ]
+      ],
+      "flattenInheritedTransform": false
     },
     {
       "id": 4,
@@ -67,7 +74,8 @@
         [0, 1, 0, 0],
         [0, 0, 1, 0],
         [0, 0, 1, 1]
-      ]
+      ],
+      "flattenInheritedTransform": false
     }
   ]
 }
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/foreground-layer-expected.txt b/third_party/WebKit/LayoutTests/compositing/geometry/foreground-layer-expected.txt
index f2424b1..7c7ef798 100644
--- a/third_party/WebKit/LayoutTests/compositing/geometry/foreground-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/geometry/foreground-layer-expected.txt
@@ -43,6 +43,13 @@
       "transform": 4
     },
     {
+      "name": "Child Containment Layer",
+      "position": [59, 59],
+      "bounds": [200, 200],
+      "drawsContent": false,
+      "transform": 4
+    },
+    {
       "name": "LayoutBlockFlow (positioned) DIV class='negative child'",
       "bounds": [50, 50],
       "drawsContent": false,
@@ -50,7 +57,8 @@
     },
     {
       "name": "LayoutBlockFlow (relative positioned) DIV class='main box' (foreground) Layer",
-      "bounds": [318, 318],
+      "position": [59, 59],
+      "bounds": [200, 200],
       "transform": 4
     }
   ],
diff --git a/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-removed-crash.html b/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-removed-crash.html
new file mode 100644
index 0000000..4c686c5d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/compositing/gestures/gesture-tapHighlight-removed-crash.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../../resources/run-after-layout-and-paint.js"></script>
+<div id="targetDiv" style="position: relative; cursor: pointer; width: 300px; height: 300px;"></div>
+<script>
+async_test(function(t) {
+  var clientRect = targetDiv.getBoundingClientRect();
+  var x = (clientRect.left + clientRect.right) / 2;
+  var y = (clientRect.top +  clientRect.bottom) / 2;
+  eventSender.gestureShowPress(x, y);
+  runAfterLayoutAndPaint(t.step_func(function() {
+    targetDiv.parentNode.removeChild(targetDiv);
+    runAfterLayoutAndPaint(t.step_func_done(function() {}));
+  }));
+});
+</script>
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/become-composited-nested-iframes-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/become-composited-nested-iframes-expected.txt
index d178b72..2021656 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/become-composited-nested-iframes-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/become-composited-nested-iframes-expected.txt
@@ -28,6 +28,12 @@
       "bounds": [280, 200]
     },
     {
+      "name": "Child Containment Layer",
+      "position": [22, 122],
+      "bounds": [280, 200],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutIFrame IFRAME",
       "position": [30, 130],
       "bounds": [252, 172]
@@ -39,6 +45,12 @@
       "backgroundColor": "#C0C0C0"
     },
     {
+      "name": "Child Containment Layer",
+      "position": [31, 131],
+      "bounds": [250, 170],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow DIV id='iframe-content' class='box'",
       "bounds": [210, 210],
       "contentsOpaque": true,
@@ -56,6 +68,12 @@
       "bounds": [280, 200]
     },
     {
+      "name": "Child Containment Layer",
+      "position": [22, 346],
+      "bounds": [280, 200],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutIFrame IFRAME",
       "position": [30, 354],
       "bounds": [252, 172]
@@ -67,6 +85,12 @@
       "backgroundColor": "#C0C0C0"
     },
     {
+      "name": "Child Containment Layer",
+      "position": [31, 355],
+      "bounds": [250, 170],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow DIV id='iframe-content' class='box'",
       "bounds": [210, 210],
       "contentsOpaque": true,
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/iframes/invisible-nested-iframe-show-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/invisible-nested-iframe-show-expected.txt
similarity index 94%
rename from third_party/WebKit/LayoutTests/platform/mac/compositing/iframes/invisible-nested-iframe-show-expected.txt
rename to third_party/WebKit/LayoutTests/compositing/iframes/invisible-nested-iframe-show-expected.txt
index f3fc8de..feaa11f 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/iframes/invisible-nested-iframe-show-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/invisible-nested-iframe-show-expected.txt
@@ -51,6 +51,12 @@
       "backgroundColor": "#C0C0C0"
     },
     {
+      "name": "Child Containment Layer",
+      "position": [32, 32],
+      "bounds": [250, 170],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow DIV id='iframe-content' class='box'",
       "bounds": [210, 210],
       "contentsOpaque": true,
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/overlapped-iframe-iframe-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/overlapped-iframe-iframe-expected.txt
index 39fe83cf..c3c1d6f8 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/overlapped-iframe-iframe-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/overlapped-iframe-iframe-expected.txt
@@ -28,6 +28,12 @@
       "backgroundColor": "#C0C0C0"
     },
     {
+      "name": "Child Containment Layer",
+      "position": [2, 2],
+      "bounds": [300, 300],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow DIV id='iframe-content' class='box'",
       "bounds": [210, 210],
       "contentsOpaque": true,
diff --git a/third_party/WebKit/LayoutTests/compositing/iframes/overlapped-nested-iframes-expected.txt b/third_party/WebKit/LayoutTests/compositing/iframes/overlapped-nested-iframes-expected.txt
index 9ba42f2e..368814d 100644
--- a/third_party/WebKit/LayoutTests/compositing/iframes/overlapped-nested-iframes-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/iframes/overlapped-nested-iframes-expected.txt
@@ -31,6 +31,13 @@
       "transform": 1
     },
     {
+      "name": "Child Containment Layer",
+      "position": [22, 152],
+      "bounds": [280, 200],
+      "drawsContent": false,
+      "transform": 1
+    },
+    {
       "name": "LayoutIFrame IFRAME",
       "position": [30, 160],
       "bounds": [252, 172],
@@ -44,6 +51,13 @@
       "transform": 1
     },
     {
+      "name": "Child Containment Layer",
+      "position": [31, 161],
+      "bounds": [250, 170],
+      "drawsContent": false,
+      "transform": 1
+    },
+    {
       "name": "LayoutBlockFlow DIV id='iframe-content' class='box'",
       "bounds": [210, 210],
       "contentsOpaque": true,
@@ -63,6 +77,13 @@
       "transform": 1
     },
     {
+      "name": "Child Containment Layer",
+      "position": [22, 376],
+      "bounds": [280, 200],
+      "drawsContent": false,
+      "transform": 1
+    },
+    {
       "name": "LayoutIFrame IFRAME",
       "position": [30, 384],
       "bounds": [252, 172],
@@ -76,6 +97,13 @@
       "transform": 1
     },
     {
+      "name": "Child Containment Layer",
+      "position": [31, 385],
+      "bounds": [250, 170],
+      "drawsContent": false,
+      "transform": 1
+    },
+    {
       "name": "LayoutBlockFlow DIV id='iframe-content' class='box'",
       "bounds": [210, 210],
       "contentsOpaque": true,
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/overflow-scroll-overlap-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/overflow-scroll-overlap-expected.txt
index dadd6247..0bc9060 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/overflow-scroll-overlap-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/overflow-scroll-overlap-expected.txt
@@ -33,7 +33,9 @@
       "bounds": [306, 206]
     },
     {
-      "name": "Squashing Containment Layer",
+      "name": "Ancestor Clipping Layer",
+      "position": [23, 23],
+      "bounds": [285, 200],
       "drawsContent": false
     },
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-animation-clipping-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-animation-clipping-expected.txt
index 259d5e5..1d920582 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-animation-clipping-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-animation-clipping-expected.txt
@@ -32,6 +32,12 @@
       "backgroundColor": "#FFFFFF"
     },
     {
+      "name": "Child Containment Layer",
+      "position": [59, 231],
+      "bounds": [120, 460],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow (relative positioned) DIV class='box gray force-layer'",
       "bounds": [100, 100],
       "contentsOpaque": true,
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-animation-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-animation-expected.txt
index 6dba170..0f1c74b 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-animation-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-animation-expected.txt
@@ -23,6 +23,12 @@
       "bounds": [122, 242]
     },
     {
+      "name": "Child Containment Layer",
+      "position": [9, 9],
+      "bounds": [120, 240],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow (relative positioned) DIV id='to-animate' class='animating box'",
       "bounds": [100, 100],
       "contentsOpaque": true,
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-clipping-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-clipping-expected.txt
index cddaf922..f2c359c09 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-clipping-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-clipping-expected.txt
@@ -18,6 +18,12 @@
       "backgroundColor": "#FFFFFF"
     },
     {
+      "name": "Ancestor Clipping Layer",
+      "position": [50, 50],
+      "bounds": [100, 100],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow DIV id='child'",
       "bounds": [500, 100],
       "contentsOpaque": true,
@@ -49,7 +55,8 @@
         [0, 1, 0, 0],
         [0, 0, 1, 0],
         [50, 50, 0, 1]
-      ]
+      ],
+      "flattenInheritedTransform": false
     },
     {
       "id": 2,
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-transformed-and-clipped-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-transformed-and-clipped-expected.txt
index 789cc60..7f07d31 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-transformed-and-clipped-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-transformed-and-clipped-expected.txt
@@ -23,6 +23,12 @@
       "transform": 1
     },
     {
+      "name": "Child Containment Layer",
+      "bounds": [100, 100],
+      "drawsContent": false,
+      "transform": 1
+    },
+    {
       "name": "Squashing Containment Layer",
       "drawsContent": false,
       "transform": 1
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-transforms-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-transforms-expected.txt
index 7ac25dba..6d2c9d99 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-transforms-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/overlap-transforms-expected.txt
@@ -23,6 +23,12 @@
       "bounds": [122, 242]
     },
     {
+      "name": "Child Containment Layer",
+      "position": [9, 9],
+      "bounds": [120, 240],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow (relative positioned) DIV class='transformed box'",
       "bounds": [100, 100],
       "contentsOpaque": true,
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-creation/squashing-into-ancestor-clipping-layer-change-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-creation/squashing-into-ancestor-clipping-layer-change-expected.txt
index c796e3f..623ad00 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-creation/squashing-into-ancestor-clipping-layer-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-creation/squashing-into-ancestor-clipping-layer-change-expected.txt
@@ -18,7 +18,9 @@
       "backgroundColor": "#FFFFFF"
     },
     {
-      "name": "Squashing Containment Layer",
+      "name": "Ancestor Clipping Layer",
+      "position": [8, 8],
+      "bounds": [100, 100],
       "drawsContent": false
     },
     {
diff --git a/third_party/WebKit/LayoutTests/compositing/layer-tree-expected.txt b/third_party/WebKit/LayoutTests/compositing/layer-tree-expected.txt
index e2a0b0b..18acd2b 100644
--- a/third_party/WebKit/LayoutTests/compositing/layer-tree-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/layer-tree-expected.txt
@@ -9,34 +9,40 @@
       "drawsContent": false,
       "children": [
         {
-          "name": "Page Scale Layer",
+          "name": "Overscroll Elasticity Layer",
           "drawsContent": false,
           "children": [
             {
-              "name": "Inner Viewport Scroll Layer",
-              "bounds": [800, 600],
+              "name": "Page Scale Layer",
               "drawsContent": false,
               "children": [
                 {
-                  "name": "LayoutView #document",
+                  "name": "Inner Viewport Scroll Layer",
                   "bounds": [800, 600],
                   "drawsContent": false,
-                  "backgroundColor": "#FFFFFF",
-                  "shouldFlattenTransform": false,
                   "children": [
                     {
-                      "name": "Scrolling Layer",
-                      "bounds": [780, 580],
+                      "name": "LayoutView #document",
+                      "bounds": [800, 600],
                       "drawsContent": false,
-                      "flattenInheritedTransform": false,
+                      "backgroundColor": "#FFFFFF",
                       "shouldFlattenTransform": false,
                       "children": [
                         {
-                          "name": "Scrolling Contents Layer",
-                          "bounds": [1200, 900],
-                          "contentsOpaque": true,
-                          "backgroundColor": "#FFFFFF",
-                          "flattenInheritedTransform": false
+                          "name": "Scrolling Layer",
+                          "bounds": [780, 580],
+                          "drawsContent": false,
+                          "flattenInheritedTransform": false,
+                          "shouldFlattenTransform": false,
+                          "children": [
+                            {
+                              "name": "Scrolling Contents Layer",
+                              "bounds": [1200, 900],
+                              "contentsOpaque": true,
+                              "backgroundColor": "#FFFFFF",
+                              "flattenInheritedTransform": false
+                            }
+                          ]
                         }
                       ]
                     }
@@ -86,6 +92,10 @@
       "drawsContent": false
     },
     {
+      "name": "Overscroll Elasticity Layer",
+      "drawsContent": false
+    },
+    {
       "name": "Page Scale Layer",
       "drawsContent": false
     },
diff --git a/third_party/WebKit/LayoutTests/compositing/lots-of-img-layers-expected.png b/third_party/WebKit/LayoutTests/compositing/lots-of-img-layers-expected.png
new file mode 100644
index 0000000..f27c69a0f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/compositing/lots-of-img-layers-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/lots-of-img-layers-with-opacity-expected.png b/third_party/WebKit/LayoutTests/compositing/lots-of-img-layers-with-opacity-expected.png
new file mode 100644
index 0000000..0b6f5e7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/compositing/lots-of-img-layers-with-opacity-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/opacity-with-mask-expected.png b/third_party/WebKit/LayoutTests/compositing/opacity-with-mask-expected.png
index 7792efb..b39d0c8 100644
--- a/third_party/WebKit/LayoutTests/compositing/opacity-with-mask-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/opacity-with-mask-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-above-composited-subframe-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-above-composited-subframe-expected.png
index 1a941fc1..3c73dc0 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-above-composited-subframe-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-above-composited-subframe-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-composited-subframe-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-composited-subframe-expected.png
index d0ef886..8540490 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-composited-subframe-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-composited-subframe-expected.png
Binary files differ
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
index 2cee245..f4b4fff8 100644
--- 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
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-parent-composited-grandchild-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-parent-composited-grandchild-expected.png
index 9e367a68..f380d7a 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-parent-composited-grandchild-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-on-parent-composited-grandchild-expected.png
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
index b9fac482..61743f1 100644
--- 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
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-styles-with-composited-child-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-styles-with-composited-child-expected.png
index 3a2a7e5..a9c5b83c 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-styles-with-composited-child-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-styles-with-composited-child-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/clear-scroll-parent-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/clear-scroll-parent-expected.txt
index 6ec2d94..9b7a2ba 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/clear-scroll-parent-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/clear-scroll-parent-expected.txt
@@ -60,11 +60,17 @@
       "backgroundColor": "#008000"
     },
     {
+      "name": "Ancestor Clipping Layer",
+      "position": [12, 12],
+      "bounds": [80, 80],
+      "drawsContent": false,
+      "hasScrollParent": true
+    },
+    {
       "name": "LayoutBlockFlow (relative positioned) DIV class='box red'",
       "position": [22, 22],
       "bounds": [100, 100],
-      "backgroundColor": "#FF000080",
-      "hasScrollParent": true
+      "backgroundColor": "#FF000080"
     },
     {
       "name": "Squashing Containment Layer",
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/clip-descendents-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/clip-descendents-expected.txt
index cbfaa8c..048aec8 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/clip-descendents-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/clip-descendents-expected.txt
@@ -18,6 +18,12 @@
       "backgroundColor": "#FFFFFF"
     },
     {
+      "name": "Ancestor Clipping Layer",
+      "position": [48, 38],
+      "bounds": [60, 70],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow DIV class='box'",
       "bounds": [100, 150],
       "contentsOpaque": true,
@@ -25,6 +31,12 @@
       "transform": 2
     },
     {
+      "name": "Ancestor Clipping Layer",
+      "position": [240, 38],
+      "bounds": [60, 70],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow DIV class='box'",
       "bounds": [100, 150],
       "contentsOpaque": true,
@@ -37,6 +49,12 @@
       "bounds": [60, 70]
     },
     {
+      "name": "Child Containment Layer",
+      "position": [48, 230],
+      "bounds": [60, 70],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow DIV class='box'",
       "bounds": [100, 150],
       "contentsOpaque": true,
@@ -49,6 +67,12 @@
       "bounds": [60, 70]
     },
     {
+      "name": "Child Containment Layer",
+      "position": [240, 230],
+      "bounds": [60, 70],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow DIV class='box'",
       "bounds": [100, 150],
       "contentsOpaque": true,
@@ -64,7 +88,8 @@
         [0, 1, 0, 0],
         [0, 0, 1, 0],
         [50, 50, 0, 1]
-      ]
+      ],
+      "flattenInheritedTransform": false
     },
     {
       "id": 2,
@@ -74,7 +99,8 @@
         [0, 1, 0, 0],
         [0, 0, 1, 0],
         [0, 0, 1, 1]
-      ]
+      ],
+      "flattenInheritedTransform": false
     },
     {
       "id": 3,
@@ -83,7 +109,8 @@
         [0, 1, 0, 0],
         [0, 0, 1, 0],
         [242, 50, 0, 1]
-      ]
+      ],
+      "flattenInheritedTransform": false
     },
     {
       "id": 4,
@@ -93,7 +120,8 @@
         [0, 1, 0, 0],
         [0, 0, 1, 0],
         [0, 0, 1, 1]
-      ]
+      ],
+      "flattenInheritedTransform": false
     },
     {
       "id": 5,
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/content-gains-scrollbars-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/content-gains-scrollbars-expected.txt
index 5738063..285f901d 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/content-gains-scrollbars-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/content-gains-scrollbars-expected.txt
@@ -144,6 +144,12 @@
       "transform": 4
     },
     {
+      "name": "Child Containment Layer",
+      "bounds": [100, 100],
+      "drawsContent": false,
+      "transform": 4
+    },
+    {
       "name": "LayoutBlockFlow (positioned) DIV class='content'",
       "bounds": [10, 10],
       "drawsContent": false,
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/content-loses-scrollbars-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/content-loses-scrollbars-expected.txt
index ccb3739..28e47b8 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/content-loses-scrollbars-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/content-loses-scrollbars-expected.txt
@@ -24,6 +24,12 @@
       "transform": 1
     },
     {
+      "name": "Child Containment Layer",
+      "bounds": [100, 100],
+      "drawsContent": false,
+      "transform": 1
+    },
+    {
       "name": "LayoutBlockFlow (positioned) DIV id='vertical' class='content'",
       "bounds": [10, 10],
       "drawsContent": false,
@@ -36,6 +42,12 @@
       "transform": 2
     },
     {
+      "name": "Child Containment Layer",
+      "bounds": [100, 100],
+      "drawsContent": false,
+      "transform": 2
+    },
+    {
       "name": "LayoutBlockFlow (positioned) DIV id='horizontal' class='content'",
       "bounds": [10, 10],
       "drawsContent": false,
@@ -48,6 +60,12 @@
       "transform": 3
     },
     {
+      "name": "Child Containment Layer",
+      "bounds": [100, 100],
+      "drawsContent": false,
+      "transform": 3
+    },
+    {
       "name": "LayoutBlockFlow (positioned) DIV id='both' class='content'",
       "bounds": [10, 10],
       "drawsContent": false,
@@ -60,6 +78,12 @@
       "transform": 4
     },
     {
+      "name": "Child Containment Layer",
+      "bounds": [100, 100],
+      "drawsContent": false,
+      "transform": 4
+    },
+    {
       "name": "LayoutBlockFlow (positioned) DIV class='content'",
       "bounds": [10, 10],
       "drawsContent": false,
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
index f38a1b2..b219e48 100644
--- 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
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
index f38a1b2..b219e48 100644
--- 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
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/no-excessive-clip-parent-if-parent-escaped-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/no-excessive-clip-parent-if-parent-escaped-expected.txt
index 88d5d8a..cc0d374d 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/no-excessive-clip-parent-if-parent-escaped-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/no-excessive-clip-parent-if-parent-escaped-expected.txt
@@ -25,6 +25,12 @@
       "backgroundColor": "#FF0000"
     },
     {
+      "name": "Child Containment Layer",
+      "position": [8, 8],
+      "bounds": [100, 100],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow (positioned) DIV",
       "position": [8, 8],
       "bounds": [50, 50],
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scrollbar-layers-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scrollbar-layers-expected.txt
index 59e20844..f679344 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scrollbar-layers-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scrollbar-layers-expected.txt
@@ -144,6 +144,12 @@
       "transform": 4
     },
     {
+      "name": "Child Containment Layer",
+      "bounds": [100, 100],
+      "drawsContent": false,
+      "transform": 4
+    },
+    {
       "name": "LayoutBlockFlow (positioned) DIV class='content'",
       "bounds": [10, 10],
       "drawsContent": false,
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/reparented-scrollbars-non-sc-anc-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/reparented-scrollbars-non-sc-anc-expected.txt
index 9bf52b91..c8f192a 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/reparented-scrollbars-non-sc-anc-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/reparented-scrollbars-non-sc-anc-expected.txt
@@ -18,11 +18,29 @@
       "backgroundColor": "#FFFFFF"
     },
     {
+      "name": "Ancestor Clipping Layer",
+      "position": [8, 8],
+      "bounds": [1200, 800],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow (relative positioned) DIV id='positioned'",
       "position": [8, 8],
       "bounds": [1200, 800]
     },
     {
+      "name": "Child Containment Layer",
+      "position": [8, 8],
+      "bounds": [1200, 800],
+      "drawsContent": false
+    },
+    {
+      "name": "Ancestor Clipping Layer",
+      "position": [8, 8],
+      "bounds": [1200, 1000],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow DIV id='scroller'",
       "position": [8, 8],
       "bounds": [1200, 1000]
@@ -45,6 +63,12 @@
       "drawsContent": false
     },
     {
+      "name": "Overflow Controls Ancestor Clipping Layer",
+      "position": [8, 8],
+      "bounds": [1200, 1000],
+      "drawsContent": false
+    },
+    {
       "name": "Overflow Controls Host Layer",
       "position": [8, 8],
       "bounds": [1200, 1000],
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/rotate-clip-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/rotate-clip-expected.txt
index 101f13c..9801d91 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/rotate-clip-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/rotate-clip-expected.txt
@@ -23,6 +23,13 @@
       "transform": 2
     },
     {
+      "name": "Child Containment Layer",
+      "position": [20, 20],
+      "bounds": [200, 200],
+      "drawsContent": false,
+      "transform": 2
+    },
+    {
       "name": "LayoutBlockFlow DIV",
       "position": [20, 20],
       "bounds": [400, 400],
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-effect-interleave-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-effect-interleave-expected.txt
index c087562..a390599f 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-effect-interleave-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-effect-interleave-expected.txt
@@ -30,6 +30,13 @@
       "transform": 2
     },
     {
+      "name": "Ancestor Clipping Layer",
+      "position": [20, 20],
+      "bounds": [200, 200],
+      "drawsContent": false,
+      "transform": 2
+    },
+    {
       "name": "LayoutBlockFlow DIV",
       "position": [20, 20],
       "bounds": [400, 400],
@@ -46,6 +53,13 @@
       "transform": 2
     },
     {
+      "name": "Ancestor Clipping Layer",
+      "position": [20, 20],
+      "bounds": [200, 200],
+      "drawsContent": false,
+      "transform": 2
+    },
+    {
       "name": "LayoutBlockFlow (relative positioned) DIV",
       "position": [20, 20],
       "bounds": [100, 400],
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-expected.txt
index 101f13c..fbb4681 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-expected.txt
@@ -23,6 +23,13 @@
       "transform": 2
     },
     {
+      "name": "Ancestor Clipping Layer",
+      "position": [20, 20],
+      "bounds": [200, 200],
+      "drawsContent": false,
+      "transform": 2
+    },
+    {
       "name": "LayoutBlockFlow DIV",
       "position": [20, 20],
       "bounds": [400, 400],
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-z-order-interleave-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-z-order-interleave-expected.png
index 5b9c2a3..d4ef5fe 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-z-order-interleave-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-z-order-interleave-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-z-order-interleave-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-z-order-interleave-expected.txt
index c40716aa..f97eb4f 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-z-order-interleave-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-z-order-interleave-expected.txt
@@ -23,6 +23,12 @@
       "transform": 2
     },
     {
+      "name": "Ancestor Clipping Layer",
+      "bounds": [100, 100],
+      "drawsContent": false,
+      "transform": 2
+    },
+    {
       "name": "LayoutBlockFlow (relative positioned) DIV",
       "bounds": [200, 100],
       "contentsOpaque": true,
@@ -37,6 +43,12 @@
       "transform": 2
     },
     {
+      "name": "Ancestor Clipping Layer",
+      "bounds": [100, 100],
+      "drawsContent": false,
+      "transform": 2
+    },
+    {
       "name": "LayoutBlockFlow (relative positioned) DIV",
       "bounds": [50, 200],
       "contentsOpaque": true,
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/scaled-overflow-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/scaled-overflow-expected.png
index 028be3d..67503d7 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/scaled-overflow-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/scaled-overflow-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/scroll-parent-with-non-stacking-context-composited-ancestor-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/scroll-parent-with-non-stacking-context-composited-ancestor-expected.txt
index d50ca8f2..15c58a53 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/scroll-parent-with-non-stacking-context-composited-ancestor-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/scroll-parent-with-non-stacking-context-composited-ancestor-expected.txt
@@ -28,8 +28,7 @@
     {
       "name": "LayoutBlockFlow DIV id='scroller'",
       "position": [98, 90],
-      "bounds": [102, 102],
-      "backfaceVisibility": "hidden"
+      "bounds": [102, 102]
     },
     {
       "name": "Scrolling Layer",
@@ -41,8 +40,7 @@
       "name": "Scrolling Contents Layer",
       "position": [99, 91],
       "bounds": [100, 180],
-      "drawsContent": false,
-      "backfaceVisibility": "hidden"
+      "drawsContent": false
     },
     {
       "name": "LayoutBlockFlow (positioned) DIV id='fixed'",
@@ -60,14 +58,12 @@
       "position": [103, 95],
       "bounds": [60, 40],
       "contentsOpaque": true,
-      "backfaceVisibility": "hidden",
       "backgroundColor": "#0000FF"
     },
     {
       "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (relative positioned) DIV class='scrolled')",
       "position": [103, 139],
-      "bounds": [60, 128],
-      "backfaceVisibility": "hidden"
+      "bounds": [60, 128]
     },
     {
       "name": "Overflow Controls Host Layer",
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/scrollbar-layer-placement-expected.txt b/third_party/WebKit/LayoutTests/compositing/overflow/scrollbar-layer-placement-expected.txt
index b5a628c..7be354a 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/scrollbar-layer-placement-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/scrollbar-layer-placement-expected.txt
@@ -100,6 +100,12 @@
       "bounds": [340, 282]
     },
     {
+      "name": "Ancestor Clipping Layer",
+      "position": [46, 337],
+      "bounds": [260, 100],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow DIV class='scroller'",
       "position": [37, 328],
       "bounds": [278, 218],
@@ -125,6 +131,12 @@
       "backgroundColor": "#DDDDDD"
     },
     {
+      "name": "Overflow Controls Ancestor Clipping Layer",
+      "position": [46, 337],
+      "bounds": [260, 100],
+      "drawsContent": false
+    },
+    {
       "name": "Overflow Controls Host Layer",
       "position": [61, 352],
       "bounds": [230, 170],
@@ -147,6 +159,18 @@
       "bounds": [292, 200]
     },
     {
+      "name": "Child Containment Layer",
+      "position": [389, 331],
+      "bounds": [272, 180],
+      "drawsContent": false
+    },
+    {
+      "name": "Ancestor Clipping Layer",
+      "position": [395, 337],
+      "bounds": [260, 100],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow DIV class='scroller'",
       "position": [386, 328],
       "bounds": [278, 218],
@@ -172,6 +196,12 @@
       "backgroundColor": "#DDDDDD"
     },
     {
+      "name": "Overflow Controls Ancestor Clipping Layer",
+      "position": [395, 337],
+      "bounds": [260, 100],
+      "drawsContent": false
+    },
+    {
       "name": "Overflow Controls Host Layer",
       "position": [410, 352],
       "bounds": [230, 170],
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
index f38a1b2..b219e48 100644
--- 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
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
index 00fa2b9..ef41de3 100644
--- 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
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/siblings-with-border-radius-ancestor-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/siblings-with-border-radius-ancestor-expected.png
index ff3a0270..fa893ed 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/siblings-with-border-radius-ancestor-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/siblings-with-border-radius-ancestor-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/tiled-mask-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/tiled-mask-expected.png
index d1b758a..500561a 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/tiled-mask-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/tiled-mask-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/perpendicular-layer-sorting-expected.png b/third_party/WebKit/LayoutTests/compositing/perpendicular-layer-sorting-expected.png
index 38a1f4c..9a75d615 100644
--- a/third_party/WebKit/LayoutTests/compositing/perpendicular-layer-sorting-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/perpendicular-layer-sorting-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/perspective-interest-rect-expected.png b/third_party/WebKit/LayoutTests/compositing/perspective-interest-rect-expected.png
index eec373b..453aee2c 100644
--- a/third_party/WebKit/LayoutTests/compositing/perspective-interest-rect-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/perspective-interest-rect-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/rtl/rtl-iframe-absolute-expected.txt b/third_party/WebKit/LayoutTests/compositing/rtl/rtl-iframe-absolute-expected.txt
index 47a25e3..11a5e14 100644
--- a/third_party/WebKit/LayoutTests/compositing/rtl/rtl-iframe-absolute-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/rtl/rtl-iframe-absolute-expected.txt
@@ -27,6 +27,11 @@
       "backgroundColor": "#FF0000"
     },
     {
+      "name": "Child Containment Layer",
+      "bounds": [400, 400],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow (positioned) DIV class='positioned layer'",
       "bounds": [100, 100],
       "contentsOpaque": true,
diff --git a/third_party/WebKit/LayoutTests/compositing/rtl/rtl-iframe-fixed-expected.txt b/third_party/WebKit/LayoutTests/compositing/rtl/rtl-iframe-fixed-expected.txt
index 47a25e3..11a5e14 100644
--- a/third_party/WebKit/LayoutTests/compositing/rtl/rtl-iframe-fixed-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/rtl/rtl-iframe-fixed-expected.txt
@@ -27,6 +27,11 @@
       "backgroundColor": "#FF0000"
     },
     {
+      "name": "Child Containment Layer",
+      "bounds": [400, 400],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow (positioned) DIV class='positioned layer'",
       "bounds": [100, 100],
       "contentsOpaque": true,
diff --git a/third_party/WebKit/LayoutTests/compositing/rtl/rtl-iframe-relative-expected.txt b/third_party/WebKit/LayoutTests/compositing/rtl/rtl-iframe-relative-expected.txt
index 2c64a041..7d4fc5b 100644
--- a/third_party/WebKit/LayoutTests/compositing/rtl/rtl-iframe-relative-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/rtl/rtl-iframe-relative-expected.txt
@@ -26,6 +26,11 @@
       "bounds": [400, 400]
     },
     {
+      "name": "Child Containment Layer",
+      "bounds": [400, 400],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow (relative positioned) DIV id='layer'",
       "bounds": [100, 100],
       "contentsOpaque": true,
diff --git a/third_party/WebKit/LayoutTests/compositing/scrollbars/nested-overlay-scrollbars-expected.png b/third_party/WebKit/LayoutTests/compositing/scrollbars/nested-overlay-scrollbars-expected.png
index 1fa1711d..219172d 100644
--- a/third_party/WebKit/LayoutTests/compositing/scrollbars/nested-overlay-scrollbars-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/scrollbars/nested-overlay-scrollbars-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/clipping-ancestor-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/clipping-ancestor-expected.txt
index d296aee5..7298b1c 100644
--- a/third_party/WebKit/LayoutTests/compositing/squashing/clipping-ancestor-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/squashing/clipping-ancestor-expected.txt
@@ -18,6 +18,12 @@
       "backgroundColor": "#FFFFFF"
     },
     {
+      "name": "Ancestor Clipping Layer",
+      "position": [8, 8],
+      "bounds": [200, 10],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow DIV id='inner'",
       "bounds": [200, 10],
       "contentsOpaque": true,
@@ -40,7 +46,8 @@
         [0, 1, 0, 0],
         [0, 0, 1, 0],
         [8, 8, 0, 1]
-      ]
+      ],
+      "flattenInheritedTransform": false
     }
   ]
 }
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/no-squashing-into-fixed-position-that-clips-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/no-squashing-into-fixed-position-that-clips-expected.txt
index f9ed6c24..f13b579 100644
--- a/third_party/WebKit/LayoutTests/compositing/squashing/no-squashing-into-fixed-position-that-clips-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/squashing/no-squashing-into-fixed-position-that-clips-expected.txt
@@ -25,6 +25,12 @@
       "backgroundColor": "#ADD8E6"
     },
     {
+      "name": "Child Containment Layer",
+      "position": [0, 50],
+      "bounds": [800, 550],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow (positioned) DIV class='compositedlayer'",
       "bounds": [24, 100],
       "contentsOpaque": true,
diff --git a/third_party/WebKit/LayoutTests/compositing/visibility/layer-visible-content-expected.txt b/third_party/WebKit/LayoutTests/compositing/visibility/layer-visible-content-expected.txt
index cf2e1362..0b05974b 100644
--- a/third_party/WebKit/LayoutTests/compositing/visibility/layer-visible-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/compositing/visibility/layer-visible-content-expected.txt
@@ -22,6 +22,11 @@
       "bounds": [200, 200]
     },
     {
+      "name": "Child Containment Layer",
+      "bounds": [200, 200],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow DIV class='composited box'",
       "bounds": [10, 10],
       "drawsContent": false
diff --git a/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/get-databases.any.js b/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/get-databases.any.js
index 99b7ae7..f054e0f 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/get-databases.any.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/get-databases.any.js
@@ -1,50 +1,62 @@
-// META: script=support.js
+// META: script=support-promises.js
 
-async_test( async function(t) {
-  let made_database_check = t.step_func(async function() {
-    let idb_databases_promise = await indexedDB.databases();
-    assert_true(
-      idb_databases_promise.some(
-          e => e.name == "TestDatabase" && e.version == 1),
-      "Call to databases() did not find database.");
-    t.done();
-  });
-  delete_then_open(t, "TestDatabase", ()=>{}, made_database_check);
-}, "Report one database test.");
+promise_test(async testCase => {
+  // Delete any databases that may not have been cleaned up after
+  // previous test runs.
+  await deleteAllDatabases(testCase);
 
-async_test( function(t) {
-  let done_making_databases_callback = t.step_func(async function() {
-    let idb_databases_promise = await indexedDB.databases();
-    assert_true(
-      idb_databases_promise.some(
-          e => e.name == "TestDatabase1" && e.version == 1),
-      "Call to databases() did not find database.");
-    assert_true(
-      idb_databases_promise.some(
-          e => e.name == "TestDatabase2" && e.version == 1),
-      "Call to databases() did not find database.");
-    assert_true(
-      idb_databases_promise.some(
-          e => e.name == "TestDatabase3" && e.version == 1),
-      "Call to databases() did not find database.");
-    t.done();
-  });
-  let make_databases_barrier = create_barrier(done_making_databases_callback);
-  delete_then_open(t, "TestDatabase1", ()=>{}, make_databases_barrier(t));
-  delete_then_open(t, "TestDatabase2", ()=>{}, make_databases_barrier(t));
-  delete_then_open(t, "TestDatabase3", ()=>{}, make_databases_barrier(t));
-}, "Report multiple databases test.");
+  const db_name = "TestDatabase";
+  const db = await createNamedDatabase(testCase, db_name, ()=>{});
+  const databases_promise = await indexedDB.databases();
+  const expected_result = [
+    {"name": db_name, "version": 1},
+  ];
+  assert_object_equals(
+      databases_promise,
+      expected_result,
+      "Call to databases() did not retrieve the single expected result.");
+}, "Enumerate one database.");
 
-async_test( function(t) {
-  let delete_request = indexedDB.deleteDatabase("NonExistentDatabase");
-  delete_request.onsuccess = t.step_func(async function() {
-    let idb_databases_promise = await indexedDB.databases();
-    assert_false(
-      idb_databases_promise.some(
-          e => e.name == "NonExistentDatabase"),
-      "Call to databases() found excluded database.");
-    t.done();
-  });
-}, "Don't report nonexistant databases test.");
+promise_test(async testCase => {
+  // Delete any databases that may not have been cleaned up after previous test
+  // runs.
+  await deleteAllDatabases(testCase);
+
+  const db_name1 = "TestDatabase1";
+  const db_name2 = "TestDatabase2";
+  const db_name3 = "TestDatabase3";
+  const db1 = await createNamedDatabase(testCase, db_name1, ()=>{});
+  const db2 = await createNamedDatabase(testCase, db_name2, ()=>{});
+  const db3 = await createNamedDatabase(testCase, db_name3, ()=>{});
+  const databases_promise = await indexedDB.databases();
+  const expected_result = [
+    {"name": db_name1, "version": 1},
+    {"name": db_name2, "version": 1},
+    {"name": db_name3, "version": 1},
+  ];
+  assert_object_equals(
+    databases_promise,
+    expected_result,
+    "Call to databases() did not retrieve the multiple expected results");
+}, "Enumerate multiple databases.");
+
+promise_test(async testCase => {
+  // Add some databases and close their connections.
+  const db1 = await createNamedDatabase(testCase, "DB1", ()=>{});
+  const db2 = await createNamedDatabase(testCase, "DB2", ()=>{});
+  db1.onversionchange = () => { db1.close() };
+  db2.onversionchange = () => { db2.close() };
+
+  // Delete any databases that may not have been cleaned up after previous test
+  // runs as well as the two databases made above.
+  await deleteAllDatabases(testCase);
+
+  // Make sure the databases are no longer returned.
+  const databases_promise = await indexedDB.databases();
+  assert_object_equals(
+    databases_promise,
+    [],
+    "Call to databases() found database it should not have.")
+}, "Make sure an empty list is returned for the case of no databases.");
 
 done();
diff --git a/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/support-promises.js b/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/support-promises.js
index 21e2163e..d320ba0 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/support-promises.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/support-promises.js
@@ -290,3 +290,12 @@
 
   return buffer;
 }
+
+async function deleteAllDatabases(testCase) {
+  const dbs_to_delete = await indexedDB.databases();
+  for( const db_info of dbs_to_delete) {
+    let request = indexedDB.deleteDatabase(db_info.name);
+    let eventWatcher = requestWatcher(testCase, request);
+    await eventWatcher.wait_for('success');
+  }
+}
diff --git a/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/support.js b/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/support.js
index 9b3b922..5edbdac 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/support.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/support.js
@@ -192,49 +192,3 @@
     pin = false;
   };
 }
-
-/**
- * Ensures that indexeddb database specified by db_name is deleted, and then
- * opens a connection to that database.
- *
- * @param t: the testing script state
- * @param db_name: name of database to delete then create
- * @param upgrade_func: function to be called if db_name needs upgrading
- * @param body_func: function to be called upon successful deletion
- *    and creation of db_name
- */
-function delete_then_open(t, db_name, upgrade_func, body_func) {
-  var delete_request = indexedDB.deleteDatabase(db_name);
-  delete_request.onerror = t.unreached_func('deleteDatabase should not fail');
-  delete_request.onsuccess = t.step_func(function(e) {
-    var open_request = indexedDB.open(db_name);
-    open_request.onupgradeneeded = t.step_func(function() {
-      upgrade_func(t, open_request.result, open_request);
-    });
-    open_request.onsuccess = t.step_func(function() {
-      body_func(t, open_request.result);
-    });
-  });
-}
-
-/**
- * Creates a barrier that one calls
- *
- * @param callback: function to be called after barrier is passed
- */
-function create_barrier(callback) {
-  var count = 0;
-  var called = false;
-  return function(t) {
-    assert_false(called, "Barrier already used.");
-    ++count;
-    return t.step_func(function() {
-      --count;
-      if (count === 0) {
-        assert_false(called, "Barrier already used.");
-        called = true;
-        callback();
-      }
-    });
-  }
-}
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-properties-values-api/registered-property-computation.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-properties-values-api/registered-property-computation.html
index 1651295..180cdf60 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/css-properties-values-api/registered-property-computation.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-properties-values-api/registered-property-computation.html
@@ -29,7 +29,7 @@
         // Because we want to include the parsing step, insert a stylesheet
         // node with textContent.
         let node = document.createElement('style');
-        node.textContent = `#${id} { ${name}: ${value}; }`;
+        node.textContent = `#${id} { ${name}:${value}; }`;
         document.body.append(node);
 
         try {
@@ -123,5 +123,29 @@
     test(function() {
         assert_computed_value('<integer>+', '15 calc(2.4) calc(2.6)', '15 2 3');
     }, "<integer>+ values are computed correctly for " + id);
+
+    test(function() {
+        assert_computed_value('<color>', '#ff0000', 'rgb(255, 0, 0)');
+        assert_computed_value('<color>', '#000f00', 'rgb(0, 15, 0)');
+        assert_computed_value('<color>', '#00000a', 'rgb(0, 0, 10)');
+        assert_computed_value('<color>', '#badbee', 'rgb(186, 219, 238)');
+        assert_computed_value('<color>', '#badbee33', 'rgba(186, 219, 238, 0.2)');
+        assert_computed_value('<color>', 'tomato', 'rgb(255, 99, 71)');
+        assert_computed_value('<color>', 'plum', 'rgb(221, 160, 221)');
+        assert_computed_value('<color>', 'currentcolor', 'currentcolor');
+    }, "<color> values are computed correctly for " + id);
+
+    test(function() {
+        assert_computed_value('*', 'tomato', 'tomato');
+        assert_computed_value('tomato | plum', 'plum', 'plum');
+        assert_computed_value('tomato | plum | <color>', 'plum', 'plum');
+    }, "ident values that look like color keywords are not converted to colors" + id);
+
+    test(function() {
+        assert_computed_value('*', '-50grad', '-50grad');
+        assert_computed_value('<angle>', '180deg', '180deg');
+        assert_computed_value('<angle>', '400grad', '360deg');
+        assert_computed_value('<angle>', 'calc(360deg + 400grad)', '720deg');
+    }, "<angle> values computed correctly for " + id);
 }
 </script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-properties-values-api/registered-property-cssom.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-properties-values-api/registered-property-cssom.html
index 019778e..59443b3 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/css-properties-values-api/registered-property-cssom.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-properties-values-api/registered-property-cssom.html
@@ -46,7 +46,7 @@
   assert_equals(inlineStyle.getPropertyValue('--length'), '5');
   assert_equals(inlineStyle.getPropertyValue('--color'), 'hello');
   assert_equals(computedStyle.getPropertyValue('--length'), '0px');
-  assert_equals(computedStyle.getPropertyValue('--color'), 'blue');
+  assert_equals(computedStyle.getPropertyValue('--color'), 'rgb(0, 0, 255)');
 }, "Formerly valid values are still readable from inline styles but are computed as the unset value");
 
 test(function() {
@@ -62,7 +62,7 @@
   assert_equals(inlineStyle.getPropertyValue('--length'), '');
   assert_equals(inlineStyle.getPropertyValue('--color'), '');
   assert_equals(computedStyle.getPropertyValue('--length'), '10px');
-  assert_equals(computedStyle.getPropertyValue('--color'), 'red');
+  assert_equals(computedStyle.getPropertyValue('--color'), 'rgb(255, 0, 0)');
 }, "Values can be removed from inline styles");
 
 test(function() {
@@ -80,9 +80,9 @@
   assert_equals(inlineStyle.getPropertyValue('--length'), '30px');
   assert_equals(inlineStyle.getPropertyValue('--color'), 'pink');
   assert_equals(computedStyle.getPropertyValue('--length'), '30px');
-  assert_equals(computedStyle.getPropertyValue('--color'), 'pink');
+  assert_equals(computedStyle.getPropertyValue('--color'), 'rgb(255, 192, 203)');
   inlineStyle.setProperty('--color', 'inherit');
   assert_equals(inlineStyle.getPropertyValue('--color'), 'inherit');
-  assert_equals(computedStyle.getPropertyValue('--color'), 'blue');
+  assert_equals(computedStyle.getPropertyValue('--color'), 'rgb(0, 0, 255)');
 }, "Valid values can be set on inline styles");
 </script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-properties-values-api/registered-property-initial.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-properties-values-api/registered-property-initial.html
index d655af66..24543d5 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/css-properties-values-api/registered-property-initial.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-properties-values-api/registered-property-initial.html
@@ -23,8 +23,8 @@
     computedStyle = getComputedStyle(target);
     assert_equals(computedStyle.getPropertyValue('--length'), '25px');
     assert_equals(computedStyle.getPropertyValue('--length-percentage'), 'calc(100px + 10%)');
-    assert_equals(computedStyle.getPropertyValue('--inherited-color'), 'pink');
-    assert_equals(computedStyle.getPropertyValue('--non-inherited-color'), 'purple');
+    assert_equals(computedStyle.getPropertyValue('--inherited-color'), 'rgb(255, 192, 203)');
+    assert_equals(computedStyle.getPropertyValue('--non-inherited-color'), 'rgb(128, 0, 128)');
     assert_equals(computedStyle.getPropertyValue('--transform-function'), 'rotate(42deg)');
     assert_equals(computedStyle.getPropertyValue('--single-transform-list'), 'scale(4)');
     assert_equals(computedStyle.getPropertyValue('--multiple-transform-list'), 'scale(3) translateX(4px)');
diff --git a/third_party/WebKit/LayoutTests/fast/borders/overflow-hidden-border-radius-force-backing-store-expected.txt b/third_party/WebKit/LayoutTests/fast/borders/overflow-hidden-border-radius-force-backing-store-expected.txt
index 475ca2d..c5c1822 100644
--- a/third_party/WebKit/LayoutTests/fast/borders/overflow-hidden-border-radius-force-backing-store-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/borders/overflow-hidden-border-radius-force-backing-store-expected.txt
@@ -23,6 +23,24 @@
       "bounds": [300, 300]
     },
     {
+      "name": "Child Containment Layer",
+      "position": [50, 50],
+      "bounds": [300, 300],
+      "drawsContent": false,
+      "maskLayer": [
+        {
+          "name": "Child Clipping Mask Layer",
+          "bounds": [300, 300]
+        }
+      ]
+    },
+    {
+      "name": "Ancestor Clipping Layer",
+      "position": [50, 50],
+      "bounds": [285, 300],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow DIV id='content'",
       "bounds": [285, 1000],
       "contentsOpaque": true,
@@ -37,7 +55,8 @@
         [0, 1, 0, 0],
         [0, 0, 1, 0],
         [50, 50, 0, 1]
-      ]
+      ],
+      "flattenInheritedTransform": false
     }
   ]
 }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/encoding/utf-16-big-endian-expected.png b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/encoding/utf-16-big-endian-expected.png
index 230f5c9b..701be09 100644
--- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/encoding/utf-16-big-endian-expected.png
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/encoding/utf-16-big-endian-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/encoding/utf-16-little-endian-expected.png b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/encoding/utf-16-little-endian-expected.png
index 230f5c9b..701be09 100644
--- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/encoding/utf-16-little-endian-expected.png
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/fast/encoding/utf-16-little-endian-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-custom-formatters-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-custom-formatters-expected.txt
index 7cf9becb..e214e20 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-custom-formatters-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-custom-formatters-expected.txt
@@ -4,6 +4,6 @@
 console-custom-formatters.js:121 Header formatted by 2 bBody formatted by 2 b
 console-custom-formatters.js:122 Header formatted by 1 cBody formatted by 1 c
 console-custom-formatters.js:123 Formatter with config Header info: additional infobodyinfo: additional info
-console-custom-formatters.js:124 Formatter with config Formatter with config Formatter with config Formatter with config Formatter with config Formatter with config Formatter with config Formatter with config Formatter with config Object
-Custom Formatter Failed: Too deep hierarchy of inlined custom previews undefined
+console-custom-formatters.js:124 Formatter with config Formatter with config Formatter with config Formatter with config Formatter with config Formatter with config Formatter with config Formatter with config Formatter with config Formatter with config Object
+Custom Formatter Failed: Uncaught Too deep hierarchy of inlined custom previews
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-dir-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-dir-expected.txt
index f9639b12..22b6e3d 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-dir-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-dir-expected.txt
@@ -10,8 +10,13 @@
     length: 1
     __proto__: NodeList
 console-dir.js:14 XPathResult
+    booleanValue: (...)
     invalidIteratorState: false
+    numberValue: (...)
     resultType: 4
+    singleNodeValue: (...)
+    snapshotLength: (...)
+    stringValue: (...)
     __proto__: XPathResult
 console-dir.js:24 Object
     "": ""
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-classes-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-classes-expected.txt
index d3257c5..86383e4 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-classes-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-classes-expected.txt
@@ -12,7 +12,7 @@
         object-value-error source-code
           devtools-link
           devtools-link
-console-format-classes.js:30 (6) [1, empty × 2, 2, (...), empty] 
+console-format-classes.js:30 (6) [1, empty × 2, 2, (...), (...)] 
   console-message
     source-code
       console-message-anchor
@@ -32,7 +32,7 @@
               object-value-undefined
               object-value-number
               object-value-accessor
-              object-value-undefined
+              object-value-accessor
             object-state-note info-note
               children
 console-format-classes.js:30 {a: 1} 
@@ -153,7 +153,7 @@
             object-state-note info-note
               children
 console-format-classes.js:34 (7) [Error: custom error with link www.chromium.org
-    at test://evaluations/0/console-format-classes.js…, Array(6), {…}, {…}, {…}, Proxy, HTMLAllCollection(4)] 
+    at test://evaluations/0/console-format-classes.j…, Array(6), {…}, {…}, {…}, Proxy, HTMLAllCollection(4)] 
   console-message
     source-code
       console-message-anchor
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-es6-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-es6-expected.txt
index a3cc0c1..d7a4d89 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-es6-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-es6-expected.txt
@@ -296,10 +296,10 @@
         length: 6
 console-format-es6.js:15 genFunction {<suspended>}
     __proto__: Generator
+    [[GeneratorLocation]]: console-format-es6.js:62
     [[GeneratorStatus]]: "suspended"
     [[GeneratorFunction]]: ƒ *()
     [[GeneratorReceiver]]: Window
-    [[GeneratorLocation]]: console-format-es6.js:62
     [[Scopes]]: Scopes[2]
 console-format-es6.js:16 [genFunction]
     0: genFunction {<suspended>}
@@ -308,9 +308,9 @@
 globals[15]
 genFunction {<suspended>}
     __proto__: Generator
+    [[GeneratorLocation]]: console-format-es6.js:62
     [[GeneratorStatus]]: "suspended"
     [[GeneratorFunction]]: ƒ *()
     [[GeneratorReceiver]]: Window
-    [[GeneratorLocation]]: console-format-es6.js:62
     [[Scopes]]: Scopes[2]
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-es6-symbols-error-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-es6-symbols-error-expected.txt
index a2d8d5f2..859e20f 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-es6-symbols-error-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-es6-symbols-error-expected.txt
@@ -1,4 +1,4 @@
 Tests that console properly displays information about ES6 Symbols.
 
-console-format-es6-symbols-error.js:16 Symbol
+console-format-es6-symbols-error.js:16 Symbol()
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-expected.txt
index 6d16679..b9017637 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-expected.txt
@@ -172,7 +172,7 @@
 globals[35]
 #text
 console-format.js:21 DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
-console-format.js:22 [DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of th…]
+console-format.js:22 [DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of t…]
 globals[36]
 DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
 console-format.js:21 Uint8Array [3]
@@ -617,7 +617,7 @@
 globals[35]
 #text
 console-format.js:21 DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
-console-format.js:22 [DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of th…]
+console-format.js:22 [DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of t…]
     0: DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
     length: 1
     __proto__: Array(0)
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-log-object-with-getter-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-log-object-with-getter-expected.txt
index 9b384cc..d844c47f 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-log-object-with-getter-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-log-object-with-getter-expected.txt
@@ -1,9 +1,9 @@
 Tests that console logging dumps object values defined by getters and allows to expand it.
 
 console-log-object-with-getter.js:30 {}
-console-log-object-with-getter.js:31 (2) [(...), empty]
+console-log-object-with-getter.js:31 (2) [(...), (...)]
 console-log-object-with-getter.js:32 {}
 console-log-object-with-getter.js:30 {}foo: Objectget foo: ƒ ()set bar: ƒ (x)__proto__: Object
-console-log-object-with-getter.js:31 (2) [(...), empty]0: 1length: 2get 0: ƒ ()set 1: ƒ (x)__proto__: Array(0)
-console-log-object-with-getter.js:32 {}error: [Exception: Error: myError]function: [Exception: ƒ ()]number: [Exception: 123]string: [Exception: "myString"]get error: ƒ error()get function: ƒ ()get number: ƒ number()get string: ƒ string()__proto__: Object
+console-log-object-with-getter.js:31 (2) [(...), (...)]0: 1length: 2get 0: ƒ ()set 1: ƒ (x)__proto__: Array(0)
+console-log-object-with-getter.js:32 {}error: [Exception: custom stack]function: [Exception: ƒ ()]number: [Exception: 123]string: [Exception: "myString"]get error: ƒ error()get function: ƒ ()get number: ƒ number()get string: ƒ string()__proto__: Object
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-tainted-globals-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-tainted-globals-expected.txt
index 74f58ad..86d8eae 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-tainted-globals-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-tainted-globals-expected.txt
@@ -19,21 +19,21 @@
 restoreError()
 {result: "PASS"}
 testOverriddenToString(function func() {}, true)
-ƒ #<Function>
+ƒ Function
 testOverriddenToString(function func() {}, false)
-ƒ #<Function>
+ƒ Function
 testOverriddenToString(new Function, true)
-ƒ #<Function>
+ƒ Function
 testOverriddenToString(new Function, false)
-ƒ #<Function>
+ƒ Function
 testOverriddenToString(/^regex$/, true)
-#<RegExp>
+/^regex$/
 testOverriddenToString(/^regex$/, false)
-#<RegExp>
+/^regex$/
 testOverriddenToString(new Date, true)
-#<Date>
+Date
 testOverriddenToString(new Date, false)
-#<Date>
+Date
 testOverriddenToString({}, true)
 {toString: ƒ, valueOf: ƒ}
 testOverriddenToString({}, false)
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/layers/layer-sticky-position-constraint-get-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/layers/layer-sticky-position-constraint-get-expected.txt
index 50428a0..953cdee5 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/layers/layer-sticky-position-constraint-get-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/layers/layer-sticky-position-constraint-get-expected.txt
@@ -1,4 +1,68 @@
 Tests sticky position constraints in Layers panel
 
 Sticky position constraint
+{
+    _containingBlockRect : {
+        height : 400
+        width : 100
+        x : 0
+        y : 0
+    }
+    _nearestLayerShiftingContainingBlock : null
+    _nearestLayerShiftingStickyBox : null
+    _stickyBoxRect : {
+        height : 50
+        width : 50
+        x : 0
+        y : 0
+    }
+}
+{
+    _containingBlockRect : {
+        height : 50
+        width : 50
+        x : 0
+        y : 0
+    }
+    _nearestLayerShiftingContainingBlock : <object>
+    _nearestLayerShiftingStickyBox : null
+    _stickyBoxRect : {
+        height : 25
+        width : 25
+        x : 0
+        y : 0
+    }
+}
+{
+    _containingBlockRect : {
+        height : 350
+        width : 100
+        x : 0
+        y : 0
+    }
+    _nearestLayerShiftingContainingBlock : null
+    _nearestLayerShiftingStickyBox : null
+    _stickyBoxRect : {
+        height : 0
+        width : 0
+        x : 0
+        y : 0
+    }
+}
+{
+    _containingBlockRect : {
+        height : 350
+        width : 100
+        x : 0
+        y : 0
+    }
+    _nearestLayerShiftingContainingBlock : null
+    _nearestLayerShiftingStickyBox : <object>
+    _stickyBoxRect : {
+        height : 0
+        width : 0
+        x : 0
+        y : 0
+    }
+}
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/runtime/runtime-getProperties-isOwnProperty-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/runtime/runtime-getProperties-isOwnProperty-expected.txt
index e18522f6..b6e2dcd 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/runtime/runtime-getProperties-isOwnProperty-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/runtime/runtime-getProperties-isOwnProperty-expected.txt
@@ -1,5 +1,5 @@
 Tests RemoteObject.getProperties.
 
 property.name=="testBar" isOwn=="true"
-property.name=="testFoo" isOwn=="undefined"
+property.name=="testFoo" isOwn=="false"
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/function-generator-details-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/function-generator-details-expected.txt
index fdb789a0..5c8f1d4 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/function-generator-details-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/function-generator-details-expected.txt
@@ -3,6 +3,9 @@
 
 Running: testIterNotStarted
 iterNotStarted: type = object, subtype = generator
+lineNumber = 17
+columnNumber = 19
+script is valid: yes
 [[GeneratorStatus]] = suspended
 [[GeneratorFunction]] = function* gen()
       {
@@ -11,13 +14,13 @@
           yield 3;
       }
 [[GeneratorReceiver]] = Window
-lineNumber = 17
-columnNumber = 19
-script is valid: yes
 [[Scopes]] = Scopes[2]
 
 Running: testIterSuspended
 iterSuspended: type = object, subtype = generator
+lineNumber = 19
+columnNumber = 10
+script is valid: yes
 [[GeneratorStatus]] = suspended
 [[GeneratorFunction]] = function* gen()
       {
@@ -26,13 +29,13 @@
           yield 3;
       }
 [[GeneratorReceiver]] = Window
-lineNumber = 19
-columnNumber = 10
-script is valid: yes
 [[Scopes]] = Scopes[2]
 
 Running: testIterClosed
 iterClosed: type = object, subtype = generator
+lineNumber = 17
+columnNumber = 19
+script is valid: yes
 [[GeneratorStatus]] = closed
 [[GeneratorFunction]] = function* gen()
       {
@@ -41,12 +44,12 @@
           yield 3;
       }
 [[GeneratorReceiver]] = Window
-lineNumber = 17
-columnNumber = 19
-script is valid: yes
 
 Running: testIterObjGenerator
 iterObjGenerator: type = object, subtype = generator
+lineNumber = 28
+columnNumber = 14
+script is valid: yes
 [[GeneratorStatus]] = suspended
 [[GeneratorFunction]] = function*()
           {
@@ -55,13 +58,13 @@
               yield 13;
           }
 [[GeneratorReceiver]] = Object
-lineNumber = 28
-columnNumber = 14
-script is valid: yes
 [[Scopes]] = Scopes[2]
 
 Running: testAnonymousGenIter
 anonymousGenIter: type = object, subtype = generator
+lineNumber = 42
+columnNumber = 10
+script is valid: yes
 [[GeneratorStatus]] = suspended
 [[GeneratorFunction]] = function*() {
           yield 21;
@@ -69,8 +72,5 @@
           yield 23;
       }
 [[GeneratorReceiver]] = Window
-lineNumber = 42
-columnNumber = 10
-script is valid: yes
 [[Scopes]] = Scopes[2]
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/startup/console/console-format-startup-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/startup/console/console-format-startup-expected.txt
index d760a150..b949d015 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/startup/console/console-format-startup-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/startup/console/console-format-startup-expected.txt
@@ -219,7 +219,7 @@
 globals[35]
 #text
 console-format-startup.html:7 DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
-console-format-startup.html:8 [DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of th…]
+console-format-startup.html:8 [DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of t…]
 globals[36]
 DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
 console-format-startup.html:7 Uint8Array [3]
@@ -852,7 +852,7 @@
 globals[35]
 #text
 console-format-startup.html:7 DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
-console-format-startup.html:8 [DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of th…]
+console-format-startup.html:8 [DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of t…]
     0: DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
     length: 1
     __proto__: Array(0)
@@ -1223,10 +1223,10 @@
         length: 6
 console-format-startup.html:7 genFunction {<suspended>}
     __proto__: Generator
+    [[GeneratorLocation]]: console-format-startup.html:128
     [[GeneratorStatus]]: "suspended"
     [[GeneratorFunction]]: ƒ *()
     [[GeneratorReceiver]]: Window
-    [[GeneratorLocation]]: console-format-startup.html:128
     [[Scopes]]: Scopes[2]
 console-format-startup.html:8 [genFunction]
     0: genFunction {<suspended>}
@@ -1235,9 +1235,9 @@
 globals[60]
 genFunction {<suspended>}
     __proto__: Generator
+    [[GeneratorLocation]]: console-format-startup.html:128
     [[GeneratorStatus]]: "suspended"
     [[GeneratorFunction]]: ƒ *()
     [[GeneratorReceiver]]: Window
-    [[GeneratorLocation]]: console-format-startup.html:128
     [[Scopes]]: Scopes[2]
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/workers-on-navigation.js b/third_party/WebKit/LayoutTests/http/tests/devtools/workers-on-navigation.js
index 465fe60d..9d7c721 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/workers-on-navigation.js
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/workers-on-navigation.js
@@ -11,6 +11,8 @@
 
   var workerTargetId;
   var navigated = false;
+  var workerAddedCallback;
+  var workerAddedPromise = new Promise(f => workerAddedCallback = f);
   var observer = {
     targetAdded(target) {
       if (!TestRunner.isDedicatedWorker(target))
@@ -19,6 +21,8 @@
       workerTargetId = target.id();
       if (navigated)
         TestRunner.completeTest();
+      else
+        workerAddedCallback();
     },
     targetRemoved(target) {
       if (!TestRunner.isDedicatedWorker(target))
@@ -33,7 +37,8 @@
   };
   SDK.targetManager.observeTargets(observer);
   await TestRunner.navigatePromise('resources/workers-on-navigation-resource.html');
-  await TestRunner.evaluateInPagePromise('startWorker()');
+  TestRunner.evaluateInPagePromise('startWorker()');
+  await workerAddedPromise;
   await TestRunner.reloadPagePromise();
   navigated = true;
   await TestRunner.evaluateInPagePromise('startWorker()');
diff --git a/third_party/WebKit/LayoutTests/http/tests/workers/taskqueue/resources/async_sum.js b/third_party/WebKit/LayoutTests/http/tests/workers/taskqueue/resources/async_sum.js
new file mode 100644
index 0000000..00a16fd3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/workers/taskqueue/resources/async_sum.js
@@ -0,0 +1,11 @@
+class Repeat {
+  async process(i) { return i; }
+}
+registerTask("repeat", Repeat);
+
+class Sum {
+  async process(i, j) {
+    return await Promise.resolve(i + j);
+  }
+}
+registerTask("sum", Sum);
diff --git a/third_party/WebKit/LayoutTests/http/tests/workers/taskqueue/taskWorklet_with_async_process.html b/third_party/WebKit/LayoutTests/http/tests/workers/taskqueue/taskWorklet_with_async_process.html
new file mode 100644
index 0000000..7b67dbbd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/workers/taskqueue/taskWorklet_with_async_process.html
@@ -0,0 +1,14 @@
+<body>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script>
+promise_test(async () => {
+  await taskWorklet.addModule("resources/async_sum.js");
+  const task = taskWorklet.postTask('repeat', 2);
+  const task2 = taskWorklet.postTask('repeat', 4);
+  const task3 = taskWorklet.postTask('sum', task, task2);
+  const result = await task3.result;
+  assert_equals(result, 6);
+});
+</script>
+</body>
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-dedicated-worker.js b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-dedicated-worker.js
index b1d1f64d..3839bdae 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-dedicated-worker.js
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-pause-dedicated-worker.js
@@ -8,28 +8,17 @@
   `);
   testRunner.log('Started worker');
 
-  var workerRequestId = 1;
-  function sendCommandToWorker(method, params) {
-    var message = {method, params, id: workerRequestId};
-    dp.Target.sendMessageToTarget({targetId: workerId, message: JSON.stringify(message)});
-    return workerRequestId++;
-  }
-
   dp.Target.setAutoAttach({autoAttach: true, waitForDebuggerOnStart: false});
 
-  var messageObject = await dp.Target.onceAttachedToTarget();
-  var workerId = messageObject.params.targetInfo.targetId;
+  let event = await dp.Target.onceAttachedToTarget();
+  const worker = new WorkerProtocol(dp, event.params.sessionId);
   testRunner.log('Worker created');
   testRunner.log('didConnectToWorker');
-  sendCommandToWorker('Debugger.enable', {});
-  sendCommandToWorker('Debugger.pause', {});
 
-  dp.Target.onReceivedMessageFromTarget(messageObject => {
-    var message = JSON.parse(messageObject.params.message);
-    if (message.method === 'Debugger.paused') {
-      testRunner.log('SUCCESS: Worker paused');
-      sendCommandToWorker('Debugger.disable', {});
-      testRunner.completeTest();
-    }
-  });
+  await worker.dp.Debugger.enable({});
+  worker.dp.Debugger.pause({});
+  await worker.dp.Debugger.oncePaused();
+  testRunner.log('SUCCESS: Worker paused');
+  await worker.dp.Debugger.disable({});
+  testRunner.completeTest();
 })
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-terminate-dedicated-worker-while-paused.js b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-terminate-dedicated-worker-while-paused.js
index 89bc1fd..fd189a2 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-terminate-dedicated-worker-while-paused.js
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-terminate-dedicated-worker-while-paused.js
@@ -9,29 +9,17 @@
   `);
   testRunner.log('Started worker');
 
-  var workerRequestId = 1;
-  function sendCommandToWorker(method, params) {
-    var message = {method, params, id: workerRequestId};
-    dp.Target.sendMessageToTarget({targetId: workerId, message: JSON.stringify(message)});
-    return workerRequestId++;
-  }
-
   dp.Target.setAutoAttach({autoAttach: true, waitForDebuggerOnStart: false});
 
-  var messageObject = await dp.Target.onceAttachedToTarget();
-  var workerId = messageObject.params.targetInfo.targetId;
+  let event = await dp.Target.onceAttachedToTarget();
+  const worker = new WorkerProtocol(dp, event.params.sessionId);
   testRunner.log('Worker created');
   testRunner.log('didConnectToWorker');
-  sendCommandToWorker('Debugger.enable', {});
-  sendCommandToWorker('Debugger.pause', {});
-
-  dp.Target.onReceivedMessageFromTarget(async messageObject => {
-    var message = JSON.parse(messageObject.params.message);
-    if (message.method === 'Debugger.paused') {
-      testRunner.log('Worker paused');
-      await dp.Runtime.evaluate({expression: 'worker.terminate()' });
-      testRunner.log('SUCCESS: Did terminate paused worker');
-      testRunner.completeTest();
-    }
-  });
+  await worker.dp.Debugger.enable({});
+  worker.dp.Debugger.pause({});
+  await worker.dp.Debugger.oncePaused();
+  testRunner.log('Worker paused');
+  await dp.Runtime.evaluate({expression: 'worker.terminate()' });
+  testRunner.log('SUCCESS: Did terminate paused worker');
+  testRunner.completeTest();
 })
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/layers/get-layers-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/layers/get-layers-expected.txt
index f7b73e2a..fa274cd 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/layers/get-layers-expected.txt
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/layers/get-layers-expected.txt
@@ -76,7 +76,21 @@
         "width": 100,
         "height": 50,
         "paintCount": "number",
-        "drawsContent": true
+        "drawsContent": true,
+        "stickyPositionConstraint": {
+            "stickyBoxRect": {
+                "x": 0,
+                "y": 0,
+                "width": 100,
+                "height": 50
+            },
+            "containingBlockRect": {
+                "x": 0,
+                "y": 0,
+                "width": 100,
+                "height": 200
+            }
+        }
     },
     {
         "layerId": "string",
@@ -87,7 +101,22 @@
         "width": 100,
         "height": 25,
         "paintCount": "number",
-        "drawsContent": true
+        "drawsContent": true,
+        "stickyPositionConstraint": {
+            "stickyBoxRect": {
+                "x": 0,
+                "y": 0,
+                "width": 100,
+                "height": 25
+            },
+            "containingBlockRect": {
+                "x": 0,
+                "y": 0,
+                "width": 100,
+                "height": 50
+            },
+            "nearestLayerShiftingContainingBlock": "string"
+        }
     },
     {
         "layerId": "string",
@@ -178,7 +207,21 @@
         "width": 100,
         "height": 50,
         "paintCount": "number",
-        "drawsContent": true
+        "drawsContent": true,
+        "stickyPositionConstraint": {
+            "stickyBoxRect": {
+                "x": 0,
+                "y": 0,
+                "width": 100,
+                "height": 50
+            },
+            "containingBlockRect": {
+                "x": 0,
+                "y": 0,
+                "width": 100,
+                "height": 200
+            }
+        }
     },
     {
         "layerId": "string",
@@ -189,7 +232,22 @@
         "width": 100,
         "height": 25,
         "paintCount": "number",
-        "drawsContent": true
+        "drawsContent": true,
+        "stickyPositionConstraint": {
+            "stickyBoxRect": {
+                "x": 0,
+                "y": 0,
+                "width": 100,
+                "height": 25
+            },
+            "containingBlockRect": {
+                "x": 0,
+                "y": 0,
+                "width": 100,
+                "height": 50
+            },
+            "nearestLayerShiftingContainingBlock": "string"
+        }
     },
     {
         "layerId": "string",
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/target/target-send-message-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/target/target-send-message-expected.txt
index 99adbc1..0f46d44 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/target/target-send-message-expected.txt
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/target/target-send-message-expected.txt
@@ -2,7 +2,7 @@
 JSON syntax error..
 {"error":{"code":-32700,"message":"Message must be a valid JSON"}}
 JSON with primitive value..
-{"error":{"code":-32600,"message":"Message must be an object"}}
+{"error":{"code":-32700,"message":"Message must be a valid JSON"}}
 JSON without method property..
 {"error":{"code":-32600,"message":"Message must have integer 'id' property"}}
 JSON without id property..
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/worker/exception-from-worker-contains-stack-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/worker/exception-from-worker-contains-stack-expected.txt
index bc385653..d2c264d 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/worker/exception-from-worker-contains-stack-expected.txt
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/worker/exception-from-worker-contains-stack-expected.txt
@@ -1,5 +1,7 @@
 Tests that console message from worker contains stack trace.
 Worker created
+Worker destroyed
+
 Worker created
 Message with stack trace received.
 
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/worker/exception-from-worker-contains-stack.js b/third_party/WebKit/LayoutTests/inspector-protocol/worker/exception-from-worker-contains-stack.js
index a9963ac0..c49b3f1c 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/worker/exception-from-worker-contains-stack.js
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/worker/exception-from-worker-contains-stack.js
@@ -1,51 +1,35 @@
 (async function(testRunner) {
   var {page, session, dp} = await testRunner.startBlank('Tests that console message from worker contains stack trace.');
 
-  var workerRequestId = 1;
-  function sendCommandToWorker(method, params, workerId) {
-    dp.Target.sendMessageToTarget({
-      targetId: workerId,
-      message: JSON.stringify({ method: method, params: params, id: workerRequestId++ })
-    });
-  }
-
-  var waitForWorkers = 2;
-  dp.Target.onAttachedToTarget(messageObject => {
-    var workerId = messageObject['params']['targetInfo']['targetId'];
-    testRunner.log('Worker created');
-    sendCommandToWorker('Runtime.enable', {}, workerId);
-    if (!--waitForWorkers)
-      session.evaluate('worker1.postMessage(239);worker2.postMessage(42);');
-  });
-
-  var workerTerminated = false;
-  var messageReceived = false;
-  dp.Target.onReceivedMessageFromTarget(messageObject => {
-    var message = JSON.parse(messageObject['params']['message']);
-    if (message['method'] === 'Runtime.exceptionThrown') {
-      var callFrames = message.params.exceptionDetails.stackTrace ? message.params.exceptionDetails.stackTrace.callFrames : [];
-      testRunner.log(callFrames.length > 0 ? 'Message with stack trace received.' : '[FAIL] Message contains empty stack trace');
-      messageReceived = true;
-      if (messageReceived && workerTerminated)
-        testRunner.completeTest();
-    }
-  });
-
-  function onDetached(messageObject) {
-    dp.Target.offDetachedFromTarget(onDetached);
-    workerTerminated = true;
-    if (messageReceived && workerTerminated)
-      testRunner.completeTest();
-  }
-  dp.Target.onDetachedFromTarget(onDetached);
-
   await dp.Target.setAutoAttach({autoAttach: true, waitForDebuggerOnStart: false});
+
   session.evaluate(`
     window.worker1 = new Worker('${testRunner.url('../resources/worker-with-throw.js')}');
     window.worker1.onerror = function(e) {
       e.preventDefault();
       worker1.terminate();
     }
+  `);
+  let event = await dp.Target.onceAttachedToTarget();
+  const worker1 = new WorkerProtocol(dp, event.params.sessionId);
+  testRunner.log('Worker created');
+  await worker1.dp.Runtime.enable({});
+  session.evaluate('worker1.postMessage(239);');
+  await dp.Target.onceDetachedFromTarget();
+  testRunner.log('Worker destroyed');
+
+  session.evaluate(`
     window.worker2 = new Worker('${testRunner.url('../resources/worker-with-throw.js')}');
   `);
+  event = await dp.Target.onceAttachedToTarget();
+  const worker2 = new WorkerProtocol(dp, event.params.sessionId);
+  testRunner.log('\nWorker created');
+  await worker2.dp.Runtime.enable({});
+
+  session.evaluate('worker2.postMessage(42);');
+  event = await worker2.dp.Runtime.onceExceptionThrown();
+  const callFrames = event.exceptionDetails.stackTrace ? event.exceptionDetails.stackTrace.callFrames : [];
+  testRunner.log(callFrames.length > 0 ? 'Message with stack trace received.' : '[FAIL] Message contains empty stack trace');
+
+  testRunner.completeTest();
 })
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/worker/worker-console-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/worker/worker-console-expected.txt
index 43aab3c2..5ef16bdc 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/worker/worker-console-expected.txt
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/worker/worker-console-expected.txt
@@ -11,8 +11,8 @@
 Sending Runtime.enable to worker
 Got console API call from worker: message1
 Logging in worker: message2
-Got log message from page: message2
 Got console API call from worker: message2
+Got log message from page: message2
 Logging in worker: throw1
 Got log message from page: Uncaught (in promise) throw1
 Stopping autoattach
@@ -23,12 +23,12 @@
 Starting worker
 Worker.created
 Logging in worker: message4
-Got log message from page: message4
 Sending Runtime.enable to worker
 Got console API call from worker: message4
+Got log message from page: message4
 Logging in worker: message5
-Got log message from page: message5
 Got console API call from worker: message5
+Got log message from page: message5
 Stopping worker
 Starting worker
 Worker.created
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/worker/worker-console.js b/third_party/WebKit/LayoutTests/inspector-protocol/worker/worker-console.js
index 4794d25..52da9db 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/worker/worker-console.js
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/worker/worker-console.js
@@ -40,10 +40,20 @@
   workerEventHandler['Runtime.consoleAPICalled'] = onConsoleAPICalledFromWorker;
 
   var workerId;
+  var workerCreateCallback;
 
   function onWorkerCreated(payload) {
     testRunner.log('Worker.created');
     workerId = payload.params.targetInfo.targetId;
+    if (workerCreateCallback) {
+      var tmp = workerCreateCallback;
+      workerCreateCallback = null;
+      tmp();
+    }
+  }
+
+  function waitForWorkerCreated(next) {
+    workerCreateCallback = next;
   }
 
   var requestId = 0;
@@ -80,13 +90,15 @@
     }
   }
 
+  var lastPageLog = '';
   function logInWorker(message, next) {
+    lastPageLog = '';
     testRunner.log('Logging in worker: ' + message);
     dp.Log.onEntryAdded(onLogEntry);
     session.evaluate('logInWorkerFromPage(\'' + message + '\')');
 
     function onLogEntry(payload) {
-      testRunner.log('Got log message from page: ' + payload.params.entry.text);
+      lastPageLog = payload.params.entry.text;
       dp.Log.offEntryAdded(onLogEntry);
       next();
     }
@@ -128,6 +140,7 @@
     },
 
     function stop0(next) {
+      testRunner.log('Got log message from page: ' + lastPageLog);
       testRunner.log('Stopping worker');
       session.evaluate('stopWorker()').then(next);
     },
@@ -142,8 +155,10 @@
     },
 
     function enable1(next) {
+      testRunner.log('Got log message from page: ' + lastPageLog);
       testRunner.log('Starting autoattach');
-      dp.Target.setAutoAttach({autoAttach: true, waitForDebuggerOnStart: false}).then(next);
+      dp.Target.setAutoAttach({autoAttach: true, waitForDebuggerOnStart: false});
+      waitForWorkerCreated(next);
     },
 
     function consoleEnable1(next) {
@@ -161,10 +176,12 @@
     },
 
     function throw1(next) {
+      testRunner.log('Got log message from page: ' + lastPageLog);
       logInWorker('throw1', next);
     },
 
     function disable1(next) {
+      testRunner.log('Got log message from page: ' + lastPageLog);
       testRunner.log('Stopping autoattach');
       dp.Target.setAutoAttach({autoAttach: false, waitForDebuggerOnStart: false}).then(next);
     },
@@ -174,6 +191,7 @@
     },
 
     function stop1(next) {
+      testRunner.log('Got log message from page: ' + lastPageLog);
       testRunner.log('Stopping worker');
       session.evaluate('stopWorker()').then(next);
     },
@@ -185,7 +203,8 @@
 
     function start2(next) {
       testRunner.log('Starting worker');
-      session.evaluateAsync('startWorker()').then(next);
+      session.evaluateAsync('startWorker()');
+      waitForWorkerCreated(next);
     },
 
     function log4(next) {
@@ -199,6 +218,7 @@
     },
 
     function log5(next) {
+      testRunner.log('Got log message from page: ' + lastPageLog);
       logInWorker('message5', next);
     },
 
@@ -207,13 +227,15 @@
     },
 
     function stop2(next) {
+      testRunner.log('Got log message from page: ' + lastPageLog);
       testRunner.log('Stopping worker');
       session.evaluate('stopWorker()').then(next);
     },
 
     function start3(next) {
       testRunner.log('Starting worker');
-      session.evaluateAsync('startWorker()').then(next);
+      session.evaluateAsync('startWorker()');
+      waitForWorkerCreated(next);
     },
 
     function log6(next) {
@@ -221,6 +243,7 @@
     },
 
     function stop3(next) {
+      testRunner.log('Got log message from page: ' + lastPageLog);
       testRunner.log('Stopping worker');
       session.evaluate('stopWorker()').then(next);
     },
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/clip/clip-path-constant-repaint-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/clip/clip-path-constant-repaint-expected.txt
index c4efafb..6409953 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/clip/clip-path-constant-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/clip/clip-path-constant-repaint-expected.txt
@@ -26,7 +26,13 @@
         {
           "name": "Mask Layer",
           "bounds": [800, 300],
-          "backfaceVisibility": "hidden"
+          "paintInvalidations": [
+            {
+              "object": "Mask Layer",
+              "rect": [0, 0, 800, 300],
+              "reason": "paint property change"
+            }
+          ]
         }
       ],
       "transform": 2
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/clipping-should-not-repaint-composited-descendants-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/clipping-should-not-repaint-composited-descendants-expected.txt
index 78d6b28..690d34d 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/clipping-should-not-repaint-composited-descendants-expected.txt
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/clipping-should-not-repaint-composited-descendants-expected.txt
@@ -24,6 +24,12 @@
       "transform": 1
     },
     {
+      "name": "Child Containment Layer",
+      "bounds": [100, 100],
+      "drawsContent": false,
+      "transform": 1
+    },
+    {
       "name": "LayoutBlockFlow DIV class='clipped-composited-child'",
       "bounds": [252, 252],
       "contentsOpaque": true,
@@ -37,6 +43,12 @@
       "transform": 3
     },
     {
+      "name": "Child Containment Layer",
+      "bounds": [100, 100],
+      "drawsContent": false,
+      "transform": 3
+    },
+    {
       "name": "LayoutBlockFlow DIV class='clipped-composited-child'",
       "bounds": [252, 252],
       "contentsOpaque": true,
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/overlap-test-with-filter-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/overlap-test-with-filter-expected.txt
index d4917843..06f94a7 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/overlap-test-with-filter-expected.txt
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/overlap-test-with-filter-expected.txt
@@ -27,6 +27,11 @@
       "backgroundColor": "#FFFF00"
     },
     {
+      "name": "Child Containment Layer",
+      "bounds": [300, 100],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow BODY",
       "bounds": [284, 84],
       "backgroundColor": "#FFFF00",
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/repaint-overflow-scrolled-squashed-content-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/repaint-overflow-scrolled-squashed-content-expected.txt
index 5986dc3..15fb475 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/repaint-overflow-scrolled-squashed-content-expected.txt
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/repaint-overflow-scrolled-squashed-content-expected.txt
@@ -18,7 +18,9 @@
       "backgroundColor": "#FFFFFF"
     },
     {
-      "name": "Squashing Containment Layer",
+      "name": "Ancestor Clipping Layer",
+      "position": [8, 8],
+      "bounds": [185, 185],
       "drawsContent": false
     },
     {
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/scrolling-neg-z-index-descendants-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/scrolling-neg-z-index-descendants-expected.txt
index 77025f8e2..e24b05c 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/scrolling-neg-z-index-descendants-expected.txt
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/scrolling-neg-z-index-descendants-expected.txt
@@ -25,8 +25,7 @@
     {
       "name": "LayoutBlockFlow (relative positioned) DIV id='neg-z'",
       "position": [9, -81],
-      "bounds": [100, 410],
-      "backfaceVisibility": "hidden"
+      "bounds": [100, 410]
     },
     {
       "name": "LayoutBlockFlow HTML (foreground) Layer",
@@ -49,7 +48,6 @@
       "position": [9, 9],
       "bounds": [100, 430],
       "drawsContent": false,
-      "backfaceVisibility": "hidden",
       "transform": 1
     },
     {
@@ -62,14 +60,12 @@
     {
       "name": "Horizontal Scrollbar Layer",
       "position": [9, 309],
-      "bounds": [100, 0],
-      "backfaceVisibility": "hidden"
+      "bounds": [100, 0]
     },
     {
       "name": "Vertical Scrollbar Layer",
       "position": [109, 9],
-      "bounds": [0, 300],
-      "backfaceVisibility": "hidden"
+      "bounds": [0, 300]
     }
   ],
   "transforms": [
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/should-not-repaint-composited-descendants-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/should-not-repaint-composited-descendants-expected.txt
index ec7710c..b479ab4 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/should-not-repaint-composited-descendants-expected.txt
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/should-not-repaint-composited-descendants-expected.txt
@@ -38,6 +38,12 @@
       ]
     },
     {
+      "name": "Child Containment Layer",
+      "position": [38, 38],
+      "bounds": [90, 90],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow DIV class='composited child'",
       "position": [8, 58],
       "bounds": [50, 50],
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/should-not-repaint-composited-descendants-on-overflow-change-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/should-not-repaint-composited-descendants-on-overflow-change-expected.txt
index 1e0b2bb..06aafe1 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/should-not-repaint-composited-descendants-on-overflow-change-expected.txt
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/should-not-repaint-composited-descendants-on-overflow-change-expected.txt
@@ -25,6 +25,12 @@
       "backgroundColor": "#008000"
     },
     {
+      "name": "Ancestor Clipping Layer",
+      "position": [0, 200],
+      "bounds": [200, 200],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow DIV class='composited-child'",
       "position": [0, 200],
       "bounds": [100, 100],
@@ -41,6 +47,12 @@
       "backgroundColor": "#008000"
     },
     {
+      "name": "Ancestor Clipping Layer",
+      "position": [0, 200],
+      "bounds": [200, 200],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow (relative positioned) DIV class='composited-child overflow-child'",
       "position": [150, 350],
       "bounds": [100, 100],
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/composited-iframe-scroll-repaint-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/composited-iframe-scroll-repaint-expected.txt
index 4e0f7c45..d7a9f930 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/composited-iframe-scroll-repaint-expected.txt
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/composited-iframe-scroll-repaint-expected.txt
@@ -18,6 +18,12 @@
       "backgroundColor": "#FFFFFF"
     },
     {
+      "name": "Ancestor Clipping Layer",
+      "position": [8, 8],
+      "bounds": [784, 159],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutIFrame IFRAME",
       "position": [8, 8],
       "bounds": [304, 154]
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/overflow-scroll-composited-non-stacking-child-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/overflow-scroll-composited-non-stacking-child-expected.txt
index bc911667..3b7ce4a 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/overflow-scroll-composited-non-stacking-child-expected.txt
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/overflow-scroll-composited-non-stacking-child-expected.txt
@@ -42,7 +42,9 @@
       "transform": 1
     },
     {
-      "name": "Squashing Containment Layer",
+      "name": "Ancestor Clipping Layer",
+      "position": [23, 65],
+      "bounds": [285, 175],
       "drawsContent": false
     },
     {
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/repaint-composited-child-in-scrolled-container-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/repaint-composited-child-in-scrolled-container-expected.txt
index 18abbef..04c2902 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/repaint-composited-child-in-scrolled-container-expected.txt
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/repaint-composited-child-in-scrolled-container-expected.txt
@@ -25,6 +25,12 @@
       ]
     },
     {
+      "name": "Ancestor Clipping Layer",
+      "position": [8, 8],
+      "bounds": [285, 285],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow (positioned) DIV id='container'",
       "bounds": [600, 600],
       "contentsOpaque": true,
@@ -47,7 +53,8 @@
         [0, 1, 0, 0],
         [0, 0, 1, 0],
         [-307, 8, 0, 1]
-      ]
+      ],
+      "flattenInheritedTransform": false
     }
   ]
 }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/direct-image-compositing-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/direct-image-compositing-expected.png
index dc93bab..9093d985 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/direct-image-compositing-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/direct-image-compositing-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/layer-due-to-layer-children-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/layer-due-to-layer-children-expected.png
index ed06fd1d..21bc51a 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/layer-due-to-layer-children-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/layer-due-to-layer-children-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/direct-image-mask-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/direct-image-mask-expected.png
index e7dcf18..187bc849 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/direct-image-mask-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/direct-image-mask-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/mask-with-added-filters-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/mask-with-added-filters-expected.png
index d065452..b55138b8 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/mask-with-added-filters-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/mask-with-added-filters-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/masked-ancestor-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/masked-ancestor-expected.png
index a204713..2893d5c6 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/masked-ancestor-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/masked-ancestor-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/multiple-masks-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/multiple-masks-expected.png
index 0989690..50633eba 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/multiple-masks-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/multiple-masks-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/simple-composited-mask-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/simple-composited-mask-expected.png
index 97c3286..a4ea481 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/simple-composited-mask-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/simple-composited-mask-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png b/third_party/WebKit/LayoutTests/platform/linux/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
index d26cca4b..2943e801 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-border-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-border-expected.png
index 10863d7..49fae8f 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-border-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-border-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-expected.png
index c0e8fd5e..9376445 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-with-mask-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-with-mask-expected.png
index 80ef073..c3208ee9 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-with-mask-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-with-mask-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-video-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-video-expected.png
index 7435b7ddc..77c6fea 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-video-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-video-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-video-ratio-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-video-ratio-expected.png
index b07697d1..cea0333 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-video-ratio-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-video-ratio-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-video-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-video-shadow-expected.png
index 7e26cf82..de945bf 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-video-shadow-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-video-shadow-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/clip/overflow-border-radius-composited-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/clip/overflow-border-radius-composited-expected.png
index 58a04a3..b5665790 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/clip/overflow-border-radius-composited-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/clip/overflow-border-radius-composited-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/clip/overflow-border-radius-composited-parent-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/clip/overflow-border-radius-composited-parent-expected.png
index 2f813ee3..fb94f6dc 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/clip/overflow-border-radius-composited-parent-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/clip/overflow-border-radius-composited-parent-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/multicol/composited-layer-nested-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/multicol/composited-layer-nested-expected.png
index d749b58..f7c58c98 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/multicol/composited-layer-nested-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/multicol/composited-layer-nested-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/multicol/vertical-rl/composited-relpos-overlapping-will-change-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/multicol/vertical-rl/composited-relpos-overlapping-will-change-expected.png
index ba0f2e7..d64e33c 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/multicol/vertical-rl/composited-relpos-overlapping-will-change-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/multicol/vertical-rl/composited-relpos-overlapping-will-change-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-controls-expected.png
index ab05c8d42..0d30c06 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-controls-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-controls-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-2-expected.png b/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-2-expected.png
index 3c54a70..c518ae06 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-2-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-2-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png b/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png
index f860aa5..24c0dd7d 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng_experimental/fast/multicol/composited-layer-nested-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng_experimental/fast/multicol/composited-layer-nested-expected.png
deleted file mode 100644
index d749b58..0000000
--- a/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng_experimental/fast/multicol/composited-layer-nested-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-zoom-controls-expected.png
index dd44abf7..6201165 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-zoom-controls-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-zoom-controls-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
new file mode 100644
index 0000000..a8fc463
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-zoom-controls-expected.png
index 37c42172..0462bbf 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-zoom-controls-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-zoom-controls-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/video-surface-layer/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/video-surface-layer/media/video-zoom-controls-expected.png
index 21dbf60..947ca89 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/video-surface-layer/media/video-zoom-controls-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/video-surface-layer/media/video-zoom-controls-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/direct-image-compositing-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/direct-image-compositing-expected.png
index 2f2f2de..3ee11d1 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/direct-image-compositing-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/direct-image-compositing-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.png
index 44b42c2..68159b57 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/fixed-position-transform-composited-page-scale-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/fixed-position-transform-composited-page-scale-expected.png
index ccae878..17adf89 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/fixed-position-transform-composited-page-scale-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/fixed-position-transform-composited-page-scale-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/layer-due-to-layer-children-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/layer-due-to-layer-children-expected.png
index 75ba10c..a5c28fd 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/layer-due-to-layer-children-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/layer-due-to-layer-children-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/lots-of-img-layers-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/lots-of-img-layers-expected.png
deleted file mode 100644
index 2500b2be9..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/lots-of-img-layers-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/lots-of-img-layers-with-opacity-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/lots-of-img-layers-with-opacity-expected.png
deleted file mode 100644
index 1f0067c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/lots-of-img-layers-with-opacity-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/direct-image-mask-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/direct-image-mask-expected.png
index 61fc6164..7bc2d6e 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/direct-image-mask-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/direct-image-mask-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/mask-with-added-filters-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/mask-with-added-filters-expected.png
index 598a80ea..98326956 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/mask-with-added-filters-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/mask-with-added-filters-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/masked-ancestor-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/masked-ancestor-expected.png
index 2b7ccd8..5981fad 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/masked-ancestor-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/masked-ancestor-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/multiple-masks-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/multiple-masks-expected.png
index 996a5560..2986d8da 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/multiple-masks-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/multiple-masks-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/simple-composited-mask-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/simple-composited-mask-expected.png
index dca2a9ff..5608556b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/simple-composited-mask-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/simple-composited-mask-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/squashing/no-squashing-into-another-clip-layer-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/squashing/no-squashing-into-another-clip-layer-expected.txt
index 30a315ac..1d92541 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/squashing/no-squashing-into-another-clip-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/squashing/no-squashing-into-another-clip-layer-expected.txt
@@ -25,6 +25,12 @@
       "transform": 1
     },
     {
+      "name": "Child Containment Layer",
+      "bounds": [784, 10],
+      "drawsContent": false,
+      "transform": 1
+    },
+    {
       "name": "LayoutBlockFlow DIV id='inner'",
       "bounds": [784, 10],
       "contentsOpaque": true,
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
index 45a4348d..31b168ae 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-border-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-border-expected.png
index f70b2e3..b26a4dc 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-border-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-border-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-expected.png
index 016142f3..3eb36267 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-with-mask-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-with-mask-expected.png
index a418ea8..e3c47f5 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-with-mask-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-with-mask-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-expected.png
index 03612a45..1532d51a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-ratio-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-ratio-expected.png
index a925361a..02bb72a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-ratio-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-ratio-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-shadow-expected.png
index 173da9ca..53dd23a9 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-shadow-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-shadow-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/clip/overflow-border-radius-composited-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/clip/overflow-border-radius-composited-expected.png
index 64eef08a..cfb8441b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/clip/overflow-border-radius-composited-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/clip/overflow-border-radius-composited-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/clip/overflow-border-radius-composited-parent-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/clip/overflow-border-radius-composited-parent-expected.png
index 3cb3285d..623125e 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/clip/overflow-border-radius-composited-parent-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/clip/overflow-border-radius-composited-parent-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/multicol/composited-layer-nested-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/multicol/composited-layer-nested-expected.png
index b6a4ea4..9d8a7df 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/multicol/composited-layer-nested-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/multicol/composited-layer-nested-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/multicol/vertical-rl/composited-relpos-overlapping-will-change-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/multicol/vertical-rl/composited-relpos-overlapping-will-change-expected.png
index c7f852d..cfa7310 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/multicol/vertical-rl/composited-relpos-overlapping-will-change-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/multicol/vertical-rl/composited-relpos-overlapping-will-change-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-controls-expected.png
index 4879cd5..65ca7c7e 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-controls-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-controls-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/composited-iframe-scroll-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/composited-iframe-scroll-repaint-expected.txt
new file mode 100644
index 0000000..dd9907a2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/composited-iframe-scroll-repaint-expected.txt
@@ -0,0 +1,96 @@
+{
+  "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"
+    },
+    {
+      "name": "Ancestor Clipping Layer",
+      "position": [8, 8],
+      "bounds": [784, 158],
+      "drawsContent": false
+    },
+    {
+      "name": "LayoutIFrame IFRAME",
+      "position": [8, 8],
+      "bounds": [304, 154]
+    },
+    {
+      "name": "LayoutView #document",
+      "position": [10, 10],
+      "bounds": [300, 150],
+      "drawsContent": false,
+      "backgroundColor": "#EEEEEE"
+    },
+    {
+      "name": "Scrolling Layer",
+      "position": [10, 10],
+      "bounds": [300, 150],
+      "drawsContent": false
+    },
+    {
+      "name": "Scrolling Contents Layer",
+      "position": [10, 10],
+      "bounds": [300, 516],
+      "backgroundColor": "#EEEEEE",
+      "transform": 1
+    },
+    {
+      "name": "LayoutBlockFlow BODY",
+      "bounds": [284, 500],
+      "transform": 2
+    },
+    {
+      "name": "Overflow Controls Host Layer",
+      "position": [10, 10],
+      "bounds": [300, 150],
+      "drawsContent": false
+    },
+    {
+      "name": "Horizontal Scrollbar Layer",
+      "position": [10, 160],
+      "bounds": [300, 0]
+    },
+    {
+      "name": "Vertical Scrollbar Layer",
+      "position": [310, 10],
+      "bounds": [0, 150]
+    }
+  ],
+  "transforms": [
+    {
+      "id": 1,
+      "transform": [
+        [1, 0, 0, 0],
+        [0, 1, 0, 0],
+        [0, 0, 1, 0],
+        [0, -20, 0, 1]
+      ],
+      "flattenInheritedTransform": false
+    },
+    {
+      "id": 2,
+      "parent": 1,
+      "transform": [
+        [1, 0, 0, 0],
+        [0, 1, 0, 0],
+        [0, 0, 1, 0],
+        [18, 18, 0, 1]
+      ]
+    }
+  ]
+}
+
diff --git a/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-2-expected.png b/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-2-expected.png
index 6573ddc..83143a4 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-2-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-2-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png b/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png
index e99e4f8..4fc50bb 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png b/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png
index 1070b547..e2cacb0 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/video-surface-layer/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/video-surface-layer/media/video-zoom-controls-expected.png
index ce6c90f5..058e324 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/virtual/video-surface-layer/media/video-zoom-controls-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/video-surface-layer/media/video-zoom-controls-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/direct-image-compositing-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/direct-image-compositing-expected.png
index 8707757..eda13ed5 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/direct-image-compositing-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/direct-image-compositing-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/layer-due-to-layer-children-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/layer-due-to-layer-children-expected.png
index b886cbf..4fa6e20 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/layer-due-to-layer-children-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/layer-due-to-layer-children-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/iframes/invisible-nested-iframe-show-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/iframes/invisible-nested-iframe-show-expected.txt
index 1dc93089..392b2cc1 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/iframes/invisible-nested-iframe-show-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/iframes/invisible-nested-iframe-show-expected.txt
@@ -51,6 +51,12 @@
       "backgroundColor": "#C0C0C0"
     },
     {
+      "name": "Child Containment Layer",
+      "position": [32, 32],
+      "bounds": [250, 170],
+      "drawsContent": false
+    },
+    {
       "name": "LayoutBlockFlow DIV id='iframe-content' class='box'",
       "bounds": [210, 210],
       "contentsOpaque": true,
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/lots-of-img-layers-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/lots-of-img-layers-expected.png
deleted file mode 100644
index 78867cc3..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/lots-of-img-layers-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/lots-of-img-layers-with-opacity-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/lots-of-img-layers-with-opacity-expected.png
deleted file mode 100644
index ab2f6f89..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/lots-of-img-layers-with-opacity-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/masks/direct-image-mask-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/masks/direct-image-mask-expected.png
index 2cc607b8..e6191de 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/masks/direct-image-mask-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/masks/direct-image-mask-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/masks/mask-with-added-filters-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/masks/mask-with-added-filters-expected.png
index 248084d10..1efe5f9 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/masks/mask-with-added-filters-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/masks/mask-with-added-filters-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/masks/masked-ancestor-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/masks/masked-ancestor-expected.png
index 9d839d7..053c3aa 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/masks/masked-ancestor-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/masks/masked-ancestor-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/masks/multiple-masks-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/masks/multiple-masks-expected.png
index d6f7bdb9..995ebc7 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/masks/multiple-masks-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/masks/multiple-masks-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/masks/simple-composited-mask-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/masks/simple-composited-mask-expected.png
index 321aff9..3a267bf6 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/masks/simple-composited-mask-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/masks/simple-composited-mask-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/squashing/no-squashing-into-another-clip-layer-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/squashing/no-squashing-into-another-clip-layer-expected.txt
index c0ba5fe..4a56b34 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/squashing/no-squashing-into-another-clip-layer-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/squashing/no-squashing-into-another-clip-layer-expected.txt
@@ -25,6 +25,12 @@
       "transform": 1
     },
     {
+      "name": "Child Containment Layer",
+      "bounds": [784, 10],
+      "drawsContent": false,
+      "transform": 1
+    },
+    {
       "name": "LayoutBlockFlow DIV id='inner'",
       "bounds": [784, 10],
       "contentsOpaque": true,
diff --git a/third_party/WebKit/LayoutTests/platform/win/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png b/third_party/WebKit/LayoutTests/platform/win/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
index 02c25703..85e81de 100644
--- a/third_party/WebKit/LayoutTests/platform/win/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-border-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-border-expected.png
index 99dd40a..24825e8 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-border-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-border-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-expected.png
index bda4600..3c8ae2a 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-with-mask-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-with-mask-expected.png
index 84d728a..9cdbb2f 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-with-mask-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-with-mask-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-video-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-video-expected.png
index 544a549..7377763 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-video-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-video-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-video-ratio-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-video-ratio-expected.png
index 2696097..ec815b20 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-video-ratio-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-video-ratio-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-video-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-video-shadow-expected.png
index c2818b3..8857bd2 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-video-shadow-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-video-shadow-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/clip/overflow-border-radius-composited-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/clip/overflow-border-radius-composited-expected.png
index 3b5df5c..dcf2f1a 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/clip/overflow-border-radius-composited-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/clip/overflow-border-radius-composited-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/clip/overflow-border-radius-composited-parent-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/clip/overflow-border-radius-composited-parent-expected.png
index 0e15586..b8f93907 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/clip/overflow-border-radius-composited-parent-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/clip/overflow-border-radius-composited-parent-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/multicol/composited-layer-nested-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/multicol/composited-layer-nested-expected.png
index 707199d4..e861f013 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/multicol/composited-layer-nested-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/multicol/composited-layer-nested-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/multicol/vertical-rl/composited-relpos-overlapping-will-change-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/multicol/vertical-rl/composited-relpos-overlapping-will-change-expected.png
index d895060e..03a08a20 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/multicol/vertical-rl/composited-relpos-overlapping-will-change-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/multicol/vertical-rl/composited-relpos-overlapping-will-change-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-controls-expected.png
index 5b2f304..f1043561d0 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-controls-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-controls-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-2-expected.png b/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-2-expected.png
index c97466a..a2a05813 100644
--- a/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-2-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-2-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png b/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png
index 7124a660..4043e9f 100644
--- a/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png b/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png
index c16e9c0..ae65002 100644
--- a/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/video-surface-layer/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/video-surface-layer/media/video-zoom-controls-expected.png
index a6077bb..b6d0785 100644
--- a/third_party/WebKit/LayoutTests/platform/win/virtual/video-surface-layer/media/video-zoom-controls-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/virtual/video-surface-layer/media/video-zoom-controls-expected.png
Binary files differ
diff --git a/third_party/blink/common/BUILD.gn b/third_party/blink/common/BUILD.gn
index fe85dfef..197432e 100644
--- a/third_party/blink/common/BUILD.gn
+++ b/third_party/blink/common/BUILD.gn
@@ -24,7 +24,6 @@
     "blob/blob_utils.cc",
     "cache_storage/cache_storage_utils.cc",
     "client_hints/client_hints.cc",
-    "common_export.h",
     "device_memory/approximated_device_memory.cc",
     "dom_storage/session_storage_namespace_id.cc",
     "download/download_stats.cc",
@@ -66,10 +65,6 @@
   public_deps = [
     "//third_party/blink/public/common:headers",
   ]
-  allow_circular_includes_from = [
-    # It's using common_export.h creating a circular dependency.
-    "//third_party/blink/public/common:headers",
-  ]
 
   deps = [
     "//base",
diff --git a/third_party/blink/common/feature_policy/feature_policy_mojom_traits.h b/third_party/blink/common/feature_policy/feature_policy_mojom_traits.h
index 92f8b40b..8f8bfb9 100644
--- a/third_party/blink/common/feature_policy/feature_policy_mojom_traits.h
+++ b/third_party/blink/common/feature_policy/feature_policy_mojom_traits.h
@@ -8,7 +8,7 @@
 #include <vector>
 
 #include "mojo/public/cpp/bindings/enum_traits.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 #include "third_party/blink/public/common/feature_policy/feature_policy.h"
 #include "third_party/blink/public/common/frame/sandbox_flags.h"
 #include "third_party/blink/public/mojom/feature_policy/feature_policy.mojom-shared.h"
diff --git a/third_party/blink/public/common/BUILD.gn b/third_party/blink/public/common/BUILD.gn
index bcb2eca8..256e4c16 100644
--- a/third_party/blink/public/common/BUILD.gn
+++ b/third_party/blink/public/common/BUILD.gn
@@ -38,6 +38,7 @@
     "blob/blob_utils.h",
     "cache_storage/cache_storage_utils.h",
     "client_hints/client_hints.h",
+    "common_export.h",
     "device_memory/approximated_device_memory.h",
     "dom_storage/session_storage_namespace_id.h",
     "download/download_stats.h",
@@ -112,6 +113,10 @@
   if (is_win) {
     sources += [ "dwrite_rasterizer_support/dwrite_rasterizer_support.h" ]
   }
+
+  # common_export.h is an implementation detail of component builds,
+  # not part of the public API.
+  public = sources - [ "common_export.h" ]
 }
 
 if (is_android) {
diff --git a/third_party/blink/public/common/DEPS b/third_party/blink/public/common/DEPS
index 5254372..c28e08f 100644
--- a/third_party/blink/public/common/DEPS
+++ b/third_party/blink/public/common/DEPS
@@ -15,8 +15,4 @@
     "+third_party/blink/public/mojom",
     "+ui/gfx/geometry",
     "+url",
-
-    # This file should not be included outside of blink, so it does not belong
-    # in blink/public.
-    "+third_party/blink/common/common_export.h",
 ]
diff --git a/third_party/blink/public/common/associated_interfaces/associated_interface_provider.h b/third_party/blink/public/common/associated_interfaces/associated_interface_provider.h
index 72eba5d..2606de7d 100644
--- a/third_party/blink/public/common/associated_interfaces/associated_interface_provider.h
+++ b/third_party/blink/public/common/associated_interfaces/associated_interface_provider.h
@@ -14,7 +14,7 @@
 #include "mojo/public/cpp/bindings/associated_interface_ptr.h"
 #include "mojo/public/cpp/bindings/associated_interface_request.h"
 #include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 #include "third_party/blink/public/mojom/associated_interfaces/associated_interfaces.mojom.h"
 
 namespace blink {
diff --git a/third_party/blink/public/common/associated_interfaces/associated_interface_registry.h b/third_party/blink/public/common/associated_interfaces/associated_interface_registry.h
index 590786f..4c526728 100644
--- a/third_party/blink/public/common/associated_interfaces/associated_interface_registry.h
+++ b/third_party/blink/public/common/associated_interfaces/associated_interface_registry.h
@@ -14,7 +14,7 @@
 #include "base/memory/weak_ptr.h"
 #include "mojo/public/cpp/bindings/associated_interface_request.h"
 #include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace blink {
 
diff --git a/third_party/blink/public/common/blob/blob_utils.h b/third_party/blink/public/common/blob/blob_utils.h
index 93b165c3..585d273 100644
--- a/third_party/blink/public/common/blob/blob_utils.h
+++ b/third_party/blink/public/common/blob/blob_utils.h
@@ -9,7 +9,7 @@
 #include <stdint.h>
 #include <limits>
 
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace blink {
 
diff --git a/third_party/blink/public/common/cache_storage/cache_storage_utils.h b/third_party/blink/public/common/cache_storage/cache_storage_utils.h
index c7234ba..561b386 100644
--- a/third_party/blink/public/common/cache_storage/cache_storage_utils.h
+++ b/third_party/blink/public/common/cache_storage/cache_storage_utils.h
@@ -5,7 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_CACHE_STORAGE_CACHE_STORAGE_UTILS_H_
 #define THIRD_PARTY_BLINK_PUBLIC_COMMON_CACHE_STORAGE_CACHE_STORAGE_UTILS_H_
 
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace blink {
 namespace cache_storage {
diff --git a/third_party/blink/public/common/client_hints/client_hints.h b/third_party/blink/public/common/client_hints/client_hints.h
index 6949e07..e3beead5a 100644
--- a/third_party/blink/public/common/client_hints/client_hints.h
+++ b/third_party/blink/public/common/client_hints/client_hints.h
@@ -7,7 +7,7 @@
 
 #include <stddef.h>
 
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace blink {
 
diff --git a/third_party/blink/common/common_export.h b/third_party/blink/public/common/common_export.h
similarity index 75%
rename from third_party/blink/common/common_export.h
rename to third_party/blink/public/common/common_export.h
index 9d6c0dd..e9891f8 100644
--- a/third_party/blink/common/common_export.h
+++ b/third_party/blink/public/common/common_export.h
@@ -2,9 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef THIRD_PARTY_BLINK_COMMON_COMMON_EXPORT_H_
-#define THIRD_PARTY_BLINK_COMMON_COMMON_EXPORT_H_
-//
+#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_COMMON_EXPORT_H_
+#define THIRD_PARTY_BLINK_PUBLIC_COMMON_COMMON_EXPORT_H_
+
+// This file is NOT to be included directly by code outside blink. It
+// is an implementation detail of component builds.
+
 #if defined(COMPONENT_BUILD)
 #if defined(WIN32)
 
@@ -31,4 +34,4 @@
 #define BLINK_COMMON_EXPORT_PRIVATE
 #endif
 
-#endif  // THIRD_PARTY_BLINK_COMMON_COMMON_EXPORT_H_
+#endif  // THIRD_PARTY_BLINK_PUBLIC_COMMON_COMMON_EXPORT_H_
diff --git a/third_party/blink/public/common/device_memory/approximated_device_memory.h b/third_party/blink/public/common/device_memory/approximated_device_memory.h
index 193e059cb..2f1c813 100644
--- a/third_party/blink/public/common/device_memory/approximated_device_memory.h
+++ b/third_party/blink/public/common/device_memory/approximated_device_memory.h
@@ -7,7 +7,7 @@
 
 #include <stdint.h>
 
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace blink {
 
diff --git a/third_party/blink/public/common/dom_storage/session_storage_namespace_id.h b/third_party/blink/public/common/dom_storage/session_storage_namespace_id.h
index 5ac7635..10ea660 100644
--- a/third_party/blink/public/common/dom_storage/session_storage_namespace_id.h
+++ b/third_party/blink/public/common/dom_storage/session_storage_namespace_id.h
@@ -7,7 +7,7 @@
 
 #include <string>
 
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace blink {
 
diff --git a/third_party/blink/public/common/download/download_stats.h b/third_party/blink/public/common/download/download_stats.h
index 49b1137..1c7ac6ec 100644
--- a/third_party/blink/public/common/download/download_stats.h
+++ b/third_party/blink/public/common/download/download_stats.h
@@ -6,7 +6,7 @@
 #define THIRD_PARTY_BLINK_PUBLIC_COMMON_DOWNLOAD_DOWNLOAD_STATS_H_
 
 #include "base/macros.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace blink {
 
diff --git a/third_party/blink/public/common/dwrite_rasterizer_support/dwrite_rasterizer_support.h b/third_party/blink/public/common/dwrite_rasterizer_support/dwrite_rasterizer_support.h
index c71262b2..55e138d 100644
--- a/third_party/blink/public/common/dwrite_rasterizer_support/dwrite_rasterizer_support.h
+++ b/third_party/blink/public/common/dwrite_rasterizer_support/dwrite_rasterizer_support.h
@@ -5,7 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_DWRITE_RASTERIZER_SUPPORT_DWRITE_RASTERIZER_SUPPORT_H_
 #define THIRD_PARTY_BLINK_PUBLIC_COMMON_DWRITE_RASTERIZER_SUPPORT_DWRITE_RASTERIZER_SUPPORT_H_
 
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace blink {
 
diff --git a/third_party/blink/public/common/experiments/memory_ablation_experiment.h b/third_party/blink/public/common/experiments/memory_ablation_experiment.h
index 2a973b8..0159ebd 100644
--- a/third_party/blink/public/common/experiments/memory_ablation_experiment.h
+++ b/third_party/blink/public/common/experiments/memory_ablation_experiment.h
@@ -9,7 +9,7 @@
 
 #include "base/feature_list.h"
 #include "base/memory/ref_counted.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace base {
 class SequencedTaskRunner;
diff --git a/third_party/blink/public/common/feature_policy/feature_policy.h b/third_party/blink/public/common/feature_policy/feature_policy.h
index 0df3efde..f90a7ab 100644
--- a/third_party/blink/public/common/feature_policy/feature_policy.h
+++ b/third_party/blink/public/common/feature_policy/feature_policy.h
@@ -11,7 +11,7 @@
 
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 #include "third_party/blink/public/mojom/feature_policy/feature_policy.mojom.h"
 #include "url/origin.h"
 
diff --git a/third_party/blink/public/common/features.h b/third_party/blink/public/common/features.h
index f5712d6..5b99a2d 100644
--- a/third_party/blink/public/common/features.h
+++ b/third_party/blink/public/common/features.h
@@ -6,7 +6,7 @@
 #define THIRD_PARTY_BLINK_PUBLIC_COMMON_FEATURES_H_
 
 #include "base/feature_list.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace blink {
 namespace features {
diff --git a/third_party/blink/public/common/font_unique_name_lookup/font_table_matcher.h b/third_party/blink/public/common/font_unique_name_lookup/font_table_matcher.h
index 290f6c0..b29a0867 100644
--- a/third_party/blink/public/common/font_unique_name_lookup/font_table_matcher.h
+++ b/third_party/blink/public/common/font_unique_name_lookup/font_table_matcher.h
@@ -6,7 +6,7 @@
 #define THIRD_PARTY_BLINK_PUBLIC_COMMON_FONT_UNIQUE_NAME_LOOKUP_FONT_TABLE_MATCHER_H_
 
 #include "base/memory/read_only_shared_memory_region.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 #include "third_party/blink/public/common/font_unique_name_lookup/font_unique_name_table.pb.h"
 
 #include <stddef.h>
diff --git a/third_party/blink/public/common/font_unique_name_lookup/icu_fold_case_util.h b/third_party/blink/public/common/font_unique_name_lookup/icu_fold_case_util.h
index 86c94389..0ea2aa0f 100644
--- a/third_party/blink/public/common/font_unique_name_lookup/icu_fold_case_util.h
+++ b/third_party/blink/public/common/font_unique_name_lookup/icu_fold_case_util.h
@@ -6,7 +6,7 @@
 #define THIRD_PARTY_BLINK_PUBLIC_COMMON_FONT_UNIQUE_NAME_LOOKUP_ICU_FOLD_CASE_UTIL_H_
 
 #include <string>
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace blink {
 
diff --git a/third_party/blink/public/common/frame/frame_owner_element_type.h b/third_party/blink/public/common/frame/frame_owner_element_type.h
index bea646a..d0cbf3c6 100644
--- a/third_party/blink/public/common/frame/frame_owner_element_type.h
+++ b/third_party/blink/public/common/frame/frame_owner_element_type.h
@@ -5,7 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_FRAME_FRAME_OWNER_ELEMENT_TYPE_H_
 #define THIRD_PARTY_BLINK_PUBLIC_COMMON_FRAME_FRAME_OWNER_ELEMENT_TYPE_H_
 
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace blink {
 
diff --git a/third_party/blink/public/common/frame/user_activation_state.h b/third_party/blink/public/common/frame/user_activation_state.h
index 9cd138b..6d0558e1 100644
--- a/third_party/blink/public/common/frame/user_activation_state.h
+++ b/third_party/blink/public/common/frame/user_activation_state.h
@@ -6,7 +6,7 @@
 #define THIRD_PARTY_BLINK_PUBLIC_COMMON_FRAME_USER_ACTIVATION_STATE_H_
 
 #include "base/time/time_override.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace blink {
 
diff --git a/third_party/blink/public/common/indexeddb/indexeddb_key.h b/third_party/blink/public/common/indexeddb/indexeddb_key.h
index 78e891e3..68672c92 100644
--- a/third_party/blink/public/common/indexeddb/indexeddb_key.h
+++ b/third_party/blink/public/common/indexeddb/indexeddb_key.h
@@ -12,7 +12,7 @@
 
 #include "base/logging.h"
 #include "base/strings/string16.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 #include "third_party/blink/public/common/indexeddb/web_idb_types.h"
 
 namespace blink {
diff --git a/third_party/blink/public/common/indexeddb/indexeddb_key_path.h b/third_party/blink/public/common/indexeddb/indexeddb_key_path.h
index cce15fd..e007115 100644
--- a/third_party/blink/public/common/indexeddb/indexeddb_key_path.h
+++ b/third_party/blink/public/common/indexeddb/indexeddb_key_path.h
@@ -10,7 +10,7 @@
 
 #include "base/logging.h"
 #include "base/strings/string16.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 #include "third_party/blink/public/common/indexeddb/web_idb_types.h"
 
 namespace blink {
diff --git a/third_party/blink/public/common/indexeddb/indexeddb_key_range.h b/third_party/blink/public/common/indexeddb/indexeddb_key_range.h
index e78f733..4af170f 100644
--- a/third_party/blink/public/common/indexeddb/indexeddb_key_range.h
+++ b/third_party/blink/public/common/indexeddb/indexeddb_key_range.h
@@ -5,7 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_INDEXEDDB_INDEXEDDB_KEY_RANGE_H_
 #define THIRD_PARTY_BLINK_PUBLIC_COMMON_INDEXEDDB_INDEXEDDB_KEY_RANGE_H_
 
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 #include "third_party/blink/public/common/indexeddb/indexeddb_key.h"
 
 namespace blink {
diff --git a/third_party/blink/public/common/indexeddb/indexeddb_metadata.h b/third_party/blink/public/common/indexeddb/indexeddb_metadata.h
index c4aa60771..3abdadf4 100644
--- a/third_party/blink/public/common/indexeddb/indexeddb_metadata.h
+++ b/third_party/blink/public/common/indexeddb/indexeddb_metadata.h
@@ -11,7 +11,7 @@
 #include <string>
 
 #include "base/strings/string16.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 #include "third_party/blink/public/common/indexeddb/indexeddb_key_path.h"
 
 namespace blink {
diff --git a/third_party/blink/public/common/indexeddb/indexeddb_mojom_traits.h b/third_party/blink/public/common/indexeddb/indexeddb_mojom_traits.h
index aaf49b2..583b2bae 100644
--- a/third_party/blink/public/common/indexeddb/indexeddb_mojom_traits.h
+++ b/third_party/blink/public/common/indexeddb/indexeddb_mojom_traits.h
@@ -6,7 +6,7 @@
 #define THIRD_PARTY_BLINK_PUBLIC_COMMON_INDEXEDDB_INDEXEDDB_MOJOM_TRAITS_H_
 
 #include "base/containers/span.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 #include "third_party/blink/public/common/indexeddb/indexeddb_key.h"
 #include "third_party/blink/public/mojom/indexeddb/indexeddb.mojom.h"
 
diff --git a/third_party/blink/public/common/manifest/manifest.h b/third_party/blink/public/common/manifest/manifest.h
index 079a81d..60987e4 100644
--- a/third_party/blink/public/common/manifest/manifest.h
+++ b/third_party/blink/public/common/manifest/manifest.h
@@ -13,7 +13,7 @@
 #include "base/optional.h"
 #include "base/strings/nullable_string16.h"
 #include "base/strings/string16.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 #include "third_party/blink/public/common/manifest/web_display_mode.h"
 #include "third_party/blink/public/common/screen_orientation/web_screen_orientation_lock_type.h"
 #include "third_party/skia/include/core/SkColor.h"
diff --git a/third_party/blink/public/common/manifest/manifest.typemap b/third_party/blink/public/common/manifest/manifest.typemap
index e23fd69b..3fffe79 100644
--- a/third_party/blink/public/common/manifest/manifest.typemap
+++ b/third_party/blink/public/common/manifest/manifest.typemap
@@ -5,7 +5,7 @@
 mojom = "//third_party/blink/public/mojom/manifest/manifest.mojom"
 public_headers = [
   "//third_party/blink/public/common/manifest/manifest.h",
-  "//third_party/blink/common/common_export.h",
+  "//third_party/blink/public/common/common_export.h",
 ]
 traits_headers =
     [ "//third_party/blink/public/common/manifest/manifest_mojom_traits.h" ]
diff --git a/third_party/blink/public/common/manifest/manifest_mojom_traits.h b/third_party/blink/public/common/manifest/manifest_mojom_traits.h
index dce5831..5676b62f 100644
--- a/third_party/blink/public/common/manifest/manifest_mojom_traits.h
+++ b/third_party/blink/public/common/manifest/manifest_mojom_traits.h
@@ -8,7 +8,7 @@
 #include "third_party/blink/public/common/manifest/manifest.h"
 
 #include "mojo/public/cpp/bindings/struct_traits.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 #include "third_party/blink/public/mojom/manifest/manifest.mojom.h"
 
 namespace mojo {
diff --git a/third_party/blink/public/common/messaging/cloneable_message.h b/third_party/blink/public/common/messaging/cloneable_message.h
index 81f93d30..c1bac3ba 100644
--- a/third_party/blink/public/common/messaging/cloneable_message.h
+++ b/third_party/blink/public/common/messaging/cloneable_message.h
@@ -12,7 +12,7 @@
 #include "base/optional.h"
 #include "base/unguessable_token.h"
 #include "mojo/public/cpp/bindings/struct_ptr.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 #include "third_party/blink/public/mojom/blob/serialized_blob.mojom.h"
 
 namespace blink {
diff --git a/third_party/blink/public/common/messaging/message_port_channel.h b/third_party/blink/public/common/messaging/message_port_channel.h
index 4a09ab3f..de0900f 100644
--- a/third_party/blink/public/common/messaging/message_port_channel.h
+++ b/third_party/blink/public/common/messaging/message_port_channel.h
@@ -11,7 +11,7 @@
 #include "base/memory/ref_counted.h"
 #include "base/synchronization/lock.h"
 #include "mojo/public/cpp/system/message_pipe.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace blink {
 
diff --git a/third_party/blink/public/common/messaging/string_message_codec.h b/third_party/blink/public/common/messaging/string_message_codec.h
index b052d5e8..c340123 100644
--- a/third_party/blink/public/common/messaging/string_message_codec.h
+++ b/third_party/blink/public/common/messaging/string_message_codec.h
@@ -7,7 +7,7 @@
 
 #include <vector>
 #include "base/strings/string16.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace blink {
 
diff --git a/third_party/blink/public/common/messaging/transferable_message.h b/third_party/blink/public/common/messaging/transferable_message.h
index 6b61c13..78a3e2bb 100644
--- a/third_party/blink/public/common/messaging/transferable_message.h
+++ b/third_party/blink/public/common/messaging/transferable_message.h
@@ -9,7 +9,7 @@
 
 #include "base/containers/span.h"
 #include "base/macros.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 #include "third_party/blink/public/common/messaging/cloneable_message.h"
 #include "third_party/blink/public/common/messaging/message_port_channel.h"
 #include "third_party/blink/public/mojom/array_buffer/array_buffer_contents.mojom.h"
diff --git a/third_party/blink/public/common/mime_util/mime_util.h b/third_party/blink/public/common/mime_util/mime_util.h
index c8bbca6..814f5c4 100644
--- a/third_party/blink/public/common/mime_util/mime_util.h
+++ b/third_party/blink/public/common/mime_util/mime_util.h
@@ -6,7 +6,7 @@
 #define THIRD_PARTY_BLINK_PUBLIC_COMMON_MIME_UTIL_MIME_UTIL_H_
 
 #include <string>
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace blink {
 
diff --git a/third_party/blink/public/common/notifications/notification_resources.h b/third_party/blink/public/common/notifications/notification_resources.h
index 6f6b71b..3494f5c4 100644
--- a/third_party/blink/public/common/notifications/notification_resources.h
+++ b/third_party/blink/public/common/notifications/notification_resources.h
@@ -7,7 +7,7 @@
 
 #include <vector>
 
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 
 namespace blink {
diff --git a/third_party/blink/public/common/notifications/notification_struct_traits.h b/third_party/blink/public/common/notifications/notification_struct_traits.h
index d642c87a..142e67c 100644
--- a/third_party/blink/public/common/notifications/notification_struct_traits.h
+++ b/third_party/blink/public/common/notifications/notification_struct_traits.h
@@ -10,7 +10,7 @@
 #include "mojo/public/cpp/base/string16_mojom_traits.h"
 #include "mojo/public/cpp/bindings/struct_traits.h"
 #include "skia/public/interfaces/bitmap_skbitmap_struct_traits.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 #include "third_party/blink/public/common/notifications/platform_notification_data.h"
 #include "third_party/blink/public/mojom/notifications/notification.mojom.h"
 #include "url/gurl.h"
diff --git a/third_party/blink/public/common/notifications/platform_notification_data.h b/third_party/blink/public/common/notifications/platform_notification_data.h
index c6131b2..06727e6 100644
--- a/third_party/blink/public/common/notifications/platform_notification_data.h
+++ b/third_party/blink/public/common/notifications/platform_notification_data.h
@@ -11,7 +11,7 @@
 #include "base/strings/nullable_string16.h"
 #include "base/strings/string16.h"
 #include "base/time/time.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 #include "url/gurl.h"
 
 namespace blink {
diff --git a/third_party/blink/public/common/origin_policy/origin_policy.h b/third_party/blink/public/common/origin_policy/origin_policy.h
index 48c39f4..c86631c 100644
--- a/third_party/blink/public/common/origin_policy/origin_policy.h
+++ b/third_party/blink/public/common/origin_policy/origin_policy.h
@@ -9,7 +9,7 @@
 #include <string>
 
 #include "base/strings/string_piece.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace blink {
 
diff --git a/third_party/blink/public/common/origin_trials/trial_token.h b/third_party/blink/public/common/origin_trials/trial_token.h
index 154e56d..68d6546 100644
--- a/third_party/blink/public/common/origin_trials/trial_token.h
+++ b/third_party/blink/public/common/origin_trials/trial_token.h
@@ -10,7 +10,7 @@
 
 #include "base/strings/string_piece.h"
 #include "base/time/time.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 #include "url/origin.h"
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);
diff --git a/third_party/blink/public/common/origin_trials/trial_token_validator.h b/third_party/blink/public/common/origin_trials/trial_token_validator.h
index 6a7b164..188ce4de 100644
--- a/third_party/blink/public/common/origin_trials/trial_token_validator.h
+++ b/third_party/blink/public/common/origin_trials/trial_token_validator.h
@@ -12,7 +12,7 @@
 #include "base/callback.h"
 #include "base/strings/string_piece.h"
 #include "base/time/time.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 #include "url/origin.h"
 
 namespace net {
diff --git a/third_party/blink/public/common/page/launching_process_state.h b/third_party/blink/public/common/page/launching_process_state.h
index 52e46cc0..0b07d18 100644
--- a/third_party/blink/public/common/page/launching_process_state.h
+++ b/third_party/blink/public/common/page/launching_process_state.h
@@ -6,7 +6,7 @@
 #define THIRD_PARTY_BLINK_PUBLIC_COMMON_PAGE_LAUNCHING_PROCESS_STATE_H_
 
 #include "build/build_config.h"
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace blink {
 
diff --git a/third_party/blink/public/common/privacy_preferences.h b/third_party/blink/public/common/privacy_preferences.h
index 15df81e..efcadde 100644
--- a/third_party/blink/public/common/privacy_preferences.h
+++ b/third_party/blink/public/common/privacy_preferences.h
@@ -5,7 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_PRIVACY_PREFERENCES_H_
 #define THIRD_PARTY_BLINK_PUBLIC_COMMON_PRIVACY_PREFERENCES_H_
 
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace blink {
 
diff --git a/third_party/blink/public/common/service_worker/service_worker_status_code.h b/third_party/blink/public/common/service_worker/service_worker_status_code.h
index 31baf1c..0414313 100644
--- a/third_party/blink/public/common/service_worker/service_worker_status_code.h
+++ b/third_party/blink/public/common/service_worker/service_worker_status_code.h
@@ -5,7 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_SERVICE_WORKER_SERVICE_WORKER_STATUS_CODE_H_
 #define THIRD_PARTY_BLINK_PUBLIC_COMMON_SERVICE_WORKER_SERVICE_WORKER_STATUS_CODE_H_
 
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace blink {
 
diff --git a/third_party/blink/public/common/service_worker/service_worker_type_converters.h b/third_party/blink/public/common/service_worker/service_worker_type_converters.h
index cb3f431..a316bdd 100644
--- a/third_party/blink/public/common/service_worker/service_worker_type_converters.h
+++ b/third_party/blink/public/common/service_worker/service_worker_type_converters.h
@@ -5,7 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPE_CONVERTERS_H_
 #define THIRD_PARTY_BLINK_PUBLIC_COMMON_SERVICE_WORKER_SERVICE_WORKER_TYPE_CONVERTERS_H_
 
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 #include "third_party/blink/public/common/service_worker/service_worker_status_code.h"
 #include "third_party/blink/public/mojom/service_worker/service_worker_event_status.mojom.h"
 
diff --git a/third_party/blink/public/common/service_worker/service_worker_utils.h b/third_party/blink/public/common/service_worker/service_worker_utils.h
index 2acc433..00e5cc1a 100644
--- a/third_party/blink/public/common/service_worker/service_worker_utils.h
+++ b/third_party/blink/public/common/service_worker/service_worker_utils.h
@@ -5,7 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_SERVICE_WORKER_SERVICE_WORKER_UTILS_H_
 #define THIRD_PARTY_BLINK_PUBLIC_COMMON_SERVICE_WORKER_SERVICE_WORKER_UTILS_H_
 
-#include "third_party/blink/common/common_export.h"
+#include "third_party/blink/public/common/common_export.h"
 
 namespace blink {
 
diff --git a/third_party/blink/public/mojom/BUILD.gn b/third_party/blink/public/mojom/BUILD.gn
index f61abec7..83d6e66 100644
--- a/third_party/blink/public/mojom/BUILD.gn
+++ b/third_party/blink/public/mojom/BUILD.gn
@@ -85,7 +85,7 @@
 
   export_class_attribute = "BLINK_COMMON_EXPORT"
   export_define = "BLINK_COMMON_IMPLEMENTATION=1"
-  export_header = "third_party/blink/common/common_export.h"
+  export_header = "third_party/blink/public/common/common_export.h"
 
   export_class_attribute_blink = "PLATFORM_EXPORT"
   export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
@@ -105,7 +105,7 @@
 
   export_class_attribute = "BLINK_COMMON_EXPORT"
   export_define = "BLINK_COMMON_IMPLEMENTATION=1"
-  export_header = "third_party/blink/common/common_export.h"
+  export_header = "third_party/blink/public/common/common_export.h"
 
   export_class_attribute_blink = "PLATFORM_EXPORT"
   export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
@@ -153,7 +153,7 @@
 
   export_class_attribute = "BLINK_COMMON_EXPORT"
   export_define = "BLINK_COMMON_IMPLEMENTATION=1"
-  export_header = "third_party/blink/common/common_export.h"
+  export_header = "third_party/blink/public/common/common_export.h"
 
   export_class_attribute_blink = "CORE_EXPORT"
   export_define_blink = "BLINK_CORE_IMPLEMENTATION=1"
@@ -188,7 +188,7 @@
 
   export_class_attribute = "BLINK_COMMON_EXPORT"
   export_define = "BLINK_COMMON_IMPLEMENTATION=1"
-  export_header = "third_party/blink/common/common_export.h"
+  export_header = "third_party/blink/public/common/common_export.h"
 
   export_class_attribute_blink = "MODULES_EXPORT"
   export_define_blink = "BLINK_MODULES_IMPLEMENTATION=1"
diff --git a/third_party/blink/public/mojom/usb/BUILD.gn b/third_party/blink/public/mojom/usb/BUILD.gn
index 0e8769d..cfa109c 100644
--- a/third_party/blink/public/mojom/usb/BUILD.gn
+++ b/third_party/blink/public/mojom/usb/BUILD.gn
@@ -28,7 +28,7 @@
 
   export_class_attribute = "BLINK_COMMON_EXPORT"
   export_define = "BLINK_COMMON_IMPLEMENTATION=1"
-  export_header = "third_party/blink/common/common_export.h"
+  export_header = "third_party/blink/public/common/common_export.h"
 
   export_class_attribute_blink = "PLATFORM_EXPORT"
   export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
diff --git a/third_party/blink/public/web/devtools_agent.mojom b/third_party/blink/public/web/devtools_agent.mojom
index 06a578d..b866ac2f 100644
--- a/third_party/blink/public/web/devtools_agent.mojom
+++ b/third_party/blink/public/web/devtools_agent.mojom
@@ -5,7 +5,9 @@
 module blink.mojom;
 
 import "mojo/public/mojom/base/big_string.mojom";
+import "mojo/public/mojom/base/unguessable_token.mojom";
 import "ui/gfx/geometry/mojo/geometry.mojom";
+import "url/mojom/url.mojom";
 
 // Debugging interactions are defined in Remote Debugging Protocol.
 // See https://chromedevtools.github.io/devtools-protocol/ for more
@@ -74,11 +76,28 @@
   // by itself, and has no effect unless a debugging session is
   // or will be attached.
   InspectElement(gfx.mojom.Point point);
+
+  // Instructs agent to start/stop reporting child workers to the host.
+  // |wait_for_debugger| controls whether the worker should be paused
+  // on start waiting for debugger to connect.
+  // See ChildWorkerCreated in DevToolsAgentHost for details.
+  ReportChildWorkers(bool report, bool wait_for_debugger);
 };
 
-// This interface is implemented in browser.
-// TODO(dgozman): add methods.
+// This interface is implemented in browser and is notified by DevToolsAgent
+// when new child worker is available for future debugging.
 interface DevToolsAgentHost {
+  // Informs the host about new child worker and gives its DevToolsAgent
+  // for debugging.
+  // |devtools_worker_token| is a unique token identifying this worker.
+  // |waiting_for_debugger| is true if worker was paused on startup and
+  // should be resumed by debugger to actually start.
+  ChildWorkerCreated(
+      DevToolsAgent worker_devtools_agent,
+      DevToolsAgentHost& worker_devtools_agent_host,
+      url.mojom.Url url,
+      mojo_base.mojom.UnguessableToken devtools_worker_token,
+      bool waiting_for_debugger);
 };
 
 // Represents an attached session which exposes remote debugging protocol.
diff --git a/third_party/blink/renderer/bindings/core/v8/v0_custom_element_constructor_builder.cc b/third_party/blink/renderer/bindings/core/v8/v0_custom_element_constructor_builder.cc
index e98f28ae..b458158 100644
--- a/third_party/blink/renderer/bindings/core/v8/v0_custom_element_constructor_builder.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v0_custom_element_constructor_builder.cc
@@ -102,7 +102,7 @@
     }
   }
 
-  AtomicString namespace_uri = HTMLNames::xhtmlNamespaceURI;
+  AtomicString namespace_uri = html_names::xhtmlNamespaceURI;
   if (HasValidPrototypeChainFor(&V8SVGElement::wrapperTypeInfo))
     namespace_uri = svg_names::kNamespaceURI;
 
diff --git a/third_party/blink/renderer/bindings/scripts/v8_attributes.py b/third_party/blink/renderer/bindings/scripts/v8_attributes.py
index 930e8af3..482d182d 100644
--- a/third_party/blink/renderer/bindings/scripts/v8_attributes.py
+++ b/third_party/blink/renderer/bindings/scripts/v8_attributes.py
@@ -546,9 +546,8 @@
         namespace = 'svg_names'
         includes.add('core/svg_names.h')
     else:
-        namespace = 'HTMLNames'
+        namespace = 'html_names'
         includes.add('core/html_names.h')
-        symbol_name = content_attribute_name
     return '%s::%sAttr' % (namespace, symbol_name)
 
 
diff --git a/third_party/blink/renderer/bindings/tests/results/core/v8_test_interface_node.cc b/third_party/blink/renderer/bindings/tests/results/core/v8_test_interface_node.cc
index 3b8d8623..5c87692 100644
--- a/third_party/blink/renderer/bindings/tests/results/core/v8_test_interface_node.cc
+++ b/third_party/blink/renderer/bindings/tests/results/core/v8_test_interface_node.cc
@@ -170,7 +170,7 @@
 
   TestInterfaceNode* impl = V8TestInterfaceNode::ToImpl(holder);
 
-  V8SetReturnValueString(info, impl->FastGetAttribute(HTMLNames::reflectstringattributeAttr), info.GetIsolate());
+  V8SetReturnValueString(info, impl->FastGetAttribute(html_names::kReflectstringattributeAttr), info.GetIsolate());
 }
 
 static void reflectStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -189,7 +189,7 @@
   if (!cppValue.Prepare())
     return;
 
-  impl->setAttribute(HTMLNames::reflectstringattributeAttr, cppValue);
+  impl->setAttribute(html_names::kReflectstringattributeAttr, cppValue);
 }
 
 static void reflectUrlStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -197,7 +197,7 @@
 
   TestInterfaceNode* impl = V8TestInterfaceNode::ToImpl(holder);
 
-  V8SetReturnValueString(info, impl->GetURLAttribute(HTMLNames::reflecturlstringattributeAttr), info.GetIsolate());
+  V8SetReturnValueString(info, impl->GetURLAttribute(html_names::kReflecturlstringattributeAttr), info.GetIsolate());
 }
 
 static void reflectUrlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -216,7 +216,7 @@
   if (!cppValue.Prepare())
     return;
 
-  impl->setAttribute(HTMLNames::reflecturlstringattributeAttr, cppValue);
+  impl->setAttribute(html_names::kReflecturlstringattributeAttr, cppValue);
 }
 
 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
diff --git a/third_party/blink/renderer/bindings/tests/results/core/v8_test_object.cc b/third_party/blink/renderer/bindings/tests/results/core/v8_test_object.cc
index f4d799d8..4da0e3d 100644
--- a/third_party/blink/renderer/bindings/tests/results/core/v8_test_object.cc
+++ b/third_party/blink/renderer/bindings/tests/results/core/v8_test_object.cc
@@ -3049,7 +3049,7 @@
 
   TestObject* impl = V8TestObject::ToImpl(holder);
 
-  V8SetReturnValueFast(info, impl->FastGetAttribute(HTMLNames::reflecttestinterfaceattributeAttr), impl);
+  V8SetReturnValueFast(info, impl->FastGetAttribute(html_names::kReflecttestinterfaceattributeAttr), impl);
 }
 
 static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3074,7 +3074,7 @@
     return;
   }
 
-  impl->setAttribute(HTMLNames::reflecttestinterfaceattributeAttr, cppValue);
+  impl->setAttribute(html_names::kReflecttestinterfaceattributeAttr, cppValue);
 }
 
 static void reflectReflectedNameAttributeTestAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3082,7 +3082,7 @@
 
   TestObject* impl = V8TestObject::ToImpl(holder);
 
-  V8SetReturnValueFast(info, impl->FastGetAttribute(HTMLNames::reflectedNameAttributeAttr), impl);
+  V8SetReturnValueFast(info, impl->FastGetAttribute(html_names::kReflectedNameAttributeAttr), impl);
 }
 
 static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3107,7 +3107,7 @@
     return;
   }
 
-  impl->setAttribute(HTMLNames::reflectedNameAttributeAttr, cppValue);
+  impl->setAttribute(html_names::kReflectedNameAttributeAttr, cppValue);
 }
 
 static void reflectBooleanAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3115,7 +3115,7 @@
 
   TestObject* impl = V8TestObject::ToImpl(holder);
 
-  V8SetReturnValueBool(info, impl->FastHasAttribute(HTMLNames::reflectbooleanattributeAttr));
+  V8SetReturnValueBool(info, impl->FastHasAttribute(html_names::kReflectbooleanattributeAttr));
 }
 
 static void reflectBooleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3136,7 +3136,7 @@
   if (exceptionState.HadException())
     return;
 
-  impl->SetBooleanAttribute(HTMLNames::reflectbooleanattributeAttr, cppValue);
+  impl->SetBooleanAttribute(html_names::kReflectbooleanattributeAttr, cppValue);
 }
 
 static void reflectLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3144,7 +3144,7 @@
 
   TestObject* impl = V8TestObject::ToImpl(holder);
 
-  V8SetReturnValueInt(info, impl->GetIntegralAttribute(HTMLNames::reflectlongattributeAttr));
+  V8SetReturnValueInt(info, impl->GetIntegralAttribute(html_names::kReflectlongattributeAttr));
 }
 
 static void reflectLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3165,7 +3165,7 @@
   if (exceptionState.HadException())
     return;
 
-  impl->SetIntegralAttribute(HTMLNames::reflectlongattributeAttr, cppValue);
+  impl->SetIntegralAttribute(html_names::kReflectlongattributeAttr, cppValue);
 }
 
 static void reflectUnsignedShortAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3173,7 +3173,7 @@
 
   TestObject* impl = V8TestObject::ToImpl(holder);
 
-  V8SetReturnValueUnsigned(info, std::max(0, static_cast<int>(impl->FastGetAttribute(HTMLNames::reflectunsignedshortattributeAttr))));
+  V8SetReturnValueUnsigned(info, std::max(0, static_cast<int>(impl->FastGetAttribute(html_names::kReflectunsignedshortattributeAttr))));
 }
 
 static void reflectUnsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3194,7 +3194,7 @@
   if (exceptionState.HadException())
     return;
 
-  impl->setAttribute(HTMLNames::reflectunsignedshortattributeAttr, cppValue);
+  impl->setAttribute(html_names::kReflectunsignedshortattributeAttr, cppValue);
 }
 
 static void reflectUnsignedLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3202,7 +3202,7 @@
 
   TestObject* impl = V8TestObject::ToImpl(holder);
 
-  V8SetReturnValueUnsigned(info, std::max(0, static_cast<int>(impl->GetIntegralAttribute(HTMLNames::reflectunsignedlongattributeAttr))));
+  V8SetReturnValueUnsigned(info, std::max(0, static_cast<int>(impl->GetIntegralAttribute(html_names::kReflectunsignedlongattributeAttr))));
 }
 
 static void reflectUnsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3223,7 +3223,7 @@
   if (exceptionState.HadException())
     return;
 
-  impl->SetUnsignedIntegralAttribute(HTMLNames::reflectunsignedlongattributeAttr, cppValue);
+  impl->SetUnsignedIntegralAttribute(html_names::kReflectunsignedlongattributeAttr, cppValue);
 }
 
 static void idAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3250,7 +3250,7 @@
   if (!cppValue.Prepare())
     return;
 
-  impl->setAttribute(HTMLNames::idAttr, cppValue);
+  impl->setAttribute(html_names::kIdAttr, cppValue);
 }
 
 static void nameAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3277,7 +3277,7 @@
   if (!cppValue.Prepare())
     return;
 
-  impl->setAttribute(HTMLNames::nameAttr, cppValue);
+  impl->setAttribute(html_names::kNameAttr, cppValue);
 }
 
 static void classAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3304,7 +3304,7 @@
   if (!cppValue.Prepare())
     return;
 
-  impl->setAttribute(HTMLNames::classAttr, cppValue);
+  impl->setAttribute(html_names::kClassAttr, cppValue);
 }
 
 static void reflectedIdAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3331,7 +3331,7 @@
   if (!cppValue.Prepare())
     return;
 
-  impl->setAttribute(HTMLNames::idAttr, cppValue);
+  impl->setAttribute(html_names::kIdAttr, cppValue);
 }
 
 static void reflectedNameAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3358,7 +3358,7 @@
   if (!cppValue.Prepare())
     return;
 
-  impl->setAttribute(HTMLNames::nameAttr, cppValue);
+  impl->setAttribute(html_names::kNameAttr, cppValue);
 }
 
 static void reflectedClassAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3385,7 +3385,7 @@
   if (!cppValue.Prepare())
     return;
 
-  impl->setAttribute(HTMLNames::classAttr, cppValue);
+  impl->setAttribute(html_names::kClassAttr, cppValue);
 }
 
 static void limitedToOnlyOneAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3393,7 +3393,7 @@
 
   TestObject* impl = V8TestObject::ToImpl(holder);
 
-  String cppValue(impl->FastGetAttribute(HTMLNames::limitedtoonlyoneattributeAttr));
+  String cppValue(impl->FastGetAttribute(html_names::kLimitedtoonlyoneattributeAttr));
 
   if (cppValue.IsEmpty()) {
     ;
@@ -3422,7 +3422,7 @@
   if (!cppValue.Prepare())
     return;
 
-  impl->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue);
+  impl->setAttribute(html_names::kLimitedtoonlyoneattributeAttr, cppValue);
 }
 
 static void limitedToOnlyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3430,7 +3430,7 @@
 
   TestObject* impl = V8TestObject::ToImpl(holder);
 
-  String cppValue(impl->FastGetAttribute(HTMLNames::limitedtoonlyattributeAttr));
+  String cppValue(impl->FastGetAttribute(html_names::kLimitedtoonlyattributeAttr));
 
   if (cppValue.IsEmpty()) {
     ;
@@ -3463,7 +3463,7 @@
   if (!cppValue.Prepare())
     return;
 
-  impl->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue);
+  impl->setAttribute(html_names::kLimitedtoonlyattributeAttr, cppValue);
 }
 
 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3471,7 +3471,7 @@
 
   TestObject* impl = V8TestObject::ToImpl(holder);
 
-  String cppValue(impl->FastGetAttribute(HTMLNames::otherAttr));
+  String cppValue(impl->FastGetAttribute(html_names::kOtherAttr));
 
   if (cppValue.IsEmpty()) {
     ;
@@ -3502,7 +3502,7 @@
   if (!cppValue.Prepare())
     return;
 
-  impl->setAttribute(HTMLNames::otherAttr, cppValue);
+  impl->setAttribute(html_names::kOtherAttr, cppValue);
 }
 
 static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3510,7 +3510,7 @@
 
   TestObject* impl = V8TestObject::ToImpl(holder);
 
-  String cppValue(impl->FastGetAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr));
+  String cppValue(impl->FastGetAttribute(html_names::kLimitedwithmissingdefaultattributeAttr));
 
   if (cppValue.IsEmpty()) {
     cppValue = "rsa";
@@ -3541,7 +3541,7 @@
   if (!cppValue.Prepare())
     return;
 
-  impl->setAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr, cppValue);
+  impl->setAttribute(html_names::kLimitedwithmissingdefaultattributeAttr, cppValue);
 }
 
 static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3549,7 +3549,7 @@
 
   TestObject* impl = V8TestObject::ToImpl(holder);
 
-  String cppValue(impl->FastGetAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr));
+  String cppValue(impl->FastGetAttribute(html_names::kLimitedwithinvalidmissingdefaultattributeAttr));
 
   if (cppValue.IsEmpty()) {
     cppValue = "auto";
@@ -3582,7 +3582,7 @@
   if (!cppValue.Prepare())
     return;
 
-  impl->setAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr, cppValue);
+  impl->setAttribute(html_names::kLimitedwithinvalidmissingdefaultattributeAttr, cppValue);
 }
 
 static void corsSettingAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3590,7 +3590,7 @@
 
   TestObject* impl = V8TestObject::ToImpl(holder);
 
-  String cppValue(impl->FastGetAttribute(HTMLNames::corssettingattributeAttr));
+  String cppValue(impl->FastGetAttribute(html_names::kCorssettingattributeAttr));
 
   if (cppValue.IsNull()) {
     ;
@@ -3612,7 +3612,7 @@
 
   TestObject* impl = V8TestObject::ToImpl(holder);
 
-  String cppValue(impl->FastGetAttribute(HTMLNames::limitedwithemptymissinginvalidattributeAttr));
+  String cppValue(impl->FastGetAttribute(html_names::kLimitedwithemptymissinginvalidattributeAttr));
 
   if (cppValue.IsNull()) {
     cppValue = "missing";
@@ -3903,7 +3903,7 @@
 
   TestObject* impl = V8TestObject::ToImpl(holder);
 
-  V8SetReturnValueString(info, impl->GetURLAttribute(HTMLNames::urlstringattributeAttr), info.GetIsolate());
+  V8SetReturnValueString(info, impl->GetURLAttribute(html_names::kUrlstringattributeAttr), info.GetIsolate());
 }
 
 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3922,7 +3922,7 @@
   if (!cppValue.Prepare())
     return;
 
-  impl->setAttribute(HTMLNames::urlstringattributeAttr, cppValue);
+  impl->setAttribute(html_names::kUrlstringattributeAttr, cppValue);
 }
 
 static void urlStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3930,7 +3930,7 @@
 
   TestObject* impl = V8TestObject::ToImpl(holder);
 
-  V8SetReturnValueString(info, impl->GetURLAttribute(HTMLNames::reflectUrlAttributeAttr), info.GetIsolate());
+  V8SetReturnValueString(info, impl->GetURLAttribute(html_names::kReflectUrlAttributeAttr), info.GetIsolate());
 }
 
 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -3949,7 +3949,7 @@
   if (!cppValue.Prepare())
     return;
 
-  impl->setAttribute(HTMLNames::reflectUrlAttributeAttr, cppValue);
+  impl->setAttribute(html_names::kReflectUrlAttributeAttr, cppValue);
 }
 
 static void unforgeableLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
diff --git a/third_party/blink/renderer/build/scripts/make_element_lookup_trie.py b/third_party/blink/renderer/build/scripts/make_element_lookup_trie.py
index d0fce32f..f370fd5 100755
--- a/third_party/blink/renderer/build/scripts/make_element_lookup_trie.py
+++ b/third_party/blink/renderer/build/scripts/make_element_lookup_trie.py
@@ -29,6 +29,7 @@
 
 import sys
 
+from blinkbuild.name_style_converter import NameStyleConverter
 import json5_generator
 import trie_builder
 import template_expander
@@ -53,6 +54,9 @@
         'namespacePrefix': '',
         'namespaceURI': '',
     }
+    filters = {
+        'symbol': lambda symbol: 'k' + NameStyleConverter(symbol).to_upper_camel_case()
+    }
 
     def __init__(self, json5_file_paths, output_dir):
         super(ElementLookupTrieWriter, self).__init__(json5_file_paths, output_dir)
@@ -73,7 +77,7 @@
             'namespace': self._namespace,
         }
 
-    @template_expander.use_jinja('templates/element_lookup_trie.cc.tmpl')
+    @template_expander.use_jinja('templates/element_lookup_trie.cc.tmpl', filters=filters)
     def generate_implementation(self):
         return {
             'input_files': self._input_files,
diff --git a/third_party/blink/renderer/build/scripts/make_element_type_helpers.py b/third_party/blink/renderer/build/scripts/make_element_type_helpers.py
index d7972da..210e5c26 100755
--- a/third_party/blink/renderer/build/scripts/make_element_type_helpers.py
+++ b/third_party/blink/renderer/build/scripts/make_element_type_helpers.py
@@ -8,14 +8,9 @@
 
 import hasher
 import json5_generator
-import name_utilities
 import template_expander
 
 
-def _legacy_symbol(tag):
-    return name_utilities.cpp_name(tag).replace('-', '_')
-
-
 def _symbol(tag):
     return 'k' + tag['name'].to_upper_camel_case()
 
@@ -53,11 +48,6 @@
         self.fallback_interface = self.json5_file.metadata['fallbackInterfaceName'].strip('"')
 
         assert self.namespace, 'A namespace is required.'
-        cpp_namespace = self.namespace.lower() + '_names'
-        # TODO(tkent): Remove the following branch.  crbug.com/889726
-        if self.namespace == 'HTML':
-            cpp_namespace = self.namespace + 'Names'
-            MakeElementTypeHelpersWriter.filters['symbol'] = _legacy_symbol
 
         basename = self.namespace.lower() + '_element_type_helpers'
         self._outputs = {
@@ -69,7 +59,7 @@
                               '{0}/{0}_element.h'.format(self.namespace.lower())
         self._template_context = {
             'base_element_header': base_element_header,
-            'cpp_namespace': cpp_namespace,
+            'cpp_namespace': self.namespace.lower() + '_names',
             'input_files': self._input_files,
             'namespace': self.namespace,
             'tags': self.json5_file.name_dictionaries,
diff --git a/third_party/blink/renderer/build/scripts/make_qualified_names.py b/third_party/blink/renderer/build/scripts/make_qualified_names.py
index 3450583..1b3bdaa 100755
--- a/third_party/blink/renderer/build/scripts/make_qualified_names.py
+++ b/third_party/blink/renderer/build/scripts/make_qualified_names.py
@@ -39,10 +39,6 @@
 from json5_generator import Json5File
 
 
-def _legacy_symbol(entry):
-    return entry['name'].original.replace('-', '_')
-
-
 def _symbol(entry):
     return 'k' + entry['name'].to_upper_camel_case()
 
@@ -91,11 +87,6 @@
         self.namespace = self._metadata('namespace')
         cpp_namespace = self.namespace.lower() + '_names'
         namespace_prefix = self._metadata('namespacePrefix') or 'k'
-        # TODO(tkent): Remove the following branch.  crbug.com/889726
-        if self.namespace == 'HTML':
-            cpp_namespace = self.namespace + 'Names'
-            MakeQualifiedNamesWriter.filters['symbol'] = _legacy_symbol
-            namespace_prefix = self._metadata('namespacePrefix') or self.namespace.lower()
 
         namespace_uri = self._metadata('namespaceURI')
         use_namespace_for_attrs = self.attrs_json5_file.metadata['attrsNullNamespace'] is None
diff --git a/third_party/blink/renderer/build/scripts/templates/element_lookup_trie.cc.tmpl b/third_party/blink/renderer/build/scripts/templates/element_lookup_trie.cc.tmpl
index 8c50960..2eab64f6 100644
--- a/third_party/blink/renderer/build/scripts/templates/element_lookup_trie.cc.tmpl
+++ b/third_party/blink/renderer/build/scripts/templates/element_lookup_trie.cc.tmpl
@@ -11,12 +11,12 @@
 
 namespace blink {
 
-using namespace {{namespace}}Names;
+using namespace {{namespace|lower}}_names;
 
 const AtomicString& lookup{{namespace}}Tag(const UChar* data, unsigned length) {
   DCHECK(data);
   DCHECK(length);
-  {% macro trie_return_statement(tag) %}{{tag}}Tag.LocalName(){% endmacro %}
+  {% macro trie_return_statement(tag) %}{{tag|symbol}}Tag.LocalName(){% endmacro %}
   {{ trie_length_switch(length_tries, trie_return_statement, false) | indent(4) }}
   return g_null_atom;
 }
diff --git a/third_party/blink/renderer/core/animation/animation_input_helpers.cc b/third_party/blink/renderer/core/animation/animation_input_helpers.cc
index 14119ca7..3e215ff 100644
--- a/third_party/blink/renderer/core/animation/animation_input_helpers.cc
+++ b/third_party/blink/renderer/core/animation/animation_input_helpers.cc
@@ -104,7 +104,7 @@
     // Fill the set for the first use.
     // Animatable attributes from http://www.w3.org/TR/SVG/attindex.html
     const QualifiedName* attributes[] = {
-        &HTMLNames::classAttr,
+        &html_names::kClassAttr,
         &svg_names::kAmplitudeAttr,
         &svg_names::kAzimuthAttr,
         &svg_names::kBaseFrequencyAttr,
diff --git a/third_party/blink/renderer/core/animation/css/css_animations_test.cc b/third_party/blink/renderer/core/animation/css/css_animations_test.cc
index ceaa7b74..e246593 100644
--- a/third_party/blink/renderer/core/animation/css/css_animations_test.cc
+++ b/third_party/blink/renderer/core/animation/css/css_animations_test.cc
@@ -72,7 +72,7 @@
     <div id='test'></div>
   )HTML");
   Element* element = GetDocument().getElementById("test");
-  element->setAttribute(HTMLNames::classAttr, "contrast1");
+  element->setAttribute(html_names::kClassAttr, "contrast1");
   GetDocument().View()->UpdateAllLifecyclePhases();
   ElementAnimations* animations = element->GetElementAnimations();
   EXPECT_EQ(1u, animations->Animations().size());
@@ -83,7 +83,7 @@
   AdvanceClockSeconds(0.8);
 
   // Starting the second transition should retarget the active transition.
-  element->setAttribute(HTMLNames::classAttr, "contrast2");
+  element->setAttribute(html_names::kClassAttr, "contrast2");
   GetPage().Animator().ServiceScriptedAnimations(CurrentTimeTicks());
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_DOUBLE_EQ(0.6, GetContrastFilterAmount(element));
@@ -108,7 +108,7 @@
     <div id='test'></div>
   )HTML");
   Element* element = GetDocument().getElementById("test");
-  element->setAttribute(HTMLNames::classAttr, "saturate");
+  element->setAttribute(html_names::kClassAttr, "saturate");
   GetDocument().View()->UpdateAllLifecyclePhases();
   ElementAnimations* animations = element->GetElementAnimations();
   EXPECT_EQ(1u, animations->Animations().size());
@@ -125,7 +125,7 @@
   // Now we start a contrast filter. Since it will try to combine with
   // the in progress saturate filter, and be incompatible, there should
   // be no transition and it should immediately apply on the next frame.
-  element->setAttribute(HTMLNames::classAttr, "contrast");
+  element->setAttribute(html_names::kClassAttr, "contrast");
   EXPECT_TRUE(element->GetComputedStyle()->Filter().IsEmpty());
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(0.2, GetContrastFilterAmount(element));
diff --git a/third_party/blink/renderer/core/animation/svg_interpolation_types_map.cc b/third_party/blink/renderer/core/animation/svg_interpolation_types_map.cc
index a81333a..4b5afe5 100644
--- a/third_party/blink/renderer/core/animation/svg_interpolation_types_map.cc
+++ b/third_party/blink/renderer/core/animation/svg_interpolation_types_map.cc
@@ -134,7 +134,7 @@
              attribute == svg_names::kTransformAttr) {
     applicable_types->push_back(
         std::make_unique<SVGTransformListInterpolationType>(attribute));
-  } else if (attribute == HTMLNames::classAttr ||
+  } else if (attribute == html_names::kClassAttr ||
              attribute == svg_names::kClipPathUnitsAttr ||
              attribute == svg_names::kEdgeModeAttr ||
              attribute == svg_names::kFilterUnitsAttr ||
diff --git a/third_party/blink/renderer/core/aom/accessible_node.cc b/third_party/blink/renderer/core/aom/accessible_node.cc
index a1bdd6b..6699b9a0 100644
--- a/third_party/blink/renderer/core/aom/accessible_node.cc
+++ b/third_party/blink/renderer/core/aom/accessible_node.cc
@@ -14,44 +14,44 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 namespace {
 
 QualifiedName GetCorrespondingARIAAttribute(AOMStringProperty property) {
   switch (property) {
     case AOMStringProperty::kAutocomplete:
-      return aria_autocompleteAttr;
+      return kAriaAutocompleteAttr;
     case AOMStringProperty::kChecked:
-      return aria_checkedAttr;
+      return kAriaCheckedAttr;
     case AOMStringProperty::kCurrent:
-      return aria_currentAttr;
+      return kAriaCurrentAttr;
     case AOMStringProperty::kHasPopUp:
-      return aria_haspopupAttr;
+      return kAriaHaspopupAttr;
     case AOMStringProperty::kInvalid:
-      return aria_invalidAttr;
+      return kAriaInvalidAttr;
     case AOMStringProperty::kKeyShortcuts:
-      return aria_keyshortcutsAttr;
+      return kAriaKeyshortcutsAttr;
     case AOMStringProperty::kLabel:
-      return aria_labelAttr;
+      return kAriaLabelAttr;
     case AOMStringProperty::kLive:
-      return aria_liveAttr;
+      return kAriaLiveAttr;
     case AOMStringProperty::kOrientation:
-      return aria_orientationAttr;
+      return kAriaOrientationAttr;
     case AOMStringProperty::kPlaceholder:
-      return aria_placeholderAttr;
+      return kAriaPlaceholderAttr;
     case AOMStringProperty::kPressed:
-      return aria_pressedAttr;
+      return kAriaPressedAttr;
     case AOMStringProperty::kRelevant:
-      return aria_relevantAttr;
+      return kAriaRelevantAttr;
     case AOMStringProperty::kRole:
-      return roleAttr;
+      return kRoleAttr;
     case AOMStringProperty::kRoleDescription:
-      return aria_roledescriptionAttr;
+      return kAriaRoledescriptionAttr;
     case AOMStringProperty::kSort:
-      return aria_sortAttr;
+      return kAriaSortAttr;
     case AOMStringProperty::kValueText:
-      return aria_valuetextAttr;
+      return kAriaValuetextAttr;
   }
 
   NOTREACHED();
@@ -61,13 +61,13 @@
 QualifiedName GetCorrespondingARIAAttribute(AOMRelationProperty property) {
   switch (property) {
     case AOMRelationProperty::kActiveDescendant:
-      return aria_activedescendantAttr;
+      return kAriaActivedescendantAttr;
       break;
     case AOMRelationProperty::kDetails:
-      return aria_detailsAttr;
+      return kAriaDetailsAttr;
       break;
     case AOMRelationProperty::kErrorMessage:
-      return aria_errormessageAttr;
+      return kAriaErrormessageAttr;
       break;
   }
 
@@ -78,21 +78,21 @@
 QualifiedName GetCorrespondingARIAAttribute(AOMRelationListProperty property) {
   switch (property) {
     case AOMRelationListProperty::kDescribedBy:
-      return aria_describedbyAttr;
+      return kAriaDescribedbyAttr;
       break;
     case AOMRelationListProperty::kControls:
-      return aria_controlsAttr;
+      return kAriaControlsAttr;
       break;
     case AOMRelationListProperty::kFlowTo:
-      return aria_flowtoAttr;
+      return kAriaFlowtoAttr;
       break;
     case AOMRelationListProperty::kLabeledBy:
       // Note that there are two allowed spellings of this attribute.
       // Callers should check both.
-      return aria_labelledbyAttr;
+      return kAriaLabelledbyAttr;
       break;
     case AOMRelationListProperty::kOwns:
-      return aria_ownsAttr;
+      return kAriaOwnsAttr;
       break;
   }
 
@@ -103,37 +103,37 @@
 QualifiedName GetCorrespondingARIAAttribute(AOMBooleanProperty property) {
   switch (property) {
     case AOMBooleanProperty::kAtomic:
-      return aria_atomicAttr;
+      return kAriaAtomicAttr;
       break;
     case AOMBooleanProperty::kBusy:
-      return aria_busyAttr;
+      return kAriaBusyAttr;
       break;
     case AOMBooleanProperty::kDisabled:
-      return aria_disabledAttr;
+      return kAriaDisabledAttr;
       break;
     case AOMBooleanProperty::kExpanded:
-      return aria_expandedAttr;
+      return kAriaExpandedAttr;
       break;
     case AOMBooleanProperty::kHidden:
-      return aria_hiddenAttr;
+      return kAriaHiddenAttr;
       break;
     case AOMBooleanProperty::kModal:
-      return aria_modalAttr;
+      return kAriaModalAttr;
       break;
     case AOMBooleanProperty::kMultiline:
-      return aria_multilineAttr;
+      return kAriaMultilineAttr;
       break;
     case AOMBooleanProperty::kMultiselectable:
-      return aria_multiselectableAttr;
+      return kAriaMultiselectableAttr;
       break;
     case AOMBooleanProperty::kReadOnly:
-      return aria_readonlyAttr;
+      return kAriaReadonlyAttr;
       break;
     case AOMBooleanProperty::kRequired:
-      return aria_requiredAttr;
+      return kAriaRequiredAttr;
       break;
     case AOMBooleanProperty::kSelected:
-      return aria_selectedAttr;
+      return kAriaSelectedAttr;
       break;
   }
 
@@ -145,13 +145,13 @@
   AtomicString attr_value;
   switch (property) {
     case AOMFloatProperty::kValueMax:
-      return aria_valuemaxAttr;
+      return kAriaValuemaxAttr;
       break;
     case AOMFloatProperty::kValueMin:
-      return aria_valueminAttr;
+      return kAriaValueminAttr;
       break;
     case AOMFloatProperty::kValueNow:
-      return aria_valuenowAttr;
+      return kAriaValuenowAttr;
       break;
   }
 
@@ -162,22 +162,22 @@
 QualifiedName GetCorrespondingARIAAttribute(AOMUIntProperty property) {
   switch (property) {
     case AOMUIntProperty::kColIndex:
-      return aria_colindexAttr;
+      return kAriaColindexAttr;
       break;
     case AOMUIntProperty::kColSpan:
-      return aria_colspanAttr;
+      return kAriaColspanAttr;
       break;
     case AOMUIntProperty::kLevel:
-      return aria_levelAttr;
+      return kAriaLevelAttr;
       break;
     case AOMUIntProperty::kPosInSet:
-      return aria_posinsetAttr;
+      return kAriaPosinsetAttr;
       break;
     case AOMUIntProperty::kRowIndex:
-      return aria_rowindexAttr;
+      return kAriaRowindexAttr;
       break;
     case AOMUIntProperty::kRowSpan:
-      return aria_rowspanAttr;
+      return kAriaRowspanAttr;
       break;
   }
 
@@ -188,13 +188,13 @@
 QualifiedName GetCorrespondingARIAAttribute(AOMIntProperty property) {
   switch (property) {
     case AOMIntProperty::kColCount:
-      return aria_colcountAttr;
+      return kAriaColcountAttr;
       break;
     case AOMIntProperty::kRowCount:
-      return aria_rowcountAttr;
+      return kAriaRowcountAttr;
       break;
     case AOMIntProperty::kSetSize:
-      return aria_setsizeAttr;
+      return kAriaSetsizeAttr;
       break;
   }
 
@@ -422,7 +422,7 @@
   QualifiedName attribute = GetCorrespondingARIAAttribute(property);
   String value = element->FastGetAttribute(attribute).GetString();
   if (value.IsEmpty() && property == AOMRelationListProperty::kLabeledBy)
-    value = element->FastGetAttribute(aria_labeledbyAttr).GetString();
+    value = element->FastGetAttribute(kAriaLabeledbyAttr).GetString();
   if (value.IsEmpty())
     return false;
 
@@ -563,7 +563,7 @@
 void AccessibleNode::setActiveDescendant(AccessibleNode* active_descendant) {
   SetRelationProperty(AOMRelationProperty::kActiveDescendant,
                       active_descendant);
-  NotifyAttributeChanged(aria_activedescendantAttr);
+  NotifyAttributeChanged(kAriaActivedescendantAttr);
 }
 
 bool AccessibleNode::atomic(bool& is_null) const {
@@ -572,7 +572,7 @@
 
 void AccessibleNode::setAtomic(bool atomic, bool is_null) {
   SetBooleanProperty(AOMBooleanProperty::kAtomic, atomic, is_null);
-  NotifyAttributeChanged(aria_atomicAttr);
+  NotifyAttributeChanged(kAriaAtomicAttr);
 }
 
 AtomicString AccessibleNode::autocomplete() const {
@@ -581,7 +581,7 @@
 
 void AccessibleNode::setAutocomplete(const AtomicString& autocomplete) {
   SetStringProperty(AOMStringProperty::kAutocomplete, autocomplete);
-  NotifyAttributeChanged(aria_autocompleteAttr);
+  NotifyAttributeChanged(kAriaAutocompleteAttr);
 }
 
 bool AccessibleNode::busy(bool& is_null) const {
@@ -590,7 +590,7 @@
 
 void AccessibleNode::setBusy(bool busy, bool is_null) {
   SetBooleanProperty(AOMBooleanProperty::kBusy, busy, is_null);
-  NotifyAttributeChanged(aria_busyAttr);
+  NotifyAttributeChanged(kAriaBusyAttr);
 }
 
 AtomicString AccessibleNode::checked() const {
@@ -599,7 +599,7 @@
 
 void AccessibleNode::setChecked(const AtomicString& checked) {
   SetStringProperty(AOMStringProperty::kChecked, checked);
-  NotifyAttributeChanged(aria_checkedAttr);
+  NotifyAttributeChanged(kAriaCheckedAttr);
 }
 
 int32_t AccessibleNode::colCount(bool& is_null) const {
@@ -608,7 +608,7 @@
 
 void AccessibleNode::setColCount(int32_t col_count, bool is_null) {
   SetIntProperty(AOMIntProperty::kColCount, col_count, is_null);
-  NotifyAttributeChanged(aria_colcountAttr);
+  NotifyAttributeChanged(kAriaColcountAttr);
 }
 
 uint32_t AccessibleNode::colIndex(bool& is_null) const {
@@ -617,7 +617,7 @@
 
 void AccessibleNode::setColIndex(uint32_t col_index, bool is_null) {
   SetUIntProperty(AOMUIntProperty::kColIndex, col_index, is_null);
-  NotifyAttributeChanged(aria_colindexAttr);
+  NotifyAttributeChanged(kAriaColindexAttr);
 }
 
 uint32_t AccessibleNode::colSpan(bool& is_null) const {
@@ -626,7 +626,7 @@
 
 void AccessibleNode::setColSpan(uint32_t col_span, bool is_null) {
   SetUIntProperty(AOMUIntProperty::kColSpan, col_span, is_null);
-  NotifyAttributeChanged(aria_colspanAttr);
+  NotifyAttributeChanged(kAriaColspanAttr);
 }
 
 AccessibleNodeList* AccessibleNode::controls() const {
@@ -635,7 +635,7 @@
 
 void AccessibleNode::setControls(AccessibleNodeList* controls) {
   SetRelationListProperty(AOMRelationListProperty::kControls, controls);
-  NotifyAttributeChanged(aria_controlsAttr);
+  NotifyAttributeChanged(kAriaControlsAttr);
 }
 
 AtomicString AccessibleNode::current() const {
@@ -644,7 +644,7 @@
 
 void AccessibleNode::setCurrent(const AtomicString& current) {
   SetStringProperty(AOMStringProperty::kCurrent, current);
-  NotifyAttributeChanged(aria_currentAttr);
+  NotifyAttributeChanged(kAriaCurrentAttr);
 }
 
 AccessibleNodeList* AccessibleNode::describedBy() {
@@ -653,7 +653,7 @@
 
 void AccessibleNode::setDescribedBy(AccessibleNodeList* described_by) {
   SetRelationListProperty(AOMRelationListProperty::kDescribedBy, described_by);
-  NotifyAttributeChanged(aria_describedbyAttr);
+  NotifyAttributeChanged(kAriaDescribedbyAttr);
 }
 
 AccessibleNode* AccessibleNode::details() const {
@@ -662,7 +662,7 @@
 
 void AccessibleNode::setDetails(AccessibleNode* details) {
   SetRelationProperty(AOMRelationProperty::kDetails, details);
-  NotifyAttributeChanged(aria_detailsAttr);
+  NotifyAttributeChanged(kAriaDetailsAttr);
 }
 
 bool AccessibleNode::disabled(bool& is_null) const {
@@ -671,7 +671,7 @@
 
 void AccessibleNode::setDisabled(bool disabled, bool is_null) {
   SetBooleanProperty(AOMBooleanProperty::kDisabled, disabled, is_null);
-  NotifyAttributeChanged(aria_disabledAttr);
+  NotifyAttributeChanged(kAriaDisabledAttr);
 }
 
 AccessibleNode* AccessibleNode::errorMessage() const {
@@ -680,7 +680,7 @@
 
 void AccessibleNode::setErrorMessage(AccessibleNode* error_message) {
   SetRelationProperty(AOMRelationProperty::kErrorMessage, error_message);
-  NotifyAttributeChanged(aria_errormessageAttr);
+  NotifyAttributeChanged(kAriaErrormessageAttr);
 }
 
 bool AccessibleNode::expanded(bool& is_null) const {
@@ -689,7 +689,7 @@
 
 void AccessibleNode::setExpanded(bool expanded, bool is_null) {
   SetBooleanProperty(AOMBooleanProperty::kExpanded, expanded, is_null);
-  NotifyAttributeChanged(aria_expandedAttr);
+  NotifyAttributeChanged(kAriaExpandedAttr);
 }
 
 AccessibleNodeList* AccessibleNode::flowTo() const {
@@ -698,7 +698,7 @@
 
 void AccessibleNode::setFlowTo(AccessibleNodeList* flow_to) {
   SetRelationListProperty(AOMRelationListProperty::kFlowTo, flow_to);
-  NotifyAttributeChanged(aria_flowtoAttr);
+  NotifyAttributeChanged(kAriaFlowtoAttr);
 }
 
 AtomicString AccessibleNode::hasPopUp() const {
@@ -707,7 +707,7 @@
 
 void AccessibleNode::setHasPopUp(const AtomicString& has_popup) {
   SetStringProperty(AOMStringProperty::kHasPopUp, has_popup);
-  NotifyAttributeChanged(aria_haspopupAttr);
+  NotifyAttributeChanged(kAriaHaspopupAttr);
 }
 
 bool AccessibleNode::hidden(bool& is_null) const {
@@ -716,7 +716,7 @@
 
 void AccessibleNode::setHidden(bool hidden, bool is_null) {
   SetBooleanProperty(AOMBooleanProperty::kHidden, hidden, is_null);
-  NotifyAttributeChanged(aria_hiddenAttr);
+  NotifyAttributeChanged(kAriaHiddenAttr);
 }
 
 AtomicString AccessibleNode::invalid() const {
@@ -725,7 +725,7 @@
 
 void AccessibleNode::setInvalid(const AtomicString& invalid) {
   SetStringProperty(AOMStringProperty::kInvalid, invalid);
-  NotifyAttributeChanged(aria_invalidAttr);
+  NotifyAttributeChanged(kAriaInvalidAttr);
 }
 
 AtomicString AccessibleNode::keyShortcuts() const {
@@ -734,7 +734,7 @@
 
 void AccessibleNode::setKeyShortcuts(const AtomicString& key_shortcuts) {
   SetStringProperty(AOMStringProperty::kKeyShortcuts, key_shortcuts);
-  NotifyAttributeChanged(aria_keyshortcutsAttr);
+  NotifyAttributeChanged(kAriaKeyshortcutsAttr);
 }
 
 AtomicString AccessibleNode::label() const {
@@ -743,7 +743,7 @@
 
 void AccessibleNode::setLabel(const AtomicString& label) {
   SetStringProperty(AOMStringProperty::kLabel, label);
-  NotifyAttributeChanged(aria_labelAttr);
+  NotifyAttributeChanged(kAriaLabelAttr);
 }
 
 AccessibleNodeList* AccessibleNode::labeledBy() {
@@ -752,7 +752,7 @@
 
 void AccessibleNode::setLabeledBy(AccessibleNodeList* labeled_by) {
   SetRelationListProperty(AOMRelationListProperty::kLabeledBy, labeled_by);
-  NotifyAttributeChanged(aria_labelledbyAttr);
+  NotifyAttributeChanged(kAriaLabelledbyAttr);
 }
 
 uint32_t AccessibleNode::level(bool& is_null) const {
@@ -761,7 +761,7 @@
 
 void AccessibleNode::setLevel(uint32_t level, bool is_null) {
   SetUIntProperty(AOMUIntProperty::kLevel, level, is_null);
-  NotifyAttributeChanged(aria_levelAttr);
+  NotifyAttributeChanged(kAriaLevelAttr);
 }
 
 AtomicString AccessibleNode::live() const {
@@ -770,7 +770,7 @@
 
 void AccessibleNode::setLive(const AtomicString& live) {
   SetStringProperty(AOMStringProperty::kLive, live);
-  NotifyAttributeChanged(aria_liveAttr);
+  NotifyAttributeChanged(kAriaLiveAttr);
 }
 
 bool AccessibleNode::modal(bool& is_null) const {
@@ -779,7 +779,7 @@
 
 void AccessibleNode::setModal(bool modal, bool is_null) {
   SetBooleanProperty(AOMBooleanProperty::kModal, modal, is_null);
-  NotifyAttributeChanged(aria_modalAttr);
+  NotifyAttributeChanged(kAriaModalAttr);
 }
 
 bool AccessibleNode::multiline(bool& is_null) const {
@@ -788,7 +788,7 @@
 
 void AccessibleNode::setMultiline(bool multiline, bool is_null) {
   SetBooleanProperty(AOMBooleanProperty::kMultiline, multiline, is_null);
-  NotifyAttributeChanged(aria_multilineAttr);
+  NotifyAttributeChanged(kAriaMultilineAttr);
 }
 
 bool AccessibleNode::multiselectable(bool& is_null) const {
@@ -798,7 +798,7 @@
 void AccessibleNode::setMultiselectable(bool multiselectable, bool is_null) {
   SetBooleanProperty(AOMBooleanProperty::kMultiselectable, multiselectable,
                      is_null);
-  NotifyAttributeChanged(aria_multiselectableAttr);
+  NotifyAttributeChanged(kAriaMultiselectableAttr);
 }
 
 AtomicString AccessibleNode::orientation() const {
@@ -807,7 +807,7 @@
 
 void AccessibleNode::setOrientation(const AtomicString& orientation) {
   SetStringProperty(AOMStringProperty::kOrientation, orientation);
-  NotifyAttributeChanged(aria_orientationAttr);
+  NotifyAttributeChanged(kAriaOrientationAttr);
 }
 
 AccessibleNodeList* AccessibleNode::owns() const {
@@ -816,7 +816,7 @@
 
 void AccessibleNode::setOwns(AccessibleNodeList* owns) {
   SetRelationListProperty(AOMRelationListProperty::kOwns, owns);
-  NotifyAttributeChanged(aria_ownsAttr);
+  NotifyAttributeChanged(kAriaOwnsAttr);
 }
 
 AtomicString AccessibleNode::placeholder() const {
@@ -825,7 +825,7 @@
 
 void AccessibleNode::setPlaceholder(const AtomicString& placeholder) {
   SetStringProperty(AOMStringProperty::kPlaceholder, placeholder);
-  NotifyAttributeChanged(aria_placeholderAttr);
+  NotifyAttributeChanged(kAriaPlaceholderAttr);
 }
 
 uint32_t AccessibleNode::posInSet(bool& is_null) const {
@@ -834,7 +834,7 @@
 
 void AccessibleNode::setPosInSet(uint32_t pos_in_set, bool is_null) {
   SetUIntProperty(AOMUIntProperty::kPosInSet, pos_in_set, is_null);
-  NotifyAttributeChanged(aria_posinsetAttr);
+  NotifyAttributeChanged(kAriaPosinsetAttr);
 }
 
 AtomicString AccessibleNode::pressed() const {
@@ -843,7 +843,7 @@
 
 void AccessibleNode::setPressed(const AtomicString& pressed) {
   SetStringProperty(AOMStringProperty::kPressed, pressed);
-  NotifyAttributeChanged(aria_pressedAttr);
+  NotifyAttributeChanged(kAriaPressedAttr);
 }
 
 bool AccessibleNode::readOnly(bool& is_null) const {
@@ -852,7 +852,7 @@
 
 void AccessibleNode::setReadOnly(bool read_only, bool is_null) {
   SetBooleanProperty(AOMBooleanProperty::kReadOnly, read_only, is_null);
-  NotifyAttributeChanged(aria_readonlyAttr);
+  NotifyAttributeChanged(kAriaReadonlyAttr);
 }
 
 AtomicString AccessibleNode::relevant() const {
@@ -861,7 +861,7 @@
 
 void AccessibleNode::setRelevant(const AtomicString& relevant) {
   SetStringProperty(AOMStringProperty::kRelevant, relevant);
-  NotifyAttributeChanged(aria_relevantAttr);
+  NotifyAttributeChanged(kAriaRelevantAttr);
 }
 
 bool AccessibleNode::required(bool& is_null) const {
@@ -870,7 +870,7 @@
 
 void AccessibleNode::setRequired(bool required, bool is_null) {
   SetBooleanProperty(AOMBooleanProperty::kRequired, required, is_null);
-  NotifyAttributeChanged(aria_requiredAttr);
+  NotifyAttributeChanged(kAriaRequiredAttr);
 }
 
 AtomicString AccessibleNode::role() const {
@@ -879,7 +879,7 @@
 
 void AccessibleNode::setRole(const AtomicString& role) {
   SetStringProperty(AOMStringProperty::kRole, role);
-  NotifyAttributeChanged(roleAttr);
+  NotifyAttributeChanged(kRoleAttr);
 }
 
 AtomicString AccessibleNode::roleDescription() const {
@@ -888,7 +888,7 @@
 
 void AccessibleNode::setRoleDescription(const AtomicString& role_description) {
   SetStringProperty(AOMStringProperty::kRoleDescription, role_description);
-  NotifyAttributeChanged(aria_roledescriptionAttr);
+  NotifyAttributeChanged(kAriaRoledescriptionAttr);
 }
 
 int32_t AccessibleNode::rowCount(bool& is_null) const {
@@ -897,7 +897,7 @@
 
 void AccessibleNode::setRowCount(int32_t row_count, bool is_null) {
   SetIntProperty(AOMIntProperty::kRowCount, row_count, is_null);
-  NotifyAttributeChanged(aria_rowcountAttr);
+  NotifyAttributeChanged(kAriaRowcountAttr);
 }
 
 uint32_t AccessibleNode::rowIndex(bool& is_null) const {
@@ -906,7 +906,7 @@
 
 void AccessibleNode::setRowIndex(uint32_t row_index, bool is_null) {
   SetUIntProperty(AOMUIntProperty::kRowIndex, row_index, is_null);
-  NotifyAttributeChanged(aria_rowindexAttr);
+  NotifyAttributeChanged(kAriaRowindexAttr);
 }
 
 uint32_t AccessibleNode::rowSpan(bool& is_null) const {
@@ -915,7 +915,7 @@
 
 void AccessibleNode::setRowSpan(uint32_t row_span, bool is_null) {
   SetUIntProperty(AOMUIntProperty::kRowSpan, row_span, is_null);
-  NotifyAttributeChanged(aria_rowspanAttr);
+  NotifyAttributeChanged(kAriaRowspanAttr);
 }
 
 bool AccessibleNode::selected(bool& is_null) const {
@@ -924,7 +924,7 @@
 
 void AccessibleNode::setSelected(bool selected, bool is_null) {
   SetBooleanProperty(AOMBooleanProperty::kSelected, selected, is_null);
-  NotifyAttributeChanged(aria_selectedAttr);
+  NotifyAttributeChanged(kAriaSelectedAttr);
 }
 
 int32_t AccessibleNode::setSize(bool& is_null) const {
@@ -933,7 +933,7 @@
 
 void AccessibleNode::setSetSize(int32_t set_size, bool is_null) {
   SetIntProperty(AOMIntProperty::kSetSize, set_size, is_null);
-  NotifyAttributeChanged(aria_setsizeAttr);
+  NotifyAttributeChanged(kAriaSetsizeAttr);
 }
 
 AtomicString AccessibleNode::sort() const {
@@ -942,7 +942,7 @@
 
 void AccessibleNode::setSort(const AtomicString& sort) {
   SetStringProperty(AOMStringProperty::kSort, sort);
-  NotifyAttributeChanged(aria_sortAttr);
+  NotifyAttributeChanged(kAriaSortAttr);
 }
 
 float AccessibleNode::valueMax(bool& is_null) const {
@@ -951,7 +951,7 @@
 
 void AccessibleNode::setValueMax(float value_max, bool is_null) {
   SetFloatProperty(AOMFloatProperty::kValueMax, value_max, is_null);
-  NotifyAttributeChanged(aria_valuemaxAttr);
+  NotifyAttributeChanged(kAriaValuemaxAttr);
 }
 
 float AccessibleNode::valueMin(bool& is_null) const {
@@ -960,7 +960,7 @@
 
 void AccessibleNode::setValueMin(float value_min, bool is_null) {
   SetFloatProperty(AOMFloatProperty::kValueMin, value_min, is_null);
-  NotifyAttributeChanged(aria_valueminAttr);
+  NotifyAttributeChanged(kAriaValueminAttr);
 }
 
 float AccessibleNode::valueNow(bool& is_null) const {
@@ -969,7 +969,7 @@
 
 void AccessibleNode::setValueNow(float value_now, bool is_null) {
   SetFloatProperty(AOMFloatProperty::kValueNow, value_now, is_null);
-  NotifyAttributeChanged(aria_valuenowAttr);
+  NotifyAttributeChanged(kAriaValuenowAttr);
 }
 
 AtomicString AccessibleNode::valueText() const {
@@ -978,7 +978,7 @@
 
 void AccessibleNode::setValueText(const AtomicString& value_text) {
   SetStringProperty(AOMStringProperty::kValueText, value_text);
-  NotifyAttributeChanged(aria_valuetextAttr);
+  NotifyAttributeChanged(kAriaValuetextAttr);
 }
 
 AccessibleNodeList* AccessibleNode::childNodes() {
diff --git a/third_party/blink/renderer/core/core_initializer.cc b/third_party/blink/renderer/core/core_initializer.cc
index cdfd7c9d..014147c 100644
--- a/third_party/blink/renderer/core/core_initializer.cc
+++ b/third_party/blink/renderer/core/core_initializer.cc
@@ -89,7 +89,7 @@
   // TODO(mikhail.pozdnyakov@intel.com): We should generate static strings
   // initialization code.
   const unsigned kQualifiedNamesCount =
-      HTMLNames::kTagsCount + HTMLNames::kAttrsCount +
+      html_names::kTagsCount + html_names::kAttrsCount +
       mathml_names::kTagsCount + mathml_names::kAttrsCount +
       svg_names::kTagsCount + svg_names::kAttrsCount +
       xlink_names::kAttrsCount + xml_names::kAttrsCount +
@@ -100,7 +100,7 @@
       EventTargetNames::kNamesCount + EventTypeNames::kNamesCount +
       FetchInitiatorTypeNames::kNamesCount + FontFamilyNames::kNamesCount +
       HTMLTokenizerNames::kNamesCount + HTTPNames::kNamesCount +
-      InputModeNames::kNamesCount + InputTypeNames::kNamesCount +
+      InputModeNames::kNamesCount + input_type_names::kNamesCount +
       media_feature_names::kNamesCount + media_type_names::kNamesCount +
       performance_entry_names::kNamesCount;
 
@@ -110,7 +110,7 @@
 
   AtomicStringTable::Instance().ReserveCapacity(kCoreStaticStringsCount);
 
-  HTMLNames::init();
+  html_names::init();
   mathml_names::init();
   svg_names::init();
   xlink_names::init();
@@ -125,7 +125,7 @@
   HTMLTokenizerNames::init();
   HTTPNames::init();
   InputModeNames::init();
-  InputTypeNames::init();
+  input_type_names::init();
   media_feature_names::init();
   media_type_names::init();
   performance_entry_names::init();
diff --git a/third_party/blink/renderer/core/css/abstract_property_set_css_style_declaration.cc b/third_party/blink/renderer/core/css/abstract_property_set_css_style_declaration.cc
index bae87db17..2ddf7ae7 100644
--- a/third_party/blink/renderer/core/css/abstract_property_set_css_style_declaration.cc
+++ b/third_party/blink/renderer/core/css/abstract_property_set_css_style_declaration.cc
@@ -213,7 +213,7 @@
   Element* parent = ParentElement();
   if (parent) {
     parent->GetDocument().GetStyleEngine().AttributeChangedForElement(
-        HTMLNames::styleAttr, *parent);
+        html_names::kStyleAttr, *parent);
   }
   mutation_scope.EnqueueMutationRecord();
 }
diff --git a/third_party/blink/renderer/core/css/affected_by_pseudo_test.cc b/third_party/blink/renderer/core/css/affected_by_pseudo_test.cc
index 980fec89..3893536 100644
--- a/third_party/blink/renderer/core/css/affected_by_pseudo_test.cc
+++ b/third_party/blink/renderer/core/css/affected_by_pseudo_test.cc
@@ -16,7 +16,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 class AffectedByPseudoTest : public PageTestBase {
  protected:
@@ -57,11 +57,11 @@
 // ":focus div" will mark ascendants of all divs with
 // childrenOrSiblingsAffectedByFocus.
 TEST_F(AffectedByPseudoTest, FocusedAscendant) {
-  ElementResult expected[] = {{bodyTag, true},
-                              {divTag, true},
-                              {divTag, false},
-                              {divTag, false},
-                              {spanTag, false}};
+  ElementResult expected[] = {{kBodyTag, true},
+                              {kDivTag, true},
+                              {kDivTag, false},
+                              {kDivTag, false},
+                              {kSpanTag, false}};
 
   SetHtmlInnerHTML(R"HTML(
     <head>
@@ -79,11 +79,11 @@
 // "body:focus div" will mark the body element with
 // childrenOrSiblingsAffectedByFocus.
 TEST_F(AffectedByPseudoTest, FocusedAscendantWithType) {
-  ElementResult expected[] = {{bodyTag, true},
-                              {divTag, false},
-                              {divTag, false},
-                              {divTag, false},
-                              {spanTag, false}};
+  ElementResult expected[] = {{kBodyTag, true},
+                              {kDivTag, false},
+                              {kDivTag, false},
+                              {kDivTag, false},
+                              {kSpanTag, false}};
 
   SetHtmlInnerHTML(R"HTML(
     <head>
@@ -104,11 +104,11 @@
 // is checked and the childrenOrSiblingsAffectedByFocus flag set before the
 // negated type selector is found.
 TEST_F(AffectedByPseudoTest, FocusedAscendantWithNegatedType) {
-  ElementResult expected[] = {{bodyTag, false},
-                              {divTag, true},
-                              {divTag, false},
-                              {divTag, false},
-                              {spanTag, false}};
+  ElementResult expected[] = {{kBodyTag, false},
+                              {kDivTag, true},
+                              {kDivTag, false},
+                              {kDivTag, false},
+                              {kSpanTag, false}};
 
   SetHtmlInnerHTML(R"HTML(
     <head>
@@ -131,7 +131,7 @@
 // makes sure the sibling also gets its styles recalculated.
 TEST_F(AffectedByPseudoTest, FocusedSibling) {
   ElementResult expected[] = {
-      {bodyTag, false}, {divTag, true}, {spanTag, false}, {divTag, false}};
+      {kBodyTag, false}, {kDivTag, true}, {kSpanTag, false}, {kDivTag, false}};
 
   SetHtmlInnerHTML(R"HTML(
     <head>
diff --git a/third_party/blink/renderer/core/css/css_default_style_sheets.cc b/third_party/blink/renderer/core/css/css_default_style_sheets.cc
index 9f56557..50a7bfd37 100644
--- a/third_party/blink/renderer/core/css/css_default_style_sheets.cc
+++ b/third_party/blink/renderer/core/css/css_default_style_sheets.cc
@@ -43,8 +43,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 CSSDefaultStyleSheets& CSSDefaultStyleSheets::Instance() {
   DEFINE_STATIC_LOCAL(Persistent<CSSDefaultStyleSheets>,
                       css_default_style_sheets, (new CSSDefaultStyleSheets));
diff --git a/third_party/blink/renderer/core/css/css_selector.cc b/third_party/blink/renderer/core/css/css_selector.cc
index 37b1d60b..3402dc1 100644
--- a/third_party/blink/renderer/core/css/css_selector.cc
+++ b/third_party/blink/renderer/core/css/css_selector.cc
@@ -44,8 +44,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 struct SameSizeAsCSSSelector {
   unsigned bitfields;
   void* pointers[1];
diff --git a/third_party/blink/renderer/core/css/css_selector_watch_test.cc b/third_party/blink/renderer/core/css/css_selector_watch_test.cc
index 4bb106de..4e27ee1d 100644
--- a/third_party/blink/renderer/core/css/css_selector_watch_test.cc
+++ b/third_party/blink/renderer/core/css/css_selector_watch_test.cc
@@ -64,9 +64,9 @@
   ASSERT_TRUE(y);
   ASSERT_TRUE(z);
 
-  x->removeAttribute(HTMLNames::classAttr);
-  y->removeAttribute(HTMLNames::classAttr);
-  z->setAttribute(HTMLNames::classAttr, "c");
+  x->removeAttribute(html_names::kClassAttr);
+  y->removeAttribute(html_names::kClassAttr);
+  z->setAttribute(html_names::kClassAttr, "c");
 
   ClearAddedRemoved(watch);
 
diff --git a/third_party/blink/renderer/core/css/css_style_sheet.cc b/third_party/blink/renderer/core/css/css_style_sheet.cc
index b564ea1..b82f662 100644
--- a/third_party/blink/renderer/core/css/css_style_sheet.cc
+++ b/third_party/blink/renderer/core/css/css_style_sheet.cc
@@ -47,7 +47,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 class StyleSheetCSSRuleList final : public CSSRuleList {
  public:
@@ -551,7 +551,7 @@
 bool CSSStyleSheet::IsAlternate() const {
   if (owner_node_) {
     return owner_node_->IsElementNode() &&
-           ToElement(owner_node_)->getAttribute(relAttr).Contains("alternate");
+           ToElement(owner_node_)->getAttribute(kRelAttr).Contains("alternate");
   }
   return alternate_from_constructor_;
 }
diff --git a/third_party/blink/renderer/core/css/property_registration.cc b/third_party/blink/renderer/core/css/property_registration.cc
index 23382173..4605268 100644
--- a/third_party/blink/renderer/core/css/property_registration.cc
+++ b/third_party/blink/renderer/core/css/property_registration.cc
@@ -146,8 +146,8 @@
           "The initial value provided is not computationally independent.");
       return;
     }
-    initial =
-        &StyleBuilderConverter::ConvertRegisteredPropertyInitialValue(*initial);
+    initial = &StyleBuilderConverter::ConvertRegisteredPropertyInitialValue(
+        *document, *initial);
     initial_variable_data = CSSVariableData::Create(
         CSSParserTokenRange(tokens), is_animation_tainted, false,
         parser_context->BaseURL(), parser_context->Charset());
diff --git a/third_party/blink/renderer/core/css/resolver/selector_filter_parent_scope_test.cc b/third_party/blink/renderer/core/css/resolver/selector_filter_parent_scope_test.cc
index 9382d366..efcf3df 100644
--- a/third_party/blink/renderer/core/css/resolver/selector_filter_parent_scope_test.cc
+++ b/third_party/blink/renderer/core/css/resolver/selector_filter_parent_scope_test.cc
@@ -26,7 +26,7 @@
 };
 
 TEST_F(SelectorFilterParentScopeTest, ParentScope) {
-  GetDocument().body()->setAttribute(HTMLNames::classAttr, "match");
+  GetDocument().body()->setAttribute(html_names::kClassAttr, "match");
   GetDocument().documentElement()->SetIdAttribute("myId");
   SelectorFilter& filter =
       GetDocument().EnsureStyleResolver().GetSelectorFilter();
diff --git a/third_party/blink/renderer/core/css/resolver/style_adjuster.cc b/third_party/blink/renderer/core/css/resolver/style_adjuster.cc
index e415942..0b552a6 100644
--- a/third_party/blink/renderer/core/css/resolver/style_adjuster.cc
+++ b/third_party/blink/renderer/core/css/resolver/style_adjuster.cc
@@ -63,8 +63,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 namespace {
 
 TouchAction AdjustTouchActionForElement(TouchAction touch_action,
diff --git a/third_party/blink/renderer/core/css/resolver/style_adjuster_test.cc b/third_party/blink/renderer/core/css/resolver/style_adjuster_test.cc
index 6521f2f0..571ed22f 100644
--- a/third_party/blink/renderer/core/css/resolver/style_adjuster_test.cc
+++ b/third_party/blink/renderer/core/css/resolver/style_adjuster_test.cc
@@ -34,7 +34,7 @@
             target->GetComputedStyle()->GetEffectiveTouchAction());
 
   Element* owner = GetDocument().getElementById("owner");
-  owner->setAttribute(HTMLNames::styleAttr, "touch-action: auto");
+  owner->setAttribute(html_names::kStyleAttr, "touch-action: auto");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(TouchAction::kTouchActionPinchZoom,
             target->GetComputedStyle()->GetEffectiveTouchAction());
@@ -72,14 +72,14 @@
             target->GetComputedStyle()->GetEffectiveTouchAction());
 
   Element* ancestor = GetDocument().getElementById("ancestor");
-  ancestor->setAttribute(HTMLNames::styleAttr, "touch-action: pan-y");
+  ancestor->setAttribute(html_names::kStyleAttr, "touch-action: pan-y");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(TouchAction::kTouchActionPanY,
             target->GetComputedStyle()->GetEffectiveTouchAction());
 
   Element* potential_scroller =
       GetDocument().getElementById("potential-scroller");
-  potential_scroller->setAttribute(HTMLNames::styleAttr, "overflow: scroll");
+  potential_scroller->setAttribute(html_names::kStyleAttr, "overflow: scroll");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(TouchAction::kTouchActionPan,
             target->GetComputedStyle()->GetEffectiveTouchAction());
@@ -100,7 +100,7 @@
             target->GetComputedStyle()->GetEffectiveTouchAction());
 
   Element* parent = GetDocument().getElementById("parent");
-  parent->setAttribute(HTMLNames::styleAttr, "touch-action: auto");
+  parent->setAttribute(html_names::kStyleAttr, "touch-action: auto");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(TouchAction::kTouchActionPanX,
             target->GetComputedStyle()->GetEffectiveTouchAction());
diff --git a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
index 4726b0662..375ed22 100644
--- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
+++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
@@ -1665,6 +1665,7 @@
 }
 
 static const CSSValue& ComputeRegisteredPropertyValue(
+    const Document& document,
     const CSSToLengthConversionData& css_to_length_conversion_data,
     const CSSValue& value) {
   // TODO(timloh): Images values can also contain lengths.
@@ -1674,7 +1675,7 @@
         CSSFunctionValue::Create(function_value.FunctionType());
     for (const CSSValue* inner_value : ToCSSValueList(value)) {
       new_function->Append(ComputeRegisteredPropertyValue(
-          css_to_length_conversion_data, *inner_value));
+          document, css_to_length_conversion_data, *inner_value));
     }
     return *new_function;
   }
@@ -1684,7 +1685,7 @@
     CSSValueList* new_list = CSSValueList::CreateWithSeparatorFrom(old_list);
     for (const CSSValue* inner_value : old_list) {
       new_list->Append(ComputeRegisteredPropertyValue(
-          css_to_length_conversion_data, *inner_value));
+          document, css_to_length_conversion_data, *inner_value));
     }
     return *new_list;
   }
@@ -1713,20 +1714,40 @@
       auto unit_type = CSSPrimitiveValue::UnitType::kInteger;
       return *CSSPrimitiveValue::Create(std::round(double_value), unit_type);
     }
+
+    if (primitive_value.IsAngle()) {
+      return *CSSPrimitiveValue::Create(primitive_value.ComputeDegrees(),
+                                        CSSPrimitiveValue::UnitType::kDegrees);
+    }
   }
+
+  if (value.IsIdentifierValue()) {
+    const CSSIdentifierValue& identifier_value = ToCSSIdentifierValue(value);
+    CSSValueID value_id = identifier_value.GetValueID();
+    if (value_id == CSSValueCurrentcolor)
+      return value;
+    if (StyleColor::IsColorKeyword(value_id)) {
+      Color color =
+          document.GetTextLinkColors().ColorFromCSSValue(value, Color(), false);
+      return *CSSColorValue::Create(color.Rgb());
+    }
+  }
+
   return value;
 }
 
 const CSSValue& StyleBuilderConverter::ConvertRegisteredPropertyInitialValue(
+    const Document& document,
     const CSSValue& value) {
-  return ComputeRegisteredPropertyValue(CSSToLengthConversionData(), value);
+  return ComputeRegisteredPropertyValue(document, CSSToLengthConversionData(),
+                                        value);
 }
 
 const CSSValue& StyleBuilderConverter::ConvertRegisteredPropertyValue(
     const StyleResolverState& state,
     const CSSValue& value) {
-  return ComputeRegisteredPropertyValue(state.CssToLengthConversionData(),
-                                        value);
+  return ComputeRegisteredPropertyValue(
+      state.GetDocument(), state.CssToLengthConversionData(), value);
 }
 
 const CSSToLengthConversionData&
diff --git a/third_party/blink/renderer/core/css/resolver/style_builder_converter.h b/third_party/blink/renderer/core/css/resolver/style_builder_converter.h
index 5e15ea4..e0d2e7b 100644
--- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.h
+++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.h
@@ -254,7 +254,8 @@
   static Length ConvertPositionLength(StyleResolverState&, const CSSValue&);
   static Rotation ConvertRotation(const CSSValue&);
 
-  static const CSSValue& ConvertRegisteredPropertyInitialValue(const CSSValue&);
+  static const CSSValue& ConvertRegisteredPropertyInitialValue(const Document&,
+                                                               const CSSValue&);
   static const CSSValue& ConvertRegisteredPropertyValue(
       const StyleResolverState&,
       const CSSValue&);
diff --git a/third_party/blink/renderer/core/css/resolver/style_resolver.cc b/third_party/blink/renderer/core/css/resolver/style_resolver.cc
index f036a58..9163005 100644
--- a/third_party/blink/renderer/core/css/resolver/style_resolver.cc
+++ b/third_party/blink/renderer/core/css/resolver/style_resolver.cc
@@ -114,7 +114,7 @@
 
 }  // namespace
 
-using namespace HTMLNames;
+using namespace html_names;
 
 ComputedStyle* StyleResolver::style_not_yet_available_;
 
@@ -741,7 +741,7 @@
                   matching_behavior != kMatchAllRulesExcludingSMIL);
 
     // TODO(dominicc): Remove this counter when Issue 590014 is fixed.
-    if (element->HasTagName(HTMLNames::summaryTag)) {
+    if (element->HasTagName(html_names::kSummaryTag)) {
       MatchedPropertiesRange matched_range =
           collector.MatchedResult().AuthorRules();
       for (const auto& matched : matched_range) {
diff --git a/third_party/blink/renderer/core/css/rule_set.cc b/third_party/blink/renderer/core/css/rule_set.cc
index b40527e..d5c8b79 100644
--- a/third_party/blink/renderer/core/css/rule_set.cc
+++ b/third_party/blink/renderer/core/css/rule_set.cc
@@ -46,8 +46,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 static inline PropertyWhitelistType DeterminePropertyWhitelistType(
     const AddRuleFlags add_rule_flags,
     const CSSSelector& selector) {
diff --git a/third_party/blink/renderer/core/css/selector_checker.cc b/third_party/blink/renderer/core/css/selector_checker.cc
index 0eb74ca9..ed9091d 100644
--- a/third_party/blink/renderer/core/css/selector_checker.cc
+++ b/third_party/blink/renderer/core/css/selector_checker.cc
@@ -66,8 +66,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 static bool IsFrameFocused(const Element& element) {
   return element.GetDocument().GetFrame() && element.GetDocument()
                                                  .GetFrame()
diff --git a/third_party/blink/renderer/core/css/selector_query.cc b/third_party/blink/renderer/core/css/selector_query.cc
index fa10f0d..642f0b61 100644
--- a/third_party/blink/renderer/core/css/selector_query.cc
+++ b/third_party/blink/renderer/core/css/selector_query.cc
@@ -46,7 +46,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 #if DCHECK_IS_ON() || defined(RELEASE_QUERY_STATS)
 static SelectorQuery::QueryStats& CurrentQueryStats() {
@@ -503,7 +503,7 @@
       // We only use the fast path when in standards mode where #id selectors
       // are case sensitive, so we need the same behavior for [id=value].
       if (current->Match() == CSSSelector::kAttributeExact &&
-          current->Attribute() == idAttr &&
+          current->Attribute() == kIdAttr &&
           current->AttributeMatch() == CSSSelector::kCaseSensitive) {
         selector_id_ = current->Value();
         break;
diff --git a/third_party/blink/renderer/core/css/selector_query_test.cc b/third_party/blink/renderer/core/css/selector_query_test.cc
index 9ad67cb1..db7b911 100644
--- a/third_party/blink/renderer/core/css/selector_query_test.cc
+++ b/third_party/blink/renderer/core/css/selector_query_test.cc
@@ -330,7 +330,7 @@
 
 TEST(SelectorQueryTest, DisconnectedSubtree) {
   Document* document = HTMLDocument::CreateForTest();
-  Element* scope = document->CreateRawElement(HTMLNames::divTag);
+  Element* scope = document->CreateRawElement(html_names::kDivTag);
   scope->SetInnerHTMLFromString(R"HTML(
     <section>
       <span id=first>
@@ -357,7 +357,7 @@
 
 TEST(SelectorQueryTest, DisconnectedTreeScope) {
   Document* document = HTMLDocument::CreateForTest();
-  Element* host = document->CreateRawElement(HTMLNames::divTag);
+  Element* host = document->CreateRawElement(html_names::kDivTag);
   ShadowRoot& shadowRoot =
       host->AttachShadowRootInternal(ShadowRootType::kOpen);
   shadowRoot.SetInnerHTMLFromString(R"HTML(
diff --git a/third_party/blink/renderer/core/css/shadow_tree_style_sheet_collection.cc b/third_party/blink/renderer/core/css/shadow_tree_style_sheet_collection.cc
index 4c8a1575..8a8867a 100644
--- a/third_party/blink/renderer/core/css/shadow_tree_style_sheet_collection.cc
+++ b/third_party/blink/renderer/core/css/shadow_tree_style_sheet_collection.cc
@@ -40,8 +40,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 ShadowTreeStyleSheetCollection::ShadowTreeStyleSheetCollection(
     ShadowRoot& shadow_root)
     : TreeScopeStyleSheetCollection(shadow_root) {}
diff --git a/third_party/blink/renderer/core/css/style_attribute_mutation_scope.cc b/third_party/blink/renderer/core/css/style_attribute_mutation_scope.cc
index d9050cb..58ff83c 100644
--- a/third_party/blink/renderer/core/css/style_attribute_mutation_scope.cc
+++ b/third_party/blink/renderer/core/css/style_attribute_mutation_scope.cc
@@ -68,21 +68,21 @@
 
   mutation_recipients_ =
       MutationObserverInterestGroup::CreateForAttributesMutation(
-          *current_decl_->ParentElement(), HTMLNames::styleAttr);
+          *current_decl_->ParentElement(), html_names::kStyleAttr);
   bool should_read_old_value =
       (mutation_recipients_ && mutation_recipients_->IsOldValueRequested()) ||
       DefinitionIfStyleChangedCallback(current_decl_->ParentElement());
 
   if (should_read_old_value) {
     old_value_ =
-        current_decl_->ParentElement()->getAttribute(HTMLNames::styleAttr);
+        current_decl_->ParentElement()->getAttribute(html_names::kStyleAttr);
   }
 
   if (mutation_recipients_) {
     AtomicString requested_old_value =
         mutation_recipients_->IsOldValueRequested() ? old_value_ : g_null_atom;
     mutation_ = MutationRecord::CreateAttributes(current_decl_->ParentElement(),
-                                                 HTMLNames::styleAttr,
+                                                 html_names::kStyleAttr,
                                                  requested_old_value);
   }
 }
@@ -101,8 +101,8 @@
     if (CustomElementDefinition* definition =
             DefinitionIfStyleChangedCallback(element)) {
       definition->EnqueueAttributeChangedCallback(
-          element, HTMLNames::styleAttr, old_value_,
-          element->getAttribute(HTMLNames::styleAttr));
+          element, html_names::kStyleAttr, old_value_,
+          element->getAttribute(html_names::kStyleAttr));
     }
 
     should_deliver_ = false;
diff --git a/third_party/blink/renderer/core/css/style_engine.cc b/third_party/blink/renderer/core/css/style_engine.cc
index 3a76d08..ab882ee7 100644
--- a/third_party/blink/renderer/core/css/style_engine.cc
+++ b/third_party/blink/renderer/core/css/style_engine.cc
@@ -68,8 +68,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 StyleEngine::StyleEngine(Document& document)
     : document_(&document),
       is_master_(!document.IsHTMLImport()),
@@ -919,7 +917,7 @@
     return;
   element.SetNeedsStyleRecalc(
       kLocalStyleChange,
-      StyleChangeReasonForTracing::FromAttribute(HTMLNames::partAttr));
+      StyleChangeReasonForTracing::FromAttribute(html_names::kPartAttr));
 }
 
 void StyleEngine::ExportpartsChangedForElement(Element& element) {
diff --git a/third_party/blink/renderer/core/css/style_engine_test.cc b/third_party/blink/renderer/core/css/style_engine_test.cc
index d0b65781..427fd27 100644
--- a/third_party/blink/renderer/core/css/style_engine_test.cc
+++ b/third_party/blink/renderer/core/css/style_engine_test.cc
@@ -871,7 +871,7 @@
   unsigned before_count = GetStyleEngine().StyleForElementCount();
 
   Element* s1 = GetDocument().getElementById("s1");
-  s1->setAttribute(blink::HTMLNames::mediaAttr, "(max-width: 2000px)");
+  s1->setAttribute(blink::html_names::kMediaAttr, "(max-width: 2000px)");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   unsigned after_count = GetStyleEngine().StyleForElementCount();
@@ -897,7 +897,7 @@
   unsigned before_count = GetStyleEngine().StyleForElementCount();
 
   Element* s1 = GetDocument().getElementById("s1");
-  s1->setAttribute(blink::HTMLNames::mediaAttr, "(max-width: 2000px)");
+  s1->setAttribute(blink::html_names::kMediaAttr, "(max-width: 2000px)");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   unsigned after_count = GetStyleEngine().StyleForElementCount();
@@ -995,7 +995,7 @@
   ASSERT_TRUE(t2);
 
   // Sanity test.
-  t1->setAttribute(blink::HTMLNames::classAttr, "t1");
+  t1->setAttribute(blink::html_names::kClassAttr, "t1");
   EXPECT_FALSE(GetDocument().NeedsStyleInvalidation());
   EXPECT_TRUE(GetDocument().ChildNeedsStyleInvalidation());
   EXPECT_TRUE(t1->NeedsStyleInvalidation());
@@ -1011,7 +1011,7 @@
 
   // Check that no invalidations sets are scheduled when the document node is
   // already SubtreeStyleChange.
-  t2->setAttribute(blink::HTMLNames::classAttr, "t2");
+  t2->setAttribute(blink::html_names::kClassAttr, "t2");
   EXPECT_FALSE(GetDocument().NeedsStyleInvalidation());
   EXPECT_FALSE(GetDocument().ChildNeedsStyleInvalidation());
 
diff --git a/third_party/blink/renderer/core/css/style_sheet_candidate.cc b/third_party/blink/renderer/core/css/style_sheet_candidate.cc
index 5bd16a9..321f00c 100644
--- a/third_party/blink/renderer/core/css/style_sheet_candidate.cc
+++ b/third_party/blink/renderer/core/css/style_sheet_candidate.cc
@@ -37,10 +37,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 AtomicString StyleSheetCandidate::Title() const {
-  return IsElement() ? ToElement(GetNode()).FastGetAttribute(titleAttr)
+  return IsElement() ? ToElement(GetNode()).FastGetAttribute(kTitleAttr)
                      : g_null_atom;
 }
 
diff --git a/third_party/blink/renderer/core/css/style_sheet_list.cc b/third_party/blink/renderer/core/css/style_sheet_list.cc
index 3045da40d..58d4fab2f 100644
--- a/third_party/blink/renderer/core/css/style_sheet_list.cc
+++ b/third_party/blink/renderer/core/css/style_sheet_list.cc
@@ -29,8 +29,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 StyleSheetList* StyleSheetList::Create() {
   DCHECK(RuntimeEnabledFeatures::ConstructableStylesheetsEnabled());
   return new StyleSheetList();
diff --git a/third_party/blink/renderer/core/css/style_traversal_root_test.cc b/third_party/blink/renderer/core/css/style_traversal_root_test.cc
index d743878..cfeaf500 100644
--- a/third_party/blink/renderer/core/css/style_traversal_root_test.cc
+++ b/third_party/blink/renderer/core/css/style_traversal_root_test.cc
@@ -51,7 +51,7 @@
     document_ = Document::CreateForTest();
     elements_ = new HeapVector<Member<Element>, 7>;
     for (size_t i = 0; i < kElementCount; i++) {
-      elements_->push_back(GetDocument().CreateRawElement(HTMLNames::divTag));
+      elements_->push_back(GetDocument().CreateRawElement(html_names::kDivTag));
     }
     GetDocument().appendChild(DivElement(kA));
     DivElement(kA)->appendChild(DivElement(kB));
diff --git a/third_party/blink/renderer/core/dom/attr.cc b/third_party/blink/renderer/core/dom/attr.cc
index 25afd5d..392a07f 100644
--- a/third_party/blink/renderer/core/dom/attr.cc
+++ b/third_party/blink/renderer/core/dom/attr.cc
@@ -34,8 +34,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 Attr::Attr(Element& element, const QualifiedName& name)
     : Node(&element.GetDocument(), kCreateOther),
       element_(&element),
diff --git a/third_party/blink/renderer/core/dom/container_node.cc b/third_party/blink/renderer/core/dom/container_node.cc
index 5b6cf73..8021ceb 100644
--- a/third_party/blink/renderer/core/dom/container_node.cc
+++ b/third_party/blink/renderer/core/dom/container_node.cc
@@ -63,8 +63,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 static void DispatchChildInsertionEvents(Node&);
 static void DispatchChildRemovalEvents(Node&);
 
diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc
index f79c16c..418579ac 100644
--- a/third_party/blink/renderer/core/dom/document.cc
+++ b/third_party/blink/renderer/core/dom/document.cc
@@ -298,7 +298,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 class DocumentOutliveTimeReporter : public BlinkGCObserver {
  public:
@@ -896,7 +896,7 @@
 Element* Document::CreateRawElement(const QualifiedName& qname,
                                     CreateElementFlags flags) {
   Element* element = nullptr;
-  if (qname.NamespaceURI() == HTMLNames::xhtmlNamespaceURI) {
+  if (qname.NamespaceURI() == html_names::xhtmlNamespaceURI) {
     // https://html.spec.whatwg.org/multipage/dom.html#elements-in-the-dom:element-interface
     element = HTMLElementFactory::Create(qname.LocalName(), *this, flags);
     if (!element) {
@@ -942,13 +942,14 @@
     if (CustomElement::ShouldCreateCustomElement(local_name)) {
       return CustomElement::CreateCustomElement(
           *this,
-          QualifiedName(g_null_atom, local_name, HTMLNames::xhtmlNamespaceURI),
+          QualifiedName(g_null_atom, local_name, html_names::xhtmlNamespaceURI),
           CreateElementFlags::ByCreateElement());
     }
     if (auto* element = HTMLElementFactory::Create(
             local_name, *this, CreateElementFlags::ByCreateElement()))
       return element;
-    QualifiedName q_name(g_null_atom, local_name, HTMLNames::xhtmlNamespaceURI);
+    QualifiedName q_name(g_null_atom, local_name,
+                         html_names::xhtmlNamespaceURI);
     if (RegistrationContext() && V0CustomElement::IsValidName(local_name))
       return RegistrationContext()->CreateCustomTagElement(*this, q_name);
     return HTMLUnknownElement::Create(q_name, *this);
@@ -1000,7 +1001,7 @@
   const AtomicString& converted_local_name = ConvertLocalName(local_name);
   QualifiedName q_name(g_null_atom, converted_local_name,
                        IsXHTMLDocument() || IsHTMLDocument()
-                           ? HTMLNames::xhtmlNamespaceURI
+                           ? html_names::xhtmlNamespaceURI
                            : g_null_atom);
 
   bool is_v1 = string_or_options.IsDictionary() || !RegistrationContext();
@@ -1021,7 +1022,7 @@
 
   // 8. If 'is' is non-null, set 'is' attribute
   if (!is_v1 && !is.IsEmpty())
-    element->setAttribute(HTMLNames::isAttr, is);
+    element->setAttribute(html_names::kIsAttr, is);
 
   return element;
 }
@@ -1104,7 +1105,7 @@
 
   // 4. If 'is' is non-null, set 'is' attribute
   if (!is_v1 && !is.IsEmpty())
-    element->setAttribute(HTMLNames::isAttr, is);
+    element->setAttribute(html_names::kIsAttr, is);
 
   return element;
 }
@@ -1116,7 +1117,7 @@
                                  const AtomicString& is) {
   CustomElementDefinition* definition = nullptr;
   if (flags.IsCustomElementsV1() &&
-      q_name.NamespaceURI() == HTMLNames::xhtmlNamespaceURI) {
+      q_name.NamespaceURI() == html_names::xhtmlNamespaceURI) {
     const CustomElementDescriptor desc(is.IsNull() ? q_name.LocalName() : is,
                                        q_name.LocalName());
     if (CustomElementRegistry* registry = CustomElement::Registry(*this))
@@ -4113,12 +4114,12 @@
        base && (!href || !target);
        base = Traversal<HTMLBaseElement>::Next(*base)) {
     if (!href) {
-      const AtomicString& value = base->FastGetAttribute(hrefAttr);
+      const AtomicString& value = base->FastGetAttribute(kHrefAttr);
       if (!value.IsNull())
         href = &value;
     }
     if (!target) {
-      const AtomicString& value = base->FastGetAttribute(targetAttr);
+      const AtomicString& value = base->FastGetAttribute(kTargetAttr);
       if (!value.IsNull())
         target = &value;
     }
@@ -5307,12 +5308,12 @@
   // check before each call.
   if (margin_width != owner->MarginWidth()) {
     if (auto* body_element = body()) {
-      body_element->SetIntegralAttribute(marginwidthAttr, margin_width);
+      body_element->SetIntegralAttribute(kMarginwidthAttr, margin_width);
     }
   }
   if (margin_height != owner->MarginHeight()) {
     if (auto* body_element = body()) {
-      body_element->SetIntegralAttribute(marginheightAttr, margin_height);
+      body_element->SetIntegralAttribute(kMarginheightAttr, margin_height);
     }
   }
   if (scrolling_mode != owner->ScrollingMode() && View()) {
@@ -7248,48 +7249,48 @@
 }
 
 const AtomicString& Document::bgColor() const {
-  return BodyAttributeValue(bgcolorAttr);
+  return BodyAttributeValue(kBgcolorAttr);
 }
 
 void Document::setBgColor(const AtomicString& value) {
   if (!IsFrameSet())
-    SetBodyAttribute(bgcolorAttr, value);
+    SetBodyAttribute(kBgcolorAttr, value);
 }
 
 const AtomicString& Document::fgColor() const {
-  return BodyAttributeValue(textAttr);
+  return BodyAttributeValue(kTextAttr);
 }
 
 void Document::setFgColor(const AtomicString& value) {
   if (!IsFrameSet())
-    SetBodyAttribute(textAttr, value);
+    SetBodyAttribute(kTextAttr, value);
 }
 
 const AtomicString& Document::alinkColor() const {
-  return BodyAttributeValue(alinkAttr);
+  return BodyAttributeValue(kAlinkAttr);
 }
 
 void Document::setAlinkColor(const AtomicString& value) {
   if (!IsFrameSet())
-    SetBodyAttribute(alinkAttr, value);
+    SetBodyAttribute(kAlinkAttr, value);
 }
 
 const AtomicString& Document::linkColor() const {
-  return BodyAttributeValue(linkAttr);
+  return BodyAttributeValue(kLinkAttr);
 }
 
 void Document::setLinkColor(const AtomicString& value) {
   if (!IsFrameSet())
-    SetBodyAttribute(linkAttr, value);
+    SetBodyAttribute(kLinkAttr, value);
 }
 
 const AtomicString& Document::vlinkColor() const {
-  return BodyAttributeValue(vlinkAttr);
+  return BodyAttributeValue(kVlinkAttr);
 }
 
 void Document::setVlinkColor(const AtomicString& value) {
   if (!IsFrameSet())
-    SetBodyAttribute(vlinkAttr, value);
+    SetBodyAttribute(kVlinkAttr, value);
 }
 
 template <unsigned type>
diff --git a/third_party/blink/renderer/core/dom/document_statistics_collector.cc b/third_party/blink/renderer/core/dom/document_statistics_collector.cc
index de59cff2..6be49cd 100644
--- a/third_party/blink/renderer/core/dom/document_statistics_collector.cc
+++ b/third_party/blink/renderer/core/dom/document_statistics_collector.cc
@@ -21,7 +21,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 namespace {
 
@@ -124,19 +124,19 @@
 
     features.element_count++;
     Element& element = ToElement(node);
-    if (element.HasTagName(aTag)) {
+    if (element.HasTagName(kATag)) {
       features.anchor_count++;
-    } else if (element.HasTagName(formTag)) {
+    } else if (element.HasTagName(kFormTag)) {
       features.form_count++;
-    } else if (element.HasTagName(inputTag)) {
+    } else if (element.HasTagName(kInputTag)) {
       const HTMLInputElement& input = ToHTMLInputElement(element);
-      if (input.type() == InputTypeNames::text) {
+      if (input.type() == input_type_names::kText) {
         features.text_input_count++;
-      } else if (input.type() == InputTypeNames::password) {
+      } else if (input.type() == input_type_names::kPassword) {
         features.password_input_count++;
       }
-    } else if (element.HasTagName(pTag) || element.HasTagName(preTag)) {
-      if (element.HasTagName(pTag)) {
+    } else if (element.HasTagName(kPTag) || element.HasTagName(kPreTag)) {
+      if (element.HasTagName(kPTag)) {
         features.p_count++;
       } else {
         features.pre_count++;
@@ -156,7 +156,7 @@
         features.moz_score_all_linear = std::min(features.moz_score_all_linear,
                                                  kMozScoreAllLinearSaturation);
       }
-    } else if (element.HasTagName(liTag)) {
+    } else if (element.HasTagName(kLiTag)) {
       is_list_item = true;
     }
     CollectFeatures(element, features, under_list_item || is_list_item);
diff --git a/third_party/blink/renderer/core/dom/document_test.cc b/third_party/blink/renderer/core/dom/document_test.cc
index 45b2278..8f632ab 100644
--- a/third_party/blink/renderer/core/dom/document_test.cc
+++ b/third_party/blink/renderer/core/dom/document_test.cc
@@ -357,8 +357,8 @@
   Document& doc = GetDocument();
   {
     DocumentFragment* fragment = DocumentFragment::Create(doc);
-    fragment->appendChild(Element::Create(HTMLNames::divTag, &doc));
-    fragment->appendChild(Element::Create(HTMLNames::spanTag, &doc));
+    fragment->appendChild(Element::Create(html_names::kDivTag, &doc));
+    fragment->appendChild(Element::Create(html_names::kSpanTag, &doc));
     uint64_t original_version = doc.DomTreeVersion();
     fragment->RemoveChildren();
     EXPECT_EQ(original_version + 1, doc.DomTreeVersion())
@@ -367,8 +367,8 @@
 
   {
     DocumentFragment* fragment = DocumentFragment::Create(doc);
-    Node* child = Element::Create(HTMLNames::divTag, &doc);
-    child->appendChild(Element::Create(HTMLNames::spanTag, &doc));
+    Node* child = Element::Create(html_names::kDivTag, &doc);
+    child->appendChild(Element::Create(html_names::kSpanTag, &doc));
     fragment->appendChild(child);
     uint64_t original_version = doc.DomTreeVersion();
     fragment->removeChild(child);
@@ -417,50 +417,50 @@
 
   // Check that we use the first manifest with <link rel=manifest>
   auto* link = HTMLLinkElement::Create(GetDocument(), CreateElementFlags());
-  link->setAttribute(blink::HTMLNames::relAttr, "manifest");
-  link->setAttribute(blink::HTMLNames::hrefAttr, "foo.json");
+  link->setAttribute(blink::html_names::kRelAttr, "manifest");
+  link->setAttribute(blink::html_names::kHrefAttr, "foo.json");
   GetDocument().head()->AppendChild(link);
   EXPECT_EQ(link, GetDocument().LinkManifest());
 
   auto* link2 = HTMLLinkElement::Create(GetDocument(), CreateElementFlags());
-  link2->setAttribute(blink::HTMLNames::relAttr, "manifest");
-  link2->setAttribute(blink::HTMLNames::hrefAttr, "bar.json");
+  link2->setAttribute(blink::html_names::kRelAttr, "manifest");
+  link2->setAttribute(blink::html_names::kHrefAttr, "bar.json");
   GetDocument().head()->InsertBefore(link2, link);
   EXPECT_EQ(link2, GetDocument().LinkManifest());
   GetDocument().head()->AppendChild(link2);
   EXPECT_EQ(link, GetDocument().LinkManifest());
 
   // Check that crazy URLs are accepted.
-  link->setAttribute(blink::HTMLNames::hrefAttr, "http:foo.json");
+  link->setAttribute(blink::html_names::kHrefAttr, "http:foo.json");
   EXPECT_EQ(link, GetDocument().LinkManifest());
 
   // Check that empty URLs are accepted.
-  link->setAttribute(blink::HTMLNames::hrefAttr, "");
+  link->setAttribute(blink::html_names::kHrefAttr, "");
   EXPECT_EQ(link, GetDocument().LinkManifest());
 
   // Check that URLs from different origins are accepted.
-  link->setAttribute(blink::HTMLNames::hrefAttr,
+  link->setAttribute(blink::html_names::kHrefAttr,
                      "http://example.org/manifest.json");
   EXPECT_EQ(link, GetDocument().LinkManifest());
-  link->setAttribute(blink::HTMLNames::hrefAttr,
+  link->setAttribute(blink::html_names::kHrefAttr,
                      "http://foo.example.org/manifest.json");
   EXPECT_EQ(link, GetDocument().LinkManifest());
-  link->setAttribute(blink::HTMLNames::hrefAttr,
+  link->setAttribute(blink::html_names::kHrefAttr,
                      "http://foo.bar/manifest.json");
   EXPECT_EQ(link, GetDocument().LinkManifest());
 
   // More than one token in @rel is accepted.
-  link->setAttribute(blink::HTMLNames::relAttr, "foo bar manifest");
+  link->setAttribute(blink::html_names::kRelAttr, "foo bar manifest");
   EXPECT_EQ(link, GetDocument().LinkManifest());
 
   // Such as spaces around the token.
-  link->setAttribute(blink::HTMLNames::relAttr, " manifest ");
+  link->setAttribute(blink::html_names::kRelAttr, " manifest ");
   EXPECT_EQ(link, GetDocument().LinkManifest());
 
   // Check that rel=manifest actually matters.
-  link->setAttribute(blink::HTMLNames::relAttr, "");
+  link->setAttribute(blink::html_names::kRelAttr, "");
   EXPECT_EQ(link2, GetDocument().LinkManifest());
-  link->setAttribute(blink::HTMLNames::relAttr, "manifest");
+  link->setAttribute(blink::html_names::kRelAttr, "manifest");
 
   // Check that link outside of the <head> are ignored.
   GetDocument().head()->RemoveChild(link);
@@ -472,15 +472,15 @@
   GetDocument().head()->AppendChild(link2);
 
   // Check that some attribute values do not have an effect.
-  link->setAttribute(blink::HTMLNames::crossoriginAttr, "use-credentials");
+  link->setAttribute(blink::html_names::kCrossoriginAttr, "use-credentials");
   EXPECT_EQ(link, GetDocument().LinkManifest());
-  link->setAttribute(blink::HTMLNames::hreflangAttr, "klingon");
+  link->setAttribute(blink::html_names::kHreflangAttr, "klingon");
   EXPECT_EQ(link, GetDocument().LinkManifest());
-  link->setAttribute(blink::HTMLNames::typeAttr, "image/gif");
+  link->setAttribute(blink::html_names::kTypeAttr, "image/gif");
   EXPECT_EQ(link, GetDocument().LinkManifest());
-  link->setAttribute(blink::HTMLNames::sizesAttr, "16x16");
+  link->setAttribute(blink::html_names::kSizesAttr, "16x16");
   EXPECT_EQ(link, GetDocument().LinkManifest());
-  link->setAttribute(blink::HTMLNames::mediaAttr, "print");
+  link->setAttribute(blink::html_names::kMediaAttr, "print");
   EXPECT_EQ(link, GetDocument().LinkManifest());
 }
 
@@ -558,19 +558,19 @@
   EXPECT_TRUE(element);
 
   uint64_t previous_style_version = GetDocument().StyleVersion();
-  element->setAttribute(blink::HTMLNames::classAttr, "notfound");
+  element->setAttribute(blink::html_names::kClassAttr, "notfound");
   EXPECT_EQ(previous_style_version, GetDocument().StyleVersion());
 
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   previous_style_version = GetDocument().StyleVersion();
-  element->setAttribute(blink::HTMLNames::classAttr, "a");
+  element->setAttribute(blink::html_names::kClassAttr, "a");
   EXPECT_NE(previous_style_version, GetDocument().StyleVersion());
 
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   previous_style_version = GetDocument().StyleVersion();
-  element->setAttribute(blink::HTMLNames::classAttr, "a b");
+  element->setAttribute(blink::html_names::kClassAttr, "a b");
   EXPECT_NE(previous_style_version, GetDocument().StyleVersion());
 }
 
@@ -620,13 +620,13 @@
   EXPECT_EQ(GetDocument(), observer.LifecycleContext());
   EXPECT_EQ(0, observer.CountContextDestroyedCalled());
 
-  Element* div_node = GetDocument().CreateRawElement(HTMLNames::divTag);
+  Element* div_node = GetDocument().CreateRawElement(html_names::kDivTag);
   GetDocument().body()->AppendChild(div_node);
 
-  Element* bold_node = GetDocument().CreateRawElement(HTMLNames::bTag);
+  Element* bold_node = GetDocument().CreateRawElement(html_names::kBTag);
   div_node->AppendChild(bold_node);
 
-  Element* italic_node = GetDocument().CreateRawElement(HTMLNames::iTag);
+  Element* italic_node = GetDocument().CreateRawElement(html_names::kITag);
   div_node->AppendChild(italic_node);
 
   Node* text_node = GetDocument().createTextNode("0123456789");
@@ -686,7 +686,7 @@
 TEST_F(DocumentTest, SynchronousMutationNotifierMoveTreeToNewDocument) {
   auto& observer = *new TestSynchronousMutationObserver(GetDocument());
 
-  Node* move_sample = GetDocument().CreateRawElement(HTMLNames::divTag);
+  Node* move_sample = GetDocument().CreateRawElement(html_names::kDivTag);
   move_sample->appendChild(GetDocument().createTextNode("a123"));
   move_sample->appendChild(GetDocument().createTextNode("b456"));
   GetDocument().body()->AppendChild(move_sample);
@@ -710,7 +710,8 @@
   auto& observer = *new TestSynchronousMutationObserver(GetDocument());
   Element* const replaced_node = GetDocument().body();
   GetDocument().documentElement()->ReplaceChild(
-      GetDocument().CreateRawElement(HTMLNames::divTag), GetDocument().body());
+      GetDocument().CreateRawElement(html_names::kDivTag),
+      GetDocument().body());
   ASSERT_EQ(2u, observer.ChildrenChangedNodes().size());
   EXPECT_EQ(GetDocument().documentElement(),
             observer.ChildrenChangedNodes()[0]);
@@ -820,9 +821,10 @@
   // true. It's necessary to kick unload process.
   GetDocument().ImplicitOpen(kForceSynchronousParsing);
   GetDocument().CancelParsing();
-  GetDocument().AppendChild(GetDocument().CreateRawElement(HTMLNames::htmlTag));
+  GetDocument().AppendChild(
+      GetDocument().CreateRawElement(html_names::kHTMLTag));
   SetHtmlInnerHTML("<body><input required></body>");
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->setTextContent(
       "window.onunload = function() {"
       "document.querySelector('input').reportValidity(); };");
diff --git a/third_party/blink/renderer/core/dom/dom_implementation.cc b/third_party/blink/renderer/core/dom/dom_implementation.cc
index 7f90997..3dac1a5a 100644
--- a/third_party/blink/renderer/core/dom/dom_implementation.cc
+++ b/third_party/blink/renderer/core/dom/dom_implementation.cc
@@ -86,7 +86,7 @@
       DocumentInit::Create().WithContextDocument(document_->ContextDocument());
   if (namespace_uri == svg_names::kNamespaceURI) {
     doc = XMLDocument::CreateSVG(init);
-  } else if (namespace_uri == HTMLNames::xhtmlNamespaceURI) {
+  } else if (namespace_uri == html_names::xhtmlNamespaceURI) {
     doc = XMLDocument::CreateXHTML(
         init.WithRegistrationContext(document_->RegistrationContext()));
   } else {
diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/renderer/core/dom/element.cc
index 93268fb..71a93b4 100644
--- a/third_party/blink/renderer/core/dom/element.cc
+++ b/third_party/blink/renderer/core/dom/element.cc
@@ -161,7 +161,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 enum class ClassStringContent { kEmpty, kWhiteSpaceOnly, kHasClasses };
 
@@ -213,12 +213,12 @@
 }
 
 void Element::setTabIndex(int value) {
-  SetIntegralAttribute(tabindexAttr, value);
+  SetIntegralAttribute(kTabindexAttr, value);
 }
 
 int Element::tabIndex() const {
   return HasElementFlag(ElementFlags::kTabIndexWasSetExplicitly)
-             ? GetIntegralAttribute(tabindexAttr)
+             ? GetIntegralAttribute(kTabindexAttr)
              : 0;
 }
 
@@ -387,7 +387,7 @@
 inline void Element::SynchronizeAttribute(const QualifiedName& name) const {
   if (!GetElementData())
     return;
-  if (UNLIKELY(name == styleAttr &&
+  if (UNLIKELY(name == kStyleAttr &&
                GetElementData()->style_attribute_is_dirty_)) {
     DCHECK(IsStyledElement());
     SynchronizeStyleAttributeInternal();
@@ -406,7 +406,7 @@
   if (!GetElementData())
     return;
   if (GetElementData()->style_attribute_is_dirty_ &&
-      LowercaseIfNecessary(local_name) == styleAttr.LocalName()) {
+      LowercaseIfNecessary(local_name) == kStyleAttr.LocalName()) {
     DCHECK(IsStyledElement());
     SynchronizeStyleAttributeInternal();
     return;
@@ -1226,7 +1226,7 @@
 }
 
 InvisibleState Element::Invisible() const {
-  const AtomicString& value = FastGetAttribute(invisibleAttr);
+  const AtomicString& value = FastGetAttribute(kInvisibleAttr);
   if (value.IsNull())
     return InvisibleState::kMissing;
   if (EqualIgnoringASCIICase(value, "static"))
@@ -1289,7 +1289,7 @@
   if (RuntimeEnabledFeatures::InvisibleDOMEnabled() &&
       event.type() == EventTypeNames::activateinvisible &&
       event.target() == this) {
-    removeAttribute(invisibleAttr);
+    removeAttribute(kInvisibleAttr);
     event.SetDefaultHandled();
     return;
   }
@@ -1552,7 +1552,7 @@
             *parent_shadow_root, name, params.new_value))
       parent_shadow_root->SetNeedsDistributionRecalc();
   }
-  if (name == HTMLNames::slotAttr && params.old_value != params.new_value) {
+  if (name == html_names::kSlotAttr && params.old_value != params.new_value) {
     if (ShadowRoot* root = V1ShadowRootOfParent())
       root->DidChangeHostChildSlotName(params.old_value, params.new_value);
   }
@@ -1561,7 +1561,7 @@
 
   GetDocument().IncDOMTreeVersion();
 
-  if (name == HTMLNames::idAttr) {
+  if (name == html_names::kIdAttr) {
     AtomicString old_id = GetElementData()->IdForStyleResolution();
     AtomicString new_id = MakeIdForStyleResolution(
         params.new_value, GetDocument().InQuirksMode());
@@ -1569,33 +1569,33 @@
       GetElementData()->SetIdForStyleResolution(new_id);
       GetDocument().GetStyleEngine().IdChangedForElement(old_id, new_id, *this);
     }
-  } else if (name == classAttr) {
+  } else if (name == kClassAttr) {
     ClassAttributeChanged(params.new_value);
     if (HasRareData() && GetElementRareData()->GetClassList()) {
       GetElementRareData()->GetClassList()->DidUpdateAttributeValue(
           params.old_value, params.new_value);
     }
-  } else if (name == HTMLNames::nameAttr) {
+  } else if (name == html_names::kNameAttr) {
     SetHasName(!params.new_value.IsNull());
-  } else if (name == HTMLNames::partAttr) {
+  } else if (name == html_names::kPartAttr) {
     if (RuntimeEnabledFeatures::CSSPartPseudoElementEnabled()) {
       EnsureElementRareData().SetPart(params.new_value);
       GetDocument().GetStyleEngine().PartChangedForElement(*this);
     }
-  } else if (name == HTMLNames::exportpartsAttr) {
+  } else if (name == html_names::kExportpartsAttr) {
     if (RuntimeEnabledFeatures::CSSPartPseudoElementEnabled()) {
       EnsureElementRareData().SetPartNamesMap(params.new_value);
       GetDocument().GetStyleEngine().ExportpartsChangedForElement(*this);
     }
   } else if (IsStyledElement()) {
-    if (name == styleAttr) {
+    if (name == kStyleAttr) {
       StyleAttributeChanged(params.new_value, params.reason);
     } else if (IsPresentationAttribute(name)) {
       GetElementData()->presentation_attribute_style_is_dirty_ = true;
       SetNeedsStyleRecalc(kLocalStyleChange,
                           StyleChangeReasonForTracing::FromAttribute(name));
     } else if (RuntimeEnabledFeatures::InvisibleDOMEnabled() &&
-               name == HTMLNames::invisibleAttr &&
+               name == html_names::kInvisibleAttr &&
                params.old_value != params.new_value) {
       InvisibleAttributeChanged(params.old_value, params.new_value);
     }
@@ -1611,7 +1611,7 @@
   }
 
   if (params.reason == AttributeModificationReason::kDirectly &&
-      name == tabindexAttr && AdjustedFocusedElementInTreeScope() == this) {
+      name == kTabindexAttr && AdjustedFocusedElementInTreeScope() == this) {
     // The attribute change may cause supportsFocus() to return false
     // for the element which had focus.
     //
@@ -1692,7 +1692,7 @@
   const SelectRuleFeatureSet& feature_set =
       shadow_root.V0().EnsureSelectFeatureSet();
 
-  if (name == HTMLNames::idAttr) {
+  if (name == html_names::kIdAttr) {
     AtomicString old_id = GetElementData()->IdForStyleResolution();
     AtomicString new_id =
         MakeIdForStyleResolution(new_value, GetDocument().InQuirksMode());
@@ -1704,7 +1704,7 @@
     }
   }
 
-  if (name == HTMLNames::classAttr) {
+  if (name == html_names::kClassAttr) {
     const AtomicString& new_class_string = new_value;
     if (ClassStringHasClassName(new_class_string) ==
         ClassStringContent::kHasClasses) {
@@ -1832,7 +1832,7 @@
 }
 
 const AtomicString Element::ImageSourceURL() const {
-  return getAttribute(srcAttr);
+  return getAttribute(kSrcAttr);
 }
 
 bool Element::LayoutObjectIsNeeded(const ComputedStyle& style) const {
@@ -2121,7 +2121,7 @@
     element_animations->CssAnimations().ClearPendingUpdate();
 
   if (RuntimeEnabledFeatures::InvisibleDOMEnabled() &&
-      hasAttribute(HTMLNames::invisibleAttr)) {
+      hasAttribute(html_names::kInvisibleAttr)) {
     auto style = ComputedStyle::Create();
     style->SetDisplay(EDisplay::kNone);
     return style;
@@ -2679,16 +2679,17 @@
   // because IsValidName is not cheap.
   return (IsCustomElement() && CustomElement::IsValidName(tag_name)) ||
          (IsV0CustomElement() && V0CustomElement::IsValidName(tag_name)) ||
-         tag_name == HTMLNames::articleTag || tag_name == HTMLNames::asideTag ||
-         tag_name == HTMLNames::blockquoteTag ||
-         tag_name == HTMLNames::bodyTag || tag_name == HTMLNames::divTag ||
-         tag_name == HTMLNames::footerTag || tag_name == HTMLNames::h1Tag ||
-         tag_name == HTMLNames::h2Tag || tag_name == HTMLNames::h3Tag ||
-         tag_name == HTMLNames::h4Tag || tag_name == HTMLNames::h5Tag ||
-         tag_name == HTMLNames::h6Tag || tag_name == HTMLNames::headerTag ||
-         tag_name == HTMLNames::navTag || tag_name == HTMLNames::mainTag ||
-         tag_name == HTMLNames::pTag || tag_name == HTMLNames::sectionTag ||
-         tag_name == HTMLNames::spanTag;
+         tag_name == html_names::kArticleTag ||
+         tag_name == html_names::kAsideTag ||
+         tag_name == html_names::kBlockquoteTag ||
+         tag_name == html_names::kBodyTag || tag_name == html_names::kDivTag ||
+         tag_name == html_names::kFooterTag || tag_name == html_names::kH1Tag ||
+         tag_name == html_names::kH2Tag || tag_name == html_names::kH3Tag ||
+         tag_name == html_names::kH4Tag || tag_name == html_names::kH5Tag ||
+         tag_name == html_names::kH6Tag || tag_name == html_names::kHeaderTag ||
+         tag_name == html_names::kNavTag || tag_name == html_names::kMainTag ||
+         tag_name == html_names::kPTag || tag_name == html_names::kSectionTag ||
+         tag_name == html_names::kSpanTag;
 }
 
 ShadowRoot* Element::attachShadow(const ShadowRootInit& shadow_root_init_dict,
@@ -2966,7 +2967,7 @@
 }
 
 void Element::ParseAttribute(const AttributeModificationParams& params) {
-  if (params.name == tabindexAttr) {
+  if (params.name == kTabindexAttr) {
     int tabindex = 0;
     if (params.new_value.IsEmpty() ||
         !ParseHTMLInteger(params.new_value, tabindex)) {
@@ -3067,7 +3068,7 @@
   AtomicString local_name = LowercaseIfNecessary(name);
   wtf_size_t index = GetElementData()->Attributes().FindIndex(local_name);
   if (index == kNotFound) {
-    if (UNLIKELY(local_name == styleAttr) &&
+    if (UNLIKELY(local_name == kStyleAttr) &&
         GetElementData()->style_attribute_is_dirty_ && IsStyledElement())
       RemoveAllInlineStyleProperties();
     return;
@@ -3683,7 +3684,7 @@
 const AtomicString& Element::ShadowPseudoId() const {
   if (ShadowRoot* root = ContainingShadowRoot()) {
     if (root->IsUserAgent())
-      return FastGetAttribute(pseudoAttr);
+      return FastGetAttribute(kPseudoAttr);
   }
   return g_null_atom;
 }
@@ -3693,7 +3694,7 @@
              CSSSelector::kPseudoWebKitCustomElement ||
          CSSSelector::ParsePseudoType(id, false) ==
              CSSSelector::kPseudoBlinkInternalElement);
-  setAttribute(pseudoAttr, id);
+  setAttribute(kPseudoAttr, id);
 }
 
 bool Element::IsInDescendantTreeOf(const Element* shadow_host) const {
@@ -3825,7 +3826,7 @@
         if (const Attribute* attribute = attributes.Find(xml_names::kLangAttr))
           value = attribute->Value();
         else if (const Attribute* attribute =
-                     attributes.Find(HTMLNames::langAttr))
+                     attributes.Find(html_names::kLangAttr))
           value = attribute->Value();
       }
     } else if (auto* document = DynamicTo<Document>(n)) {
@@ -4110,8 +4111,8 @@
 DOMTokenList& Element::classList() {
   ElementRareData& rare_data = EnsureElementRareData();
   if (!rare_data.GetClassList()) {
-    DOMTokenList* class_list = DOMTokenList::Create(*this, classAttr);
-    class_list->DidUpdateAttributeValue(g_null_atom, getAttribute(classAttr));
+    DOMTokenList* class_list = DOMTokenList::Create(*this, kClassAttr);
+    class_list->DidUpdateAttributeValue(g_null_atom, getAttribute(kClassAttr));
     rare_data.SetClassList(class_list);
   }
   return *rare_data.GetClassList();
@@ -4129,7 +4130,7 @@
   // doesn't <link> implement URLUtils?
   if (IsHTMLAnchorElement(*this) || IsHTMLAreaElement(*this) ||
       IsHTMLLinkElement(*this))
-    return GetURLAttribute(hrefAttr);
+    return GetURLAttribute(kHrefAttr);
   if (auto* svg_a = ToSVGAElementOrNull(*this))
     return svg_a->LegacyHrefURL(GetDocument());
   return KURL();
@@ -4293,7 +4294,7 @@
 }
 
 SpellcheckAttributeState Element::GetSpellcheckAttributeState() const {
-  const AtomicString& value = FastGetAttribute(spellcheckAttr);
+  const AtomicString& value = FastGetAttribute(kSpellcheckAttr);
   if (value == g_null_atom)
     return kSpellcheckAttributeDefault;
   if (DeprecatedEqualIgnoringCase(value, "true") ||
@@ -4326,7 +4327,7 @@
 
 #if DCHECK_IS_ON()
 bool Element::FastAttributeLookupAllowed(const QualifiedName& name) const {
-  if (name == HTMLNames::styleAttr)
+  if (name == html_names::kStyleAttr)
     return false;
 
   if (IsSVGElement())
@@ -4386,7 +4387,7 @@
 void Element::WillModifyAttribute(const QualifiedName& name,
                                   const AtomicString& old_value,
                                   const AtomicString& new_value) {
-  if (name == HTMLNames::nameAttr) {
+  if (name == html_names::kNameAttr) {
     UpdateName(old_value, new_value);
   }
 
@@ -4415,7 +4416,7 @@
 DISABLE_CFI_PERF
 void Element::DidAddAttribute(const QualifiedName& name,
                               const AtomicString& value) {
-  if (name == HTMLNames::idAttr)
+  if (name == html_names::kIdAttr)
     UpdateId(g_null_atom, value);
   AttributeChanged(AttributeModificationParams(
       name, g_null_atom, value, AttributeModificationReason::kDirectly));
@@ -4426,7 +4427,7 @@
 void Element::DidModifyAttribute(const QualifiedName& name,
                                  const AtomicString& old_value,
                                  const AtomicString& new_value) {
-  if (name == HTMLNames::idAttr)
+  if (name == html_names::kIdAttr)
     UpdateId(old_value, new_value);
   AttributeChanged(AttributeModificationParams(
       name, old_value, new_value, AttributeModificationReason::kDirectly));
@@ -4436,7 +4437,7 @@
 
 void Element::DidRemoveAttribute(const QualifiedName& name,
                                  const AtomicString& old_value) {
-  if (name == HTMLNames::idAttr)
+  if (name == html_names::kIdAttr)
     UpdateId(old_value, g_null_atom);
   AttributeChanged(AttributeModificationParams(
       name, old_value, g_null_atom, AttributeModificationReason::kDirectly));
@@ -4485,7 +4486,7 @@
     if (HasID())
       SetIdAttribute(GetIdAttribute());
     if (HasClass())
-      setAttribute(HTMLNames::classAttr, GetClassAttribute());
+      setAttribute(html_names::kClassAttr, GetClassAttribute());
   }
   // TODO(tkent): Even if Documents' modes are same, keeping
   // ShareableElementData owned by old_document isn't right.
@@ -4714,7 +4715,7 @@
   GetElementData()->style_attribute_is_dirty_ = false;
   const CSSPropertyValueSet* inline_style = InlineStyle();
   const_cast<Element*>(this)->SetSynchronizedLazyAttribute(
-      styleAttr,
+      kStyleAttr,
       inline_style ? AtomicString(inline_style->AsText()) : g_empty_atom);
 }
 
@@ -4823,18 +4824,18 @@
 
   if (MutationObserverInterestGroup* recipients =
           MutationObserverInterestGroup::CreateForAttributesMutation(
-              *this, styleAttr)) {
+              *this, kStyleAttr)) {
     // We don't use getAttribute() here to get a style attribute value
     // before the change.
     AtomicString old_value;
     if (const Attribute* attribute =
-            GetElementData()->Attributes().Find(styleAttr))
+            GetElementData()->Attributes().Find(kStyleAttr))
       old_value = attribute->Value();
     recipients->EnqueueMutationRecord(
-        MutationRecord::CreateAttributes(this, styleAttr, old_value));
+        MutationRecord::CreateAttributes(this, kStyleAttr, old_value));
     // Need to synchronize every time so that following MutationRecords will
     // have correct oldValues.
-    SynchronizeAttribute(styleAttr);
+    SynchronizeAttribute(kStyleAttr);
   }
 }
 
diff --git a/third_party/blink/renderer/core/dom/element.h b/third_party/blink/renderer/core/dom/element.h
index 2f99cf9..3ac4fd1 100644
--- a/third_party/blink/renderer/core/dom/element.h
+++ b/third_party/blink/renderer/core/dom/element.h
@@ -1233,23 +1233,23 @@
 }
 
 inline const AtomicString& Element::GetIdAttribute() const {
-  return HasID() ? FastGetAttribute(HTMLNames::idAttr) : g_null_atom;
+  return HasID() ? FastGetAttribute(html_names::kIdAttr) : g_null_atom;
 }
 
 inline const AtomicString& Element::GetNameAttribute() const {
-  return HasName() ? FastGetAttribute(HTMLNames::nameAttr) : g_null_atom;
+  return HasName() ? FastGetAttribute(html_names::kNameAttr) : g_null_atom;
 }
 
 inline const AtomicString& Element::GetClassAttribute() const {
   if (!HasClass())
     return g_null_atom;
   if (IsSVGElement())
-    return getAttribute(HTMLNames::classAttr);
-  return FastGetAttribute(HTMLNames::classAttr);
+    return getAttribute(html_names::kClassAttr);
+  return FastGetAttribute(html_names::kClassAttr);
 }
 
 inline void Element::SetIdAttribute(const AtomicString& value) {
-  setAttribute(HTMLNames::idAttr, value);
+  setAttribute(html_names::kIdAttr, value);
 }
 
 inline const SpaceSplitString& Element::ClassNames() const {
diff --git a/third_party/blink/renderer/core/dom/element_traversal.h b/third_party/blink/renderer/core/dom/element_traversal.h
index 0a9e593..1909883 100644
--- a/third_party/blink/renderer/core/dom/element_traversal.h
+++ b/third_party/blink/renderer/core/dom/element_traversal.h
@@ -56,13 +56,14 @@
 // that defines operator(). HasTagName above is an example of a matcher.
 //
 // For example, a caller could do this:
-//   Traversal<Element>::firstChild(someNode, HasTagName(HTMLNames::titleTag));
+//   Traversal<Element>::firstChild(some_node,
+//                                  HasTagName(html_names::kTitleTag));
 //
-// This invocation would return the first child of |someNode| (which has to be a
-// ContainerNode) for which HasTagName(HTMLNames::titleTag) returned true, so it
-// would return the first child of |someNode| which is a <title> element. If the
-// caller needs to traverse a Node this way, it's necessary to first check
-// Node::isContainerNode() and then use toContainerNode().
+// This invocation would return the first child of |some_node| (which has to be
+// a ContainerNode) for which HasTagName(html_names::kTitleTag) returned true,
+// so it would return the first child of |someNode| which is a <title> element.
+// If the caller needs to traverse a Node this way, it's necessary to first
+// check Node::IsContainerNode() and then use ToContainerNode().
 //
 // When looking for a specific element type, it is more efficient to do this:
 //   Traversal<HTMLTitleElement>::firstChild(someNode);
diff --git a/third_party/blink/renderer/core/dom/events/event_path_test.cc b/third_party/blink/renderer/core/dom/events/event_path_test.cc
index a405a3a..6f3b6dc 100644
--- a/third_party/blink/renderer/core/dom/events/event_path_test.cc
+++ b/third_party/blink/renderer/core/dom/events/event_path_test.cc
@@ -18,7 +18,7 @@
 
 TEST_F(EventPathTest, ShouldBeEmptyForPseudoElementWithoutParentElement) {
   Element* div = GetDocument().CreateRawElement(
-      HTMLNames::divTag, CreateElementFlags::ByCreateElement());
+      html_names::kDivTag, CreateElementFlags::ByCreateElement());
   PseudoElement* pseudo = PseudoElement::Create(div, kPseudoIdFirstLetter);
   pseudo->Dispose();
   EventPath event_path(*pseudo);
diff --git a/third_party/blink/renderer/core/dom/live_node_list_base.h b/third_party/blink/renderer/core/dom/live_node_list_base.h
index 0469983..2a1d029 100644
--- a/third_party/blink/renderer/core/dom/live_node_list_base.h
+++ b/third_party/blink/renderer/core/dom/live_node_list_base.h
@@ -113,21 +113,22 @@
     const QualifiedName& attr_name) {
   switch (type) {
     case kInvalidateOnClassAttrChange:
-      return attr_name == HTMLNames::classAttr;
+      return attr_name == html_names::kClassAttr;
     case kInvalidateOnNameAttrChange:
-      return attr_name == HTMLNames::nameAttr;
+      return attr_name == html_names::kNameAttr;
     case kInvalidateOnIdNameAttrChange:
-      return attr_name == HTMLNames::idAttr || attr_name == HTMLNames::nameAttr;
+      return attr_name == html_names::kIdAttr ||
+             attr_name == html_names::kNameAttr;
     case kInvalidateOnForAttrChange:
-      return attr_name == HTMLNames::forAttr;
+      return attr_name == html_names::kForAttr;
     case kInvalidateForFormControls:
-      return attr_name == HTMLNames::nameAttr ||
-             attr_name == HTMLNames::idAttr ||
-             attr_name == HTMLNames::forAttr ||
-             attr_name == HTMLNames::formAttr ||
-             attr_name == HTMLNames::typeAttr;
+      return attr_name == html_names::kNameAttr ||
+             attr_name == html_names::kIdAttr ||
+             attr_name == html_names::kForAttr ||
+             attr_name == html_names::kFormAttr ||
+             attr_name == html_names::kTypeAttr;
     case kInvalidateOnHRefAttrChange:
-      return attr_name == HTMLNames::hrefAttr;
+      return attr_name == html_names::kHrefAttr;
     case kDoNotInvalidateOnAttributeChanges:
       return false;
     case kInvalidateOnAnyAttrChange:
diff --git a/third_party/blink/renderer/core/dom/mutation_observer_test.cc b/third_party/blink/renderer/core/dom/mutation_observer_test.cc
index b4f620c..e9afaa049 100644
--- a/third_party/blink/renderer/core/dom/mutation_observer_test.cc
+++ b/third_party/blink/renderer/core/dom/mutation_observer_test.cc
@@ -35,7 +35,7 @@
 
 TEST(MutationObserverTest, DisconnectCrash) {
   Persistent<Document> document = HTMLDocument::CreateForTest();
-  auto* root = ToHTMLElement(document->CreateRawElement(HTMLNames::htmlTag));
+  auto* root = ToHTMLElement(document->CreateRawElement(html_names::kHTMLTag));
   document->AppendChild(root);
   root->SetInnerHTMLFromString("<head><title>\n</title></head><body></body>");
   Node* head = root->firstChild()->firstChild();
diff --git a/third_party/blink/renderer/core/dom/name_node_list.cc b/third_party/blink/renderer/core/dom/name_node_list.cc
index 946c27b..eb473a2 100644
--- a/third_party/blink/renderer/core/dom/name_node_list.cc
+++ b/third_party/blink/renderer/core/dom/name_node_list.cc
@@ -28,8 +28,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 NameNodeList::NameNodeList(ContainerNode& root_node, const AtomicString& name)
     : LiveNodeList(root_node, kNameNodeListType, kInvalidateOnNameAttrChange),
       name_(name) {}
diff --git a/third_party/blink/renderer/core/dom/named_node_map.cc b/third_party/blink/renderer/core/dom/named_node_map.cc
index 691c73b8..f0b19a3 100644
--- a/third_party/blink/renderer/core/dom/named_node_map.cc
+++ b/third_party/blink/renderer/core/dom/named_node_map.cc
@@ -33,8 +33,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 Attr* NamedNodeMap::getNamedItem(const AtomicString& name) const {
   return element_->getAttributeNode(name);
 }
diff --git a/third_party/blink/renderer/core/dom/node.cc b/third_party/blink/renderer/core/dom/node.cc
index f54a326..4a289fae 100644
--- a/third_party/blink/renderer/core/dom/node.cc
+++ b/third_party/blink/renderer/core/dom/node.cc
@@ -157,7 +157,7 @@
 
 }  // namespace
 
-using namespace HTMLNames;
+using namespace html_names;
 
 struct SameSizeAsNode : EventTarget {
   uint32_t node_flags_;
@@ -465,6 +465,7 @@
 
 void Node::setDistributeScroll(V8ScrollStateCallback* scroll_state_callback,
                                const String& native_scroll_behavior) {
+  DCHECK(IsElementNode());
   GetScrollCustomizationCallbacks().SetDistributeScroll(
       this, ScrollStateCallbackV8Impl::Create(scroll_state_callback,
                                               native_scroll_behavior));
@@ -472,23 +473,28 @@
 
 void Node::setApplyScroll(V8ScrollStateCallback* scroll_state_callback,
                           const String& native_scroll_behavior) {
+  DCHECK(IsElementNode());
   SetApplyScroll(ScrollStateCallbackV8Impl::Create(scroll_state_callback,
                                                    native_scroll_behavior));
 }
 
 void Node::SetApplyScroll(ScrollStateCallback* scroll_state_callback) {
+  DCHECK(IsElementNode());
   GetScrollCustomizationCallbacks().SetApplyScroll(this, scroll_state_callback);
 }
 
 void Node::RemoveApplyScroll() {
+  DCHECK(IsElementNode());
   GetScrollCustomizationCallbacks().RemoveApplyScroll(this);
 }
 
 ScrollStateCallback* Node::GetApplyScroll() {
+  DCHECK(IsElementNode());
   return GetScrollCustomizationCallbacks().GetApplyScroll(this);
 }
 
 void Node::NativeDistributeScroll(ScrollState& scroll_state) {
+  DCHECK(IsElementNode());
   if (scroll_state.FullyConsumed())
     return;
 
@@ -511,11 +517,10 @@
 }
 
 void Node::NativeApplyScroll(ScrollState& scroll_state) {
-  if (!GetLayoutObject())
-    return;
+  DCHECK(IsElementNode());
 
   // All elements in the scroll chain should be boxes.
-  DCHECK(GetLayoutObject()->IsBox());
+  DCHECK(!GetLayoutObject() || GetLayoutObject()->IsBox());
 
   if (scroll_state.FullyConsumed())
     return;
@@ -529,7 +534,15 @@
   // updateStyleAndLayoutIgnorePendingStylesheetsForNode.
   GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets();
 
-  LayoutBox* box_to_scroll = ToLayoutBox(GetLayoutObject());
+  LayoutBox* box_to_scroll = nullptr;
+
+  if (this == GetDocument().documentElement())
+    box_to_scroll = GetDocument().GetLayoutView();
+  else if (GetLayoutObject())
+    box_to_scroll = ToLayoutBox(GetLayoutObject());
+
+  if (!box_to_scroll)
+    return;
 
   ScrollableArea* scrollable_area =
       box_to_scroll->EnclosingBox()->GetScrollableArea();
@@ -557,6 +570,7 @@
 
 void Node::CallDistributeScroll(ScrollState& scroll_state) {
   TRACE_EVENT0("input", "Node::CallDistributeScroll");
+  DCHECK(IsElementNode());
   ScrollStateCallback* callback =
       GetScrollCustomizationCallbacks().GetDistributeScroll(this);
 
@@ -592,6 +606,7 @@
 
 void Node::CallApplyScroll(ScrollState& scroll_state) {
   TRACE_EVENT0("input", "Node::CallApplyScroll");
+  DCHECK(IsElementNode());
   // Hits ASSERTs when trying to determine whether we need to scroll on main
   // or CC. http://crbug.com/625676.
   DisableCompositingQueryAsserts disabler;
@@ -636,6 +651,7 @@
 
 void Node::WillBeginCustomizedScrollPhase(
     ScrollCustomization::ScrollDirection direction) {
+  DCHECK(IsElementNode());
   DCHECK(!GetScrollCustomizationCallbacks().InScrollPhase(this));
   LayoutBox* box = GetLayoutBox();
   if (!box)
@@ -649,6 +665,7 @@
 }
 
 void Node::DidEndCustomizedScrollPhase() {
+  DCHECK(IsElementNode());
   GetScrollCustomizationCallbacks().SetInScrollPhase(this, false);
 }
 
@@ -1215,7 +1232,7 @@
                                  ? ToElement(this)
                                  : FlatTreeTraversal::ParentElement(*this);
     while (element) {
-      if (element->hasAttribute(HTMLNames::inertAttr))
+      if (element->hasAttribute(html_names::kInertAttr))
         return true;
       element = FlatTreeTraversal::ParentElement(*element);
     }
@@ -1434,9 +1451,10 @@
 
 AtomicString Node::SlotName() const {
   DCHECK(IsSlotable());
-  if (IsElementNode())
+  if (IsElementNode()) {
     return HTMLSlotElement::NormalizeSlotName(
-        ToElement(*this).FastGetAttribute(HTMLNames::slotAttr));
+        ToElement(*this).FastGetAttribute(html_names::kSlotAttr));
+  }
   DCHECK(IsTextNode());
   return g_empty_atom;
 }
@@ -1987,9 +2005,9 @@
     builder.Append(nodeValue().EncodeForDebugging());
     return builder.ToString();
   }
-  DumpAttributeDesc(*this, HTMLNames::idAttr, builder);
-  DumpAttributeDesc(*this, HTMLNames::classAttr, builder);
-  DumpAttributeDesc(*this, HTMLNames::styleAttr, builder);
+  DumpAttributeDesc(*this, html_names::kIdAttr, builder);
+  DumpAttributeDesc(*this, html_names::kClassAttr, builder);
+  DumpAttributeDesc(*this, html_names::kStyleAttr, builder);
   if (HasEditableStyle(*this))
     builder.Append(" (editable)");
   if (GetDocument().FocusedElement() == this)
@@ -2902,11 +2920,6 @@
   }
 }
 
-bool Node::IsEffectiveRootScroller() const {
-  return GetLayoutObject() ? GetLayoutObject()->IsEffectiveRootScroller()
-                           : false;
-}
-
 WebPluginContainerImpl* Node::GetWebPluginContainer() const {
   if (!IsHTMLObjectElement(this) && !IsHTMLEmbedElement(this)) {
     return nullptr;
diff --git a/third_party/blink/renderer/core/dom/node.h b/third_party/blink/renderer/core/dom/node.h
index 5ca4648..acd0c8c0 100644
--- a/third_party/blink/renderer/core/dom/node.h
+++ b/third_party/blink/renderer/core/dom/node.h
@@ -862,8 +862,6 @@
     return GetFlag(kInDOMNodeRemovedHandler);
   }
 
-  bool IsEffectiveRootScroller() const;
-
   // If the node is a plugin, then this returns its WebPluginContainer.
   WebPluginContainerImpl* GetWebPluginContainer() const;
 
diff --git a/third_party/blink/renderer/core/dom/presentation_attribute_style.cc b/third_party/blink/renderer/core/dom/presentation_attribute_style.cc
index 6fd4deab..c87712a 100644
--- a/third_party/blink/renderer/core/dom/presentation_attribute_style.cc
+++ b/third_party/blink/renderer/core/dom/presentation_attribute_style.cc
@@ -46,7 +46,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 struct PresentationAttributeCacheKey {
   PresentationAttributeCacheKey() : tag_name(nullptr) {}
@@ -105,7 +105,7 @@
       return;
     // FIXME: Background URL may depend on the base URL and can't be shared.
     // Disallow caching.
-    if (attr.GetName() == backgroundAttr)
+    if (attr.GetName() == kBackgroundAttr)
       return;
     result.attributes_and_values.push_back(
         std::make_pair(attr.LocalName().Impl(), attr.Value()));
diff --git a/third_party/blink/renderer/core/dom/pseudo_element.cc b/third_party/blink/renderer/core/dom/pseudo_element.cc
index a2a656c..8b0ce12e 100644
--- a/third_party/blink/renderer/core/dom/pseudo_element.cc
+++ b/third_party/blink/renderer/core/dom/pseudo_element.cc
@@ -97,7 +97,7 @@
   SetParentOrShadowHostNode(parent);
   SetHasCustomStyleCallbacks();
   if ((pseudo_id == kPseudoIdBefore || pseudo_id == kPseudoIdAfter) &&
-      parent->HasTagName(HTMLNames::inputTag)) {
+      parent->HasTagName(html_names::kInputTag)) {
     UseCounter::Count(parent->GetDocument(),
                       WebFeature::kPseudoBeforeAfterForInputElement);
   }
diff --git a/third_party/blink/renderer/core/dom/range_test.cc b/third_party/blink/renderer/core/dom/range_test.cc
index 2855792..7ccb3574 100644
--- a/third_party/blink/renderer/core/dom/range_test.cc
+++ b/third_party/blink/renderer/core/dom/range_test.cc
@@ -40,7 +40,7 @@
   GetDocument().body()->SetInnerHTMLFromString("<span><b>abc</b>def</span>");
   GetDocument().GetSettings()->SetScriptEnabled(true);
   Element* const script_element =
-      GetDocument().CreateRawElement(HTMLNames::scriptTag);
+      GetDocument().CreateRawElement(html_names::kScriptTag);
   script_element->setTextContent(
       "let count = 0;"
       "const span = document.querySelector('span');"
@@ -54,7 +54,7 @@
   Element* const span_element = GetDocument().QuerySelector("span");
   Range* const range =
       Range::Create(GetDocument(), span_element, 0, span_element, 1);
-  Element* const result = GetDocument().CreateRawElement(HTMLNames::divTag);
+  Element* const result = GetDocument().CreateRawElement(html_names::kDivTag);
   result->AppendChild(range->extractContents(ASSERT_NO_EXCEPTION));
 
   EXPECT_EQ("<b>abc</b>", result->InnerHTMLAsString())
diff --git a/third_party/blink/renderer/core/dom/shadow_dom_v0_test.cc b/third_party/blink/renderer/core/dom/shadow_dom_v0_test.cc
index e2bb4c0..b555a87 100644
--- a/third_party/blink/renderer/core/dom/shadow_dom_v0_test.cc
+++ b/third_party/blink/renderer/core/dom/shadow_dom_v0_test.cc
@@ -40,8 +40,8 @@
 
 TEST_F(ShadowDOMVTest, FeatureSetId) {
   LoadURL("about:blank");
-  auto* host = GetDocument().CreateRawElement(HTMLNames::divTag);
-  auto* content = GetDocument().CreateRawElement(HTMLNames::contentTag);
+  auto* host = GetDocument().CreateRawElement(html_names::kDivTag);
+  auto* content = GetDocument().CreateRawElement(html_names::kContentTag);
   content->setAttribute("select", "#foo");
   host->CreateV0ShadowRootForTesting().AppendChild(content);
   EXPECT_TRUE(HasSelectorForIdInShadow(host, "foo"));
@@ -57,8 +57,8 @@
 
 TEST_F(ShadowDOMVTest, FeatureSetClassName) {
   LoadURL("about:blank");
-  auto* host = GetDocument().CreateRawElement(HTMLNames::divTag);
-  auto* content = GetDocument().CreateRawElement(HTMLNames::contentTag);
+  auto* host = GetDocument().CreateRawElement(html_names::kDivTag);
+  auto* content = GetDocument().CreateRawElement(html_names::kContentTag);
   content->setAttribute("select", ".foo");
   host->CreateV0ShadowRootForTesting().AppendChild(content);
   EXPECT_TRUE(HasSelectorForClassInShadow(host, "foo"));
@@ -74,8 +74,8 @@
 
 TEST_F(ShadowDOMVTest, FeatureSetAttributeName) {
   LoadURL("about:blank");
-  auto* host = GetDocument().CreateRawElement(HTMLNames::divTag);
-  auto* content = GetDocument().CreateRawElement(HTMLNames::contentTag);
+  auto* host = GetDocument().CreateRawElement(html_names::kDivTag);
+  auto* content = GetDocument().CreateRawElement(html_names::kContentTag);
   content->setAttribute("select", "div[foo]");
   host->CreateV0ShadowRootForTesting().AppendChild(content);
   EXPECT_TRUE(HasSelectorForAttributeInShadow(host, "foo"));
@@ -91,8 +91,8 @@
 
 TEST_F(ShadowDOMVTest, FeatureSetMultipleSelectors) {
   LoadURL("about:blank");
-  auto* host = GetDocument().CreateRawElement(HTMLNames::divTag);
-  auto* content = GetDocument().CreateRawElement(HTMLNames::contentTag);
+  auto* host = GetDocument().CreateRawElement(html_names::kDivTag);
+  auto* content = GetDocument().CreateRawElement(html_names::kContentTag);
   content->setAttribute("select", "#foo,.bar,div[baz]");
   host->CreateV0ShadowRootForTesting().AppendChild(content);
   EXPECT_TRUE(HasSelectorForIdInShadow(host, "foo"));
@@ -108,7 +108,7 @@
 
 TEST_F(ShadowDOMVTest, FeatureSetSubtree) {
   LoadURL("about:blank");
-  auto* host = GetDocument().CreateRawElement(HTMLNames::divTag);
+  auto* host = GetDocument().CreateRawElement(html_names::kDivTag);
   host->CreateV0ShadowRootForTesting().SetInnerHTMLFromString(R"HTML(
     <div>
       <div></div>
@@ -126,12 +126,12 @@
 
 TEST_F(ShadowDOMVTest, FeatureSetMultipleShadowRoots) {
   LoadURL("about:blank");
-  auto* host = GetDocument().CreateRawElement(HTMLNames::divTag);
+  auto* host = GetDocument().CreateRawElement(html_names::kDivTag);
   auto& host_shadow = host->CreateV0ShadowRootForTesting();
   host_shadow.SetInnerHTMLFromString("<content select='#foo'></content>");
-  auto* child = GetDocument().CreateRawElement(HTMLNames::divTag);
+  auto* child = GetDocument().CreateRawElement(html_names::kDivTag);
   auto& child_root = child->CreateV0ShadowRootForTesting();
-  auto* child_content = GetDocument().CreateRawElement(HTMLNames::contentTag);
+  auto* child_content = GetDocument().CreateRawElement(html_names::kContentTag);
   child_content->setAttribute("select", "#bar");
   child_root.AppendChild(child_content);
   host_shadow.AppendChild(child);
diff --git a/third_party/blink/renderer/core/dom/tree_ordered_map.cc b/third_party/blink/renderer/core/dom/tree_ordered_map.cc
index b02ac81..820f734 100644
--- a/third_party/blink/renderer/core/dom/tree_ordered_map.cc
+++ b/third_party/blink/renderer/core/dom/tree_ordered_map.cc
@@ -41,8 +41,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 TreeOrderedMap* TreeOrderedMap::Create() {
   return new TreeOrderedMap;
 }
diff --git a/third_party/blink/renderer/core/dom/tree_scope.cc b/third_party/blink/renderer/core/dom/tree_scope.cc
index 590dfda..d5d8a91d 100644
--- a/third_party/blink/renderer/core/dom/tree_scope.cc
+++ b/third_party/blink/renderer/core/dom/tree_scope.cc
@@ -57,7 +57,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 TreeScope::TreeScope(ContainerNode& root_node, Document& document)
     : root_node_(&root_node),
@@ -600,7 +600,7 @@
   Element* result = nullptr;
   Node& root = RootNode();
   for (Element& element : ElementTraversal::DescendantsOf(root)) {
-    if (DeprecatedEqualIgnoringCase(element.FastGetAttribute(accesskeyAttr),
+    if (DeprecatedEqualIgnoringCase(element.FastGetAttribute(kAccesskeyAttr),
                                     key))
       result = &element;
     if (ShadowRoot* shadow_root = element.GetShadowRoot()) {
diff --git a/third_party/blink/renderer/core/dom/tree_scope_adopter_test.cc b/third_party/blink/renderer/core/dom/tree_scope_adopter_test.cc
index 0a795eda..cc574e3c 100644
--- a/third_party/blink/renderer/core/dom/tree_scope_adopter_test.cc
+++ b/third_party/blink/renderer/core/dom/tree_scope_adopter_test.cc
@@ -17,14 +17,14 @@
   Document* doc1 = Document::CreateForTest();
   Document* doc2 = Document::CreateForTest();
 
-  Element* html1 = doc1->CreateRawElement(HTMLNames::htmlTag);
+  Element* html1 = doc1->CreateRawElement(html_names::kHTMLTag);
   doc1->AppendChild(html1);
-  Element* div1 = doc1->CreateRawElement(HTMLNames::divTag);
+  Element* div1 = doc1->CreateRawElement(html_names::kDivTag);
   html1->AppendChild(div1);
 
-  Element* html2 = doc2->CreateRawElement(HTMLNames::htmlTag);
+  Element* html2 = doc2->CreateRawElement(html_names::kHTMLTag);
   doc2->AppendChild(html2);
-  Element* div2 = doc1->CreateRawElement(HTMLNames::divTag);
+  Element* div2 = doc1->CreateRawElement(html_names::kDivTag);
   html2->AppendChild(div2);
 
   EXPECT_EQ(div1->ownerDocument(), doc1);
@@ -45,9 +45,9 @@
   Document* doc1 = Document::CreateForTest();
   Document* doc2 = Document::CreateForTest();
 
-  Element* html1 = doc1->CreateRawElement(HTMLNames::htmlTag);
+  Element* html1 = doc1->CreateRawElement(html_names::kHTMLTag);
   doc1->AppendChild(html1);
-  Element* div1 = doc1->CreateRawElement(HTMLNames::divTag);
+  Element* div1 = doc1->CreateRawElement(html_names::kDivTag);
   html1->AppendChild(div1);
   EXPECT_EQ(doc1->GetShadowCascadeOrder(),
             ShadowCascadeOrder::kShadowCascadeNone);
@@ -56,9 +56,9 @@
             ShadowCascadeOrder::kShadowCascadeV0);
   EXPECT_TRUE(doc1->MayContainV0Shadow());
 
-  Element* html2 = doc2->CreateRawElement(HTMLNames::htmlTag);
+  Element* html2 = doc2->CreateRawElement(html_names::kHTMLTag);
   doc2->AppendChild(html2);
-  Element* div2 = doc1->CreateRawElement(HTMLNames::divTag);
+  Element* div2 = doc1->CreateRawElement(html_names::kDivTag);
   html2->AppendChild(div2);
   div2->AttachShadowRootInternal(ShadowRootType::kOpen);
 
@@ -81,9 +81,9 @@
   Document* doc1 = Document::CreateForTest();
   Document* doc2 = Document::CreateForTest();
 
-  Element* html1 = doc1->CreateRawElement(HTMLNames::htmlTag);
+  Element* html1 = doc1->CreateRawElement(html_names::kHTMLTag);
   doc1->AppendChild(html1);
-  Element* div1 = doc1->CreateRawElement(HTMLNames::divTag);
+  Element* div1 = doc1->CreateRawElement(html_names::kDivTag);
   html1->AppendChild(div1);
   EXPECT_EQ(doc1->GetShadowCascadeOrder(),
             ShadowCascadeOrder::kShadowCascadeNone);
@@ -92,9 +92,9 @@
             ShadowCascadeOrder::kShadowCascadeV1);
   EXPECT_FALSE(doc1->MayContainV0Shadow());
 
-  Element* html2 = doc2->CreateRawElement(HTMLNames::htmlTag);
+  Element* html2 = doc2->CreateRawElement(html_names::kHTMLTag);
   doc2->AppendChild(html2);
-  Element* div2 = doc1->CreateRawElement(HTMLNames::divTag);
+  Element* div2 = doc1->CreateRawElement(html_names::kDivTag);
   html2->AppendChild(div2);
   div2->CreateV0ShadowRootForTesting();
 
@@ -115,13 +115,13 @@
 
 TEST(TreeScopeAdopterTest, AdoptV0InV1ToNewDocument) {
   Document* old_doc = Document::CreateForTest();
-  Element* html = old_doc->CreateRawElement(HTMLNames::htmlTag);
+  Element* html = old_doc->CreateRawElement(html_names::kHTMLTag);
   old_doc->AppendChild(html);
-  Element* host1 = old_doc->CreateRawElement(HTMLNames::divTag);
+  Element* host1 = old_doc->CreateRawElement(html_names::kDivTag);
   html->AppendChild(host1);
   ShadowRoot& shadow_root_v1 =
       host1->AttachShadowRootInternal(ShadowRootType::kOpen);
-  Element* host2 = old_doc->CreateRawElement(HTMLNames::divTag);
+  Element* host2 = old_doc->CreateRawElement(html_names::kDivTag);
   shadow_root_v1.AppendChild(host2);
   host2->CreateV0ShadowRootForTesting();
 
diff --git a/third_party/blink/renderer/core/dom/tree_scope_test.cc b/third_party/blink/renderer/core/dom/tree_scope_test.cc
index 62334700..67aa3e2 100644
--- a/third_party/blink/renderer/core/dom/tree_scope_test.cc
+++ b/third_party/blink/renderer/core/dom/tree_scope_test.cc
@@ -15,7 +15,7 @@
   Document* document = Document::CreateForTest();
   EXPECT_EQ(document, document->CommonAncestorTreeScope(*document));
 
-  Element* html = document->CreateRawElement(HTMLNames::htmlTag);
+  Element* html = document->CreateRawElement(html_names::kHTMLTag);
   document->AppendChild(html);
   ShadowRoot& shadow_root = html->CreateV0ShadowRootForTesting();
   EXPECT_EQ(shadow_root, shadow_root.CommonAncestorTreeScope(shadow_root));
@@ -27,7 +27,7 @@
   // shadowRoot
 
   Document* document = Document::CreateForTest();
-  Element* html = document->CreateRawElement(HTMLNames::htmlTag);
+  Element* html = document->CreateRawElement(html_names::kHTMLTag);
   document->AppendChild(html);
   ShadowRoot& shadow_root = html->CreateV0ShadowRootForTesting();
 
@@ -41,11 +41,11 @@
   //  A      B
 
   Document* document = Document::CreateForTest();
-  Element* html = document->CreateRawElement(HTMLNames::htmlTag);
+  Element* html = document->CreateRawElement(html_names::kHTMLTag);
   document->AppendChild(html);
-  Element* head = document->CreateRawElement(HTMLNames::headTag);
+  Element* head = document->CreateRawElement(html_names::kHeadTag);
   html->AppendChild(head);
-  Element* body = document->CreateRawElement(HTMLNames::bodyTag);
+  Element* body = document->CreateRawElement(html_names::kBodyTag);
   html->AppendChild(body);
 
   ShadowRoot& shadow_root_a = head->CreateV0ShadowRootForTesting();
@@ -63,17 +63,17 @@
   // A
 
   Document* document = Document::CreateForTest();
-  Element* html = document->CreateRawElement(HTMLNames::htmlTag);
+  Element* html = document->CreateRawElement(html_names::kHTMLTag);
   document->AppendChild(html);
-  Element* head = document->CreateRawElement(HTMLNames::headTag);
+  Element* head = document->CreateRawElement(html_names::kHeadTag);
   html->AppendChild(head);
-  Element* body = document->CreateRawElement(HTMLNames::bodyTag);
+  Element* body = document->CreateRawElement(html_names::kBodyTag);
   html->AppendChild(body);
 
   ShadowRoot& shadow_root_y = head->CreateV0ShadowRootForTesting();
   ShadowRoot& shadow_root_b = body->CreateV0ShadowRootForTesting();
 
-  Element* div_in_y = document->CreateRawElement(HTMLNames::divTag);
+  Element* div_in_y = document->CreateRawElement(html_names::kDivTag);
   shadow_root_y.AppendChild(div_in_y);
   ShadowRoot& shadow_root_a = div_in_y->CreateV0ShadowRootForTesting();
 
diff --git a/third_party/blink/renderer/core/dom/v0_insertion_point.cc b/third_party/blink/renderer/core/dom/v0_insertion_point.cc
index db1550c..930d432 100644
--- a/third_party/blink/renderer/core/dom/v0_insertion_point.cc
+++ b/third_party/blink/renderer/core/dom/v0_insertion_point.cc
@@ -41,8 +41,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 V0InsertionPoint::V0InsertionPoint(const QualifiedName& tag_name,
                                    Document& document)
     : HTMLElement(tag_name, document, kCreateV0InsertionPoint),
diff --git a/third_party/blink/renderer/core/dom/visited_link_state.cc b/third_party/blink/renderer/core/dom/visited_link_state.cc
index 5cedf79b..9541ae5 100644
--- a/third_party/blink/renderer/core/dom/visited_link_state.cc
+++ b/third_party/blink/renderer/core/dom/visited_link_state.cc
@@ -43,7 +43,7 @@
 static inline const AtomicString& LinkAttribute(const Element& element) {
   DCHECK(element.IsLink());
   if (element.IsHTMLElement())
-    return element.FastGetAttribute(HTMLNames::hrefAttr);
+    return element.FastGetAttribute(html_names::kHrefAttr);
   DCHECK(element.IsSVGElement());
   return SVGURIReference::LegacyHrefString(ToSVGElement(element));
 }
diff --git a/third_party/blink/renderer/core/editing/caret_display_item_client_test.cc b/third_party/blink/renderer/core/editing/caret_display_item_client_test.cc
index 000806d..2852a67 100644
--- a/third_party/blink/renderer/core/editing/caret_display_item_client_test.cc
+++ b/third_party/blink/renderer/core/editing/caret_display_item_client_test.cc
@@ -56,7 +56,7 @@
   }
 
   Element* AppendBlock(const String& data) {
-    Element* block = GetDocument().CreateRawElement(HTMLNames::divTag);
+    Element* block = GetDocument().CreateRawElement(html_names::kDivTag);
     Text* text = GetDocument().createTextNode(data);
     block->AppendChild(text);
     GetDocument().body()->AppendChild(block);
@@ -356,7 +356,7 @@
             GetCaretDisplayItemClient().VisualRect());
 
   // Composite container.
-  container->setAttribute(HTMLNames::styleAttr, "will-change: transform");
+  container->setAttribute(html_names::kStyleAttr, "will-change: transform");
   UpdateAllLifecyclePhases();
   // TODO(wangxianzhu): Why will-change:transform doens't trigger compositing
   // in SPv2?
@@ -366,7 +366,7 @@
   }
 
   // Uncomposite container.
-  container->setAttribute(HTMLNames::styleAttr, "");
+  container->setAttribute(html_names::kStyleAttr, "");
   UpdateAllLifecyclePhases();
   EXPECT_EQ(LayoutRect(116, 105, 1, 1),
             GetCaretDisplayItemClient().VisualRect());
diff --git a/third_party/blink/renderer/core/editing/commands/apply_block_element_command.cc b/third_party/blink/renderer/core/editing/commands/apply_block_element_command.cc
index 507972f..0f7d916 100644
--- a/third_party/blink/renderer/core/editing/commands/apply_block_element_command.cc
+++ b/third_party/blink/renderer/core/editing/commands/apply_block_element_command.cc
@@ -42,7 +42,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 ApplyBlockElementCommand::ApplyBlockElementCommand(
     Document& document,
@@ -418,7 +418,7 @@
 HTMLElement* ApplyBlockElementCommand::CreateBlockElement() const {
   HTMLElement* element = CreateHTMLElement(GetDocument(), tag_name_);
   if (inline_style_.length())
-    element->setAttribute(styleAttr, inline_style_);
+    element->setAttribute(kStyleAttr, inline_style_);
   return element;
 }
 
diff --git a/third_party/blink/renderer/core/editing/commands/apply_block_element_command_test.cc b/third_party/blink/renderer/core/editing/commands/apply_block_element_command_test.cc
index 8ad29380..8b1be41 100644
--- a/third_party/blink/renderer/core/editing/commands/apply_block_element_command_test.cc
+++ b/third_party/blink/renderer/core/editing/commands/apply_block_element_command_test.cc
@@ -46,7 +46,7 @@
       SetSelectionOptions());
 
   FormatBlockCommand* command =
-      FormatBlockCommand::Create(GetDocument(), HTMLNames::footerTag);
+      FormatBlockCommand::Create(GetDocument(), html_names::kFooterTag);
   command->Apply();
 
   EXPECT_EQ(
@@ -121,7 +121,7 @@
           "^<input><input class=\"input\" style=\"position:absolute\">|"),
       SetSelectionOptions());
   FormatBlockCommand* command =
-      FormatBlockCommand::Create(GetDocument(), HTMLNames::preTag);
+      FormatBlockCommand::Create(GetDocument(), html_names::kPreTag);
   // Crash happens here.
   EXPECT_FALSE(command->Apply());
   EXPECT_EQ(
@@ -137,7 +137,7 @@
           "^<b style=\"-webkit-user-modify:read-only\"><button></button></b>|"),
       SetSelectionOptions());
   FormatBlockCommand* command =
-      FormatBlockCommand::Create(GetDocument(), HTMLNames::preTag);
+      FormatBlockCommand::Create(GetDocument(), html_names::kPreTag);
   // Shouldn't crash here.
   EXPECT_FALSE(command->Apply());
   EXPECT_EQ(
@@ -156,7 +156,7 @@
                              "/button></kbd>|"),
       SetSelectionOptions());
   FormatBlockCommand* command =
-      FormatBlockCommand::Create(GetDocument(), HTMLNames::preTag);
+      FormatBlockCommand::Create(GetDocument(), html_names::kPreTag);
   // Shouldn't crash here.
   EXPECT_FALSE(command->Apply());
   EXPECT_EQ(
diff --git a/third_party/blink/renderer/core/editing/commands/apply_style_command.cc b/third_party/blink/renderer/core/editing/commands/apply_style_command.cc
index e3f5775..215f173 100644
--- a/third_party/blink/renderer/core/editing/commands/apply_style_command.cc
+++ b/third_party/blink/renderer/core/editing/commands/apply_style_command.cc
@@ -60,7 +60,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 static bool HasNoAttributeOrOnlyStyleAttribute(
     const HTMLElement* element,
@@ -70,7 +70,7 @@
     return true;
 
   unsigned matched_attributes = 0;
-  if (element->hasAttribute(styleAttr) &&
+  if (element->hasAttribute(kStyleAttr) &&
       (should_style_attribute_be_empty == kAllowNonEmptyStyleAttribute ||
        !element->InlineStyle() || element->InlineStyle()->IsEmpty()))
     matched_attributes++;
@@ -512,11 +512,11 @@
           *CSSPrimitiveValue::Create(desired_font_size,
                                      CSSPrimitiveValue::UnitType::kPixels),
           false);
-      SetNodeAttribute(element, styleAttr,
+      SetNodeAttribute(element, kStyleAttr,
                        AtomicString(inline_style->AsText()));
     }
     if (inline_style->IsEmpty()) {
-      RemoveElementAttribute(element, styleAttr);
+      RemoveElementAttribute(element, kStyleAttr);
       if (IsSpanWithoutAttributesOrUnstyledStyleSpan(element))
         unstyled_spans.push_back(element);
     }
@@ -646,16 +646,16 @@
     // it assumes that if the 'dir' attribute is present, then removing it will
     // suffice, and otherwise it sets the property in the inline style
     // declaration.
-    if (element->hasAttribute(dirAttr)) {
+    if (element->hasAttribute(kDirAttr)) {
       // FIXME: If this is a BDO element, we should probably just remove it if
       // it has no other attributes, like we (should) do with B and I elements.
-      RemoveElementAttribute(element, dirAttr);
+      RemoveElementAttribute(element, kDirAttr);
     } else {
       MutableCSSPropertyValueSet* inline_style =
           CopyStyleOrCreateEmpty(element->InlineStyle());
       inline_style->SetProperty(CSSPropertyUnicodeBidi, CSSValueNormal);
       inline_style->RemoveProperty(CSSPropertyDirection);
-      SetNodeAttribute(element, styleAttr,
+      SetNodeAttribute(element, kStyleAttr,
                        AtomicString(inline_style->AsText()));
       if (IsSpanWithoutAttributesOrUnstyledStyleSpan(element)) {
         RemoveNodePreservingChildren(element, editing_state);
@@ -998,7 +998,7 @@
       MutableCSSPropertyValueSet* inline_style =
           CopyStyleOrCreateEmpty(element->InlineStyle());
       inline_style->MergeAndOverrideOnConflict(style->Style());
-      SetNodeAttribute(element, styleAttr,
+      SetNodeAttribute(element, kStyleAttr,
                        AtomicString(inline_style->AsText()));
       continue;
     }
@@ -1327,7 +1327,7 @@
   // FIXME: applyInlineStyleToRange should be used here instead.
   if ((node->GetLayoutObject()->IsLayoutBlockFlow() || node->hasChildren()) &&
       node->IsHTMLElement()) {
-    SetNodeAttribute(ToHTMLElement(node), styleAttr,
+    SetNodeAttribute(ToHTMLElement(node), kStyleAttr,
                      AtomicString(new_inline_style->Style()->AsText()));
     return;
   }
@@ -1389,12 +1389,12 @@
       if (!child->contains(target_node) && elements_to_push_down.size()) {
         for (const auto& element : elements_to_push_down) {
           Element* wrapper = element->CloneWithoutChildren();
-          wrapper->removeAttribute(styleAttr);
+          wrapper->removeAttribute(kStyleAttr);
           // Delete id attribute from the second element because the same id
           // cannot be used for more than one element
-          element->removeAttribute(HTMLNames::idAttr);
+          element->removeAttribute(html_names::kIdAttr);
           if (IsHTMLAnchorElement(element))
-            element->removeAttribute(HTMLNames::nameAttr);
+            element->removeAttribute(html_names::kNameAttr);
           SurroundNodeRangeWithElement(child, child, wrapper, editing_state);
           if (editing_state->IsAborted())
             return;
@@ -1826,7 +1826,7 @@
       css_text.Append(' ');
     css_text.Append(decl->AsText());
   }
-  SetNodeAttribute(block, styleAttr, css_text.ToAtomicString());
+  SetNodeAttribute(block, kStyleAttr, css_text.ToAtomicString());
 }
 
 void ApplyStyleCommand::AddInlineStyleIfNeeded(EditingStyle* style,
@@ -1910,24 +1910,24 @@
       style_change.ApplyFontSize()) {
     if (font_container) {
       if (style_change.ApplyFontColor())
-        SetNodeAttribute(font_container, colorAttr,
+        SetNodeAttribute(font_container, kColorAttr,
                          AtomicString(style_change.FontColor()));
       if (style_change.ApplyFontFace())
-        SetNodeAttribute(font_container, faceAttr,
+        SetNodeAttribute(font_container, kFaceAttr,
                          AtomicString(style_change.FontFace()));
       if (style_change.ApplyFontSize())
-        SetNodeAttribute(font_container, sizeAttr,
+        SetNodeAttribute(font_container, kSizeAttr,
                          AtomicString(style_change.FontSize()));
     } else {
       HTMLFontElement* font_element = HTMLFontElement::Create(GetDocument());
       if (style_change.ApplyFontColor())
-        font_element->setAttribute(colorAttr,
+        font_element->setAttribute(kColorAttr,
                                    AtomicString(style_change.FontColor()));
       if (style_change.ApplyFontFace())
-        font_element->setAttribute(faceAttr,
+        font_element->setAttribute(kFaceAttr,
                                    AtomicString(style_change.FontFace()));
       if (style_change.ApplyFontSize())
-        font_element->setAttribute(sizeAttr,
+        font_element->setAttribute(kSizeAttr,
                                    AtomicString(style_change.FontSize()));
       SurroundNodeRangeWithElement(start_node, end_node, font_element,
                                    editing_state);
@@ -1946,14 +1946,15 @@
         if (!existing_text.IsEmpty())
           css_text.Append(' ');
         css_text.Append(style_change.CssStyle());
-        SetNodeAttribute(style_container, styleAttr, css_text.ToAtomicString());
+        SetNodeAttribute(style_container, kStyleAttr,
+                         css_text.ToAtomicString());
       } else {
-        SetNodeAttribute(style_container, styleAttr,
+        SetNodeAttribute(style_container, kStyleAttr,
                          AtomicString(style_change.CssStyle()));
       }
     } else {
       HTMLSpanElement* style_element = HTMLSpanElement::Create(GetDocument());
-      style_element->setAttribute(styleAttr,
+      style_element->setAttribute(kStyleAttr,
                                   AtomicString(style_change.CssStyle()));
       SurroundNodeRangeWithElement(start_node, end_node, style_element,
                                    editing_state);
@@ -1964,7 +1965,7 @@
 
   if (style_change.ApplyBold()) {
     SurroundNodeRangeWithElement(start_node, end_node,
-                                 HTMLElement::Create(bTag, GetDocument()),
+                                 HTMLElement::Create(kBTag, GetDocument()),
                                  editing_state);
     if (editing_state->IsAborted())
       return;
@@ -1972,7 +1973,7 @@
 
   if (style_change.ApplyItalic()) {
     SurroundNodeRangeWithElement(start_node, end_node,
-                                 HTMLElement::Create(iTag, GetDocument()),
+                                 HTMLElement::Create(kITag, GetDocument()),
                                  editing_state);
     if (editing_state->IsAborted())
       return;
@@ -1980,7 +1981,7 @@
 
   if (style_change.ApplyUnderline()) {
     SurroundNodeRangeWithElement(start_node, end_node,
-                                 HTMLElement::Create(uTag, GetDocument()),
+                                 HTMLElement::Create(kUTag, GetDocument()),
                                  editing_state);
     if (editing_state->IsAborted())
       return;
@@ -1988,7 +1989,7 @@
 
   if (style_change.ApplyLineThrough()) {
     SurroundNodeRangeWithElement(start_node, end_node,
-                                 HTMLElement::Create(strikeTag, GetDocument()),
+                                 HTMLElement::Create(kStrikeTag, GetDocument()),
                                  editing_state);
     if (editing_state->IsAborted())
       return;
@@ -1996,13 +1997,13 @@
 
   if (style_change.ApplySubscript()) {
     SurroundNodeRangeWithElement(start_node, end_node,
-                                 HTMLElement::Create(subTag, GetDocument()),
+                                 HTMLElement::Create(kSubTag, GetDocument()),
                                  editing_state);
     if (editing_state->IsAborted())
       return;
   } else if (style_change.ApplySuperscript()) {
     SurroundNodeRangeWithElement(start_node, end_node,
-                                 HTMLElement::Create(supTag, GetDocument()),
+                                 HTMLElement::Create(kSupTag, GetDocument()),
                                  editing_state);
     if (editing_state->IsAborted())
       return;
diff --git a/third_party/blink/renderer/core/editing/commands/apply_style_command_test.cc b/third_party/blink/renderer/core/editing/commands/apply_style_command_test.cc
index edbe6e4..fc6480c5 100644
--- a/third_party/blink/renderer/core/editing/commands/apply_style_command_test.cc
+++ b/third_party/blink/renderer/core/editing/commands/apply_style_command_test.cc
@@ -66,7 +66,7 @@
       "</ruby");
   Element* body = GetDocument().body();
   // The bug does't reproduce with a contenteditable <div> as container.
-  body->setAttribute(HTMLNames::contenteditableAttr, "true");
+  body->setAttribute(html_names::kContenteditableAttr, "true");
   GetDocument().UpdateStyleAndLayout();
   Selection().SelectAll();
 
diff --git a/third_party/blink/renderer/core/editing/commands/break_blockquote_command.cc b/third_party/blink/renderer/core/editing/commands/break_blockquote_command.cc
index 8371c099..7a477b5 100644
--- a/third_party/blink/renderer/core/editing/commands/break_blockquote_command.cc
+++ b/third_party/blink/renderer/core/editing/commands/break_blockquote_command.cc
@@ -42,7 +42,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 namespace {
 
@@ -238,7 +238,7 @@
         list_child_node = list_child_node->nextSibling();
       if (IsListItem(list_child_node))
         SetNodeAttribute(
-            cloned_child, startAttr,
+            cloned_child, kStartAttr,
             AtomicString::Number(
                 ToLayoutListItem(list_child_node->GetLayoutObject())->Value()));
     }
diff --git a/third_party/blink/renderer/core/editing/commands/composite_edit_command.cc b/third_party/blink/renderer/core/editing/commands/composite_edit_command.cc
index e6f337e..f14cbd1 100644
--- a/third_party/blink/renderer/core/editing/commands/composite_edit_command.cc
+++ b/third_party/blink/renderer/core/editing/commands/composite_edit_command.cc
@@ -84,7 +84,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 CompositeEditCommand::CompositeEditCommand(Document& document)
     : EditCommand(document) {
@@ -363,9 +363,9 @@
   // TODO(yosin): We should get rid of |canHaveChildrenForEditing()|, since
   // |cloneParagraphUnderNewElement()| attempt to clone non-well-formed HTML,
   // produced by JavaScript.
-  ABORT_EDITING_COMMAND_IF(
-      !CanHaveChildrenForEditing(parent) &&
-      !(parent->IsElementNode() && ToElement(parent)->TagQName() == objectTag));
+  ABORT_EDITING_COMMAND_IF(!CanHaveChildrenForEditing(parent) &&
+                           !(parent->IsElementNode() &&
+                             ToElement(parent)->TagQName() == kObjectTag));
   ABORT_EDITING_COMMAND_IF(!HasEditableStyle(*parent) &&
                            parent->InActiveDocument());
   ApplyCommandToComposite(AppendNodeCommand::Create(parent, node),
diff --git a/third_party/blink/renderer/core/editing/commands/composite_edit_command_test.cc b/third_party/blink/renderer/core/editing/commands/composite_edit_command_test.cc
index 00ce0d5..1e898ab 100644
--- a/third_party/blink/renderer/core/editing/commands/composite_edit_command_test.cc
+++ b/third_party/blink/renderer/core/editing/commands/composite_edit_command_test.cc
@@ -112,7 +112,7 @@
   Node* insert_child = GetDocument().createTextNode("foo");
   Element* ref_child = GetDocument().QuerySelector("b");
   Element* div = GetDocument().QuerySelector("div");
-  div->setAttribute(HTMLNames::contenteditableAttr, "true");
+  div->setAttribute(html_names::kContenteditableAttr, "true");
 
   EditingState editing_state;
   sample.InsertNodeBefore(insert_child, ref_child, &editing_state);
@@ -128,7 +128,7 @@
   SampleCommand& sample = *new SampleCommand(GetDocument());
   Element* body = GetDocument().body();
   Node* text = body->lastChild();
-  body->setAttribute(HTMLNames::contenteditableAttr, "true");
+  body->setAttribute(html_names::kContenteditableAttr, "true");
   GetDocument().UpdateStyleAndLayout();
 
   EditingState editing_state;
diff --git a/third_party/blink/renderer/core/editing/commands/delete_selection_command.cc b/third_party/blink/renderer/core/editing/commands/delete_selection_command.cc
index f2f7751e..fa0d084 100644
--- a/third_party/blink/renderer/core/editing/commands/delete_selection_command.cc
+++ b/third_party/blink/renderer/core/editing/commands/delete_selection_command.cc
@@ -49,8 +49,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 static bool IsTableCellEmpty(Node* cell) {
   DCHECK(cell);
   DCHECK(IsTableCell(cell)) << cell;
diff --git a/third_party/blink/renderer/core/editing/commands/editing_commands_utilities.cc b/third_party/blink/renderer/core/editing/commands/editing_commands_utilities.cc
index 2ad4f9f9..d412493 100644
--- a/third_party/blink/renderer/core/editing/commands/editing_commands_utilities.cc
+++ b/third_party/blink/renderer/core/editing/commands/editing_commands_utilities.cc
@@ -351,7 +351,7 @@
 }
 
 HTMLElement* CreateHTMLElement(Document& document, const QualifiedName& name) {
-  DCHECK_EQ(name.NamespaceURI(), HTMLNames::xhtmlNamespaceURI)
+  DCHECK_EQ(name.NamespaceURI(), html_names::xhtmlNamespaceURI)
       << "Unexpected namespace: " << name;
   return ToHTMLElement(document.CreateElement(
       name, CreateElementFlags::ByCloneNode(), g_null_atom));
diff --git a/third_party/blink/renderer/core/editing/commands/editor_command.cc b/third_party/blink/renderer/core/editing/commands/editor_command.cc
index da47c6e9..a878da7 100644
--- a/third_party/blink/renderer/core/editing/commands/editor_command.cc
+++ b/third_party/blink/renderer/core/editing/commands/editor_command.cc
@@ -73,7 +73,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 namespace {
 
@@ -312,7 +312,8 @@
       // If the selected list has the different type of list as child, return
       // |FalseTriState|.
       // See http://crbug.com/385374
-      if (HasChildTags(*start_element, tag_name.Matches(ulTag) ? olTag : ulTag))
+      if (HasChildTags(*start_element,
+                       tag_name.Matches(kUlTag) ? kOlTag : kUlTag))
         return EditingTriState::kFalse;
       return EditingTriState::kTrue;
     }
@@ -1196,11 +1197,11 @@
 }
 
 EditingTriState StateOrderedList(LocalFrame& frame, Event*) {
-  return SelectionListState(frame.Selection(), olTag);
+  return SelectionListState(frame.Selection(), kOlTag);
 }
 
 static EditingTriState StateUnorderedList(LocalFrame& frame, Event*) {
-  return SelectionListState(frame.Selection(), ulTag);
+  return SelectionListState(frame.Selection(), kUlTag);
 }
 
 static EditingTriState StateJustifyCenter(LocalFrame& frame, Event*) {
@@ -1243,9 +1244,9 @@
                                              Event*) {
   switch (frame.GetEditor().DefaultParagraphSeparator()) {
     case EditorParagraphSeparator::kIsDiv:
-      return divTag.LocalName();
+      return kDivTag.LocalName();
     case EditorParagraphSeparator::kIsP:
-      return pTag.LocalName();
+      return kPTag.LocalName();
   }
 
   NOTREACHED();
diff --git a/third_party/blink/renderer/core/editing/commands/format_block_command.cc b/third_party/blink/renderer/core/editing/commands/format_block_command.cc
index 1e7a98f..60373750 100644
--- a/third_party/blink/renderer/core/editing/commands/format_block_command.cc
+++ b/third_party/blink/renderer/core/editing/commands/format_block_command.cc
@@ -40,7 +40,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 static Node* EnclosingBlockToSplitTreeTo(Node* start_node);
 static bool IsElementForFormatBlock(const QualifiedName& tag_name);
@@ -141,10 +141,11 @@
   // Copy the inline style of the original block element to the newly created
   // block-style element.
   if (outer_block != node_after_insertion_position &&
-      ToHTMLElement(node_after_insertion_position)->hasAttribute(styleAttr))
+      ToHTMLElement(node_after_insertion_position)->hasAttribute(kStyleAttr)) {
     block_element->setAttribute(
-        styleAttr,
-        ToHTMLElement(node_after_insertion_position)->getAttribute(styleAttr));
+        kStyleAttr,
+        ToHTMLElement(node_after_insertion_position)->getAttribute(kStyleAttr));
+  }
 
   GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets();
 
@@ -176,10 +177,11 @@
   DEFINE_STATIC_LOCAL(
       HashSet<QualifiedName>, block_tags,
       ({
-          addressTag, articleTag, asideTag,  blockquoteTag, ddTag,     divTag,
-          dlTag,      dtTag,      footerTag, h1Tag,         h2Tag,     h3Tag,
-          h4Tag,      h5Tag,      h6Tag,     headerTag,     hgroupTag, mainTag,
-          navTag,     pTag,       preTag,    sectionTag,
+          kAddressTag, kArticleTag, kAsideTag, kBlockquoteTag, kDdTag,
+          kDivTag,     kDlTag,      kDtTag,    kFooterTag,     kH1Tag,
+          kH2Tag,      kH3Tag,      kH4Tag,    kH5Tag,         kH6Tag,
+          kHeaderTag,  kHgroupTag,  kMainTag,  kNavTag,        kPTag,
+          kPreTag,     kSectionTag,
       }));
   return block_tags.Contains(tag_name);
 }
diff --git a/third_party/blink/renderer/core/editing/commands/indent_outdent_command.cc b/third_party/blink/renderer/core/editing/commands/indent_outdent_command.cc
index 2f50ae0f..b464b65 100644
--- a/third_party/blink/renderer/core/editing/commands/indent_outdent_command.cc
+++ b/third_party/blink/renderer/core/editing/commands/indent_outdent_command.cc
@@ -41,7 +41,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 // Returns true if |node| is UL, OL, or BLOCKQUOTE with "display:block".
 // "Outdent" command considers <BLOCKQUOTE style="display:inline"> makes
@@ -55,14 +55,14 @@
   // TODO(yosin): We should check OL/UL element has "list-style-type" CSS
   // property to make sure they layout contents as list.
   return IsHTMLUListElement(element) || IsHTMLOListElement(element) ||
-         element.HasTagName(blockquoteTag);
+         element.HasTagName(kBlockquoteTag);
 }
 
 IndentOutdentCommand::IndentOutdentCommand(Document& document,
                                            EIndentType type_of_action)
     : ApplyBlockElementCommand(
           document,
-          blockquoteTag,
+          kBlockquoteTag,
           "margin: 0 0 0 40px; border: none; padding: 0px;"),
       type_of_action_(type_of_action) {}
 
@@ -184,7 +184,7 @@
     if (outer_block == start.ComputeContainerNode()) {
       // When we apply indent to an empty <blockquote>, we should call
       // insertNodeAfter(). See http://crbug.com/625802 for more details.
-      if (outer_block->HasTagName(blockquoteTag))
+      if (outer_block->HasTagName(kBlockquoteTag))
         InsertNodeAfter(target_blockquote, outer_block, editing_state);
       else
         InsertNodeAt(target_blockquote, start, editing_state);
@@ -262,8 +262,8 @@
     if (split_point) {
       if (Element* split_point_parent = split_point->parentElement()) {
         // We can't outdent if there is no place to go!
-        if (split_point_parent->HasTagName(blockquoteTag) &&
-            !split_point->HasTagName(blockquoteTag) &&
+        if (split_point_parent->HasTagName(kBlockquoteTag) &&
+            !split_point->HasTagName(kBlockquoteTag) &&
             HasEditableStyle(*split_point_parent->parentNode()))
           SplitElement(split_point_parent, split_point);
       }
diff --git a/third_party/blink/renderer/core/editing/commands/insert_line_break_command.cc b/third_party/blink/renderer/core/editing/commands/insert_line_break_command.cc
index c7d8e41..e049830 100644
--- a/third_party/blink/renderer/core/editing/commands/insert_line_break_command.cc
+++ b/third_party/blink/renderer/core/editing/commands/insert_line_break_command.cc
@@ -45,8 +45,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 InsertLineBreakCommand::InsertLineBreakCommand(Document& document)
     : CompositeEditCommand(document) {}
 
diff --git a/third_party/blink/renderer/core/editing/commands/insert_list_command.cc b/third_party/blink/renderer/core/editing/commands/insert_list_command.cc
index 1a566618..3514edc4 100644
--- a/third_party/blink/renderer/core/editing/commands/insert_list_command.cc
+++ b/third_party/blink/renderer/core/editing/commands/insert_list_command.cc
@@ -45,7 +45,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 static Node* EnclosingListChild(Node* node, Node* list_node) {
   Node* list_child = EnclosingListChild(node);
@@ -177,7 +177,7 @@
       return;
   }
 
-  const HTMLQualifiedName& list_tag = (type_ == kOrderedList) ? olTag : ulTag;
+  const HTMLQualifiedName& list_tag = (type_ == kOrderedList) ? kOlTag : kUlTag;
   if (EndingSelection().IsRange()) {
     bool force_list_creation = false;
     VisibleSelection selection =
diff --git a/third_party/blink/renderer/core/editing/commands/insert_paragraph_separator_command.cc b/third_party/blink/renderer/core/editing/commands/insert_paragraph_separator_command.cc
index 7d36a48e..bfc599a3 100644
--- a/third_party/blink/renderer/core/editing/commands/insert_paragraph_separator_command.cc
+++ b/third_party/blink/renderer/core/editing/commands/insert_paragraph_separator_command.cc
@@ -46,7 +46,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 // When inserting a new line, we want to avoid nesting empty divs if we can.
 // Otherwise, when pasting, it's easy to have each new line be a div deeper than
@@ -111,11 +111,11 @@
     EditingState* editing_state) {
   // Not only do we break out of header tags, but we also do not preserve the
   // typing style, in order to match other browsers.
-  if (original_enclosing_block->HasTagName(h1Tag) ||
-      original_enclosing_block->HasTagName(h2Tag) ||
-      original_enclosing_block->HasTagName(h3Tag) ||
-      original_enclosing_block->HasTagName(h4Tag) ||
-      original_enclosing_block->HasTagName(h5Tag)) {
+  if (original_enclosing_block->HasTagName(kH1Tag) ||
+      original_enclosing_block->HasTagName(kH2Tag) ||
+      original_enclosing_block->HasTagName(kH3Tag) ||
+      original_enclosing_block->HasTagName(kH4Tag) ||
+      original_enclosing_block->HasTagName(kH5Tag)) {
     return;
   }
 
@@ -138,11 +138,11 @@
   if (!IsEndOfBlock(EndingVisibleSelection().VisibleStart()))
     return false;
 
-  return enclosing_block->HasTagName(h1Tag) ||
-         enclosing_block->HasTagName(h2Tag) ||
-         enclosing_block->HasTagName(h3Tag) ||
-         enclosing_block->HasTagName(h4Tag) ||
-         enclosing_block->HasTagName(h5Tag);
+  return enclosing_block->HasTagName(kH1Tag) ||
+         enclosing_block->HasTagName(kH2Tag) ||
+         enclosing_block->HasTagName(kH3Tag) ||
+         enclosing_block->HasTagName(kH4Tag) ||
+         enclosing_block->HasTagName(kH5Tag);
 }
 
 void InsertParagraphSeparatorCommand::GetAncestorsInsideBlock(
@@ -170,7 +170,7 @@
     Element* child = ancestors[i - 1]->CloneWithoutChildren();
     // It should always be okay to remove id from the cloned elements, since the
     // originals are not deleted.
-    child->removeAttribute(idAttr);
+    child->removeAttribute(kIdAttr);
     AppendNode(child, parent, editing_state);
     if (editing_state->IsAborted())
       return nullptr;
diff --git a/third_party/blink/renderer/core/editing/commands/insert_text_command_test.cc b/third_party/blink/renderer/core/editing/commands/insert_text_command_test.cc
index abfe0844..b4718d1 100644
--- a/third_party/blink/renderer/core/editing/commands/insert_text_command_test.cc
+++ b/third_party/blink/renderer/core/editing/commands/insert_text_command_test.cc
@@ -278,8 +278,8 @@
   // Since the HTML parser rejects it as there are nested <a> elements.
   // We are contructing the remaining DOM manually.
   Element* const anchor = GetDocument().QuerySelector("a");
-  Element* nested_anchor = GetDocument().CreateRawElement(HTMLNames::aTag);
-  Element* iElement = GetDocument().CreateRawElement(HTMLNames::iTag);
+  Element* nested_anchor = GetDocument().CreateRawElement(html_names::kATag);
+  Element* iElement = GetDocument().CreateRawElement(html_names::kITag);
 
   nested_anchor->setAttribute("href", "www");
   iElement->SetInnerHTMLFromString("home");
diff --git a/third_party/blink/renderer/core/editing/commands/remove_format_command.cc b/third_party/blink/renderer/core/editing/commands/remove_format_command.cc
index 115c8a9..3e94ba14cc 100644
--- a/third_party/blink/renderer/core/editing/commands/remove_format_command.cc
+++ b/third_party/blink/renderer/core/editing/commands/remove_format_command.cc
@@ -39,7 +39,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 RemoveFormatCommand::RemoveFormatCommand(Document& document)
     : CompositeEditCommand(document) {}
@@ -48,10 +48,10 @@
   DEFINE_STATIC_LOCAL(
       HashSet<QualifiedName>, elements,
       ({
-          acronymTag, bTag,   bdoTag,  bigTag,  citeTag,  codeTag,
-          dfnTag,     emTag,  fontTag, iTag,    insTag,   kbdTag,
-          nobrTag,    qTag,   sTag,    sampTag, smallTag, strikeTag,
-          strongTag,  subTag, supTag,  ttTag,   uTag,     varTag,
+          kAcronymTag, kBTag,   kBdoTag,  kBigTag,  kCiteTag,  kCodeTag,
+          kDfnTag,     kEmTag,  kFontTag, kITag,    kInsTag,   kKbdTag,
+          kNobrTag,    kQTag,   kSTag,    kSampTag, kSmallTag, kStrikeTag,
+          kStrongTag,  kSubTag, kSupTag,  kTtTag,   kUTag,     kVarTag,
       }));
   return elements.Contains(element->TagQName());
 }
diff --git a/third_party/blink/renderer/core/editing/commands/replace_node_with_span_command.cc b/third_party/blink/renderer/core/editing/commands/replace_node_with_span_command.cc
index 99b746d..a464a4a5 100644
--- a/third_party/blink/renderer/core/editing/commands/replace_node_with_span_command.cc
+++ b/third_party/blink/renderer/core/editing/commands/replace_node_with_span_command.cc
@@ -39,8 +39,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 ReplaceNodeWithSpanCommand::ReplaceNodeWithSpanCommand(HTMLElement* element)
     : SimpleEditCommand(element->GetDocument()), element_to_replace_(element) {
   DCHECK(element_to_replace_);
diff --git a/third_party/blink/renderer/core/editing/commands/replace_selection_command.cc b/third_party/blink/renderer/core/editing/commands/replace_selection_command.cc
index c4a86e3..23eb9d69 100644
--- a/third_party/blink/renderer/core/editing/commands/replace_selection_command.cc
+++ b/third_party/blink/renderer/core/editing/commands/replace_selection_command.cc
@@ -71,7 +71,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 enum EFragmentType { kEmptyFragment, kSingleTextNodeFragment, kTreeFragment };
 
@@ -118,7 +118,7 @@
   DEFINE_STATIC_LOCAL(String, interchange_newline_class_string,
                       (AppleInterchangeNewline));
   if (!IsHTMLBRElement(node) ||
-      ToHTMLBRElement(node)->getAttribute(classAttr) !=
+      ToHTMLBRElement(node)->getAttribute(kClassAttr) !=
           interchange_newline_class_string)
     return false;
   UseCounter::Count(node->GetDocument(),
@@ -508,9 +508,9 @@
     return false;
 
   const HTMLElement& element = ToHTMLElement(*a);
-  return element.HasTagName(h1Tag) || element.HasTagName(h2Tag) ||
-         element.HasTagName(h3Tag) || element.HasTagName(h4Tag) ||
-         element.HasTagName(h5Tag) || element.HasTagName(h6Tag);
+  return element.HasTagName(kH1Tag) || element.HasTagName(kH2Tag) ||
+         element.HasTagName(kH3Tag) || element.HasTagName(kH4Tag) ||
+         element.HasTagName(kH5Tag) || element.HasTagName(kH6Tag);
 }
 
 static bool HaveSameTagName(Element* a, Element* b) {
@@ -527,7 +527,7 @@
   Element* source_block = EnclosingBlock(source_node);
   Element* destination_block = EnclosingBlock(destination_node);
   return source_block &&
-         (!source_block->HasTagName(blockquoteTag) ||
+         (!source_block->HasTagName(kBlockquoteTag) ||
           IsMailHTMLBlockquoteElement(source_block)) &&
          EnclosingListChild(source_block) ==
              EnclosingListChild(destination_node) &&
@@ -624,10 +624,10 @@
           return;
         continue;
       }
-      RemoveElementAttribute(element, styleAttr);
+      RemoveElementAttribute(element, kStyleAttr);
     } else if (new_inline_style->Style()->PropertyCount() !=
                inline_style->PropertyCount()) {
-      SetNodeAttribute(element, styleAttr,
+      SetNodeAttribute(element, kStyleAttr,
                        AtomicString(new_inline_style->Style()->AsText()));
     }
 
@@ -652,41 +652,42 @@
     if (element->parentNode() &&
         HasRichlyEditableStyle(*element->parentNode()) &&
         HasRichlyEditableStyle(*element)) {
-      RemoveElementAttribute(element, contenteditableAttr);
+      RemoveElementAttribute(element, kContenteditableAttr);
     }
   }
 }
 
 static bool IsProhibitedParagraphChild(const AtomicString& name) {
   // https://dvcs.w3.org/hg/editing/raw-file/57abe6d3cb60/editing.html#prohibited-paragraph-child
-  DEFINE_STATIC_LOCAL(HashSet<AtomicString>, elements,
-                      ({
-                          addressTag.LocalName(),   articleTag.LocalName(),
-                          asideTag.LocalName(),     blockquoteTag.LocalName(),
-                          captionTag.LocalName(),   centerTag.LocalName(),
-                          colTag.LocalName(),       colgroupTag.LocalName(),
-                          ddTag.LocalName(),        detailsTag.LocalName(),
-                          dirTag.LocalName(),       divTag.LocalName(),
-                          dlTag.LocalName(),        dtTag.LocalName(),
-                          fieldsetTag.LocalName(),  figcaptionTag.LocalName(),
-                          figureTag.LocalName(),    footerTag.LocalName(),
-                          formTag.LocalName(),      h1Tag.LocalName(),
-                          h2Tag.LocalName(),        h3Tag.LocalName(),
-                          h4Tag.LocalName(),        h5Tag.LocalName(),
-                          h6Tag.LocalName(),        headerTag.LocalName(),
-                          hgroupTag.LocalName(),    hrTag.LocalName(),
-                          liTag.LocalName(),        listingTag.LocalName(),
-                          mainTag.LocalName(),  // Missing in the specification.
-                          menuTag.LocalName(),      navTag.LocalName(),
-                          olTag.LocalName(),        pTag.LocalName(),
-                          plaintextTag.LocalName(), preTag.LocalName(),
-                          sectionTag.LocalName(),   summaryTag.LocalName(),
-                          tableTag.LocalName(),     tbodyTag.LocalName(),
-                          tdTag.LocalName(),        tfootTag.LocalName(),
-                          thTag.LocalName(),        theadTag.LocalName(),
-                          trTag.LocalName(),        ulTag.LocalName(),
-                          xmpTag.LocalName(),
-                      }));
+  DEFINE_STATIC_LOCAL(
+      HashSet<AtomicString>, elements,
+      ({
+          kAddressTag.LocalName(),   kArticleTag.LocalName(),
+          kAsideTag.LocalName(),     kBlockquoteTag.LocalName(),
+          kCaptionTag.LocalName(),   kCenterTag.LocalName(),
+          kColTag.LocalName(),       kColgroupTag.LocalName(),
+          kDdTag.LocalName(),        kDetailsTag.LocalName(),
+          kDirTag.LocalName(),       kDivTag.LocalName(),
+          kDlTag.LocalName(),        kDtTag.LocalName(),
+          kFieldsetTag.LocalName(),  kFigcaptionTag.LocalName(),
+          kFigureTag.LocalName(),    kFooterTag.LocalName(),
+          kFormTag.LocalName(),      kH1Tag.LocalName(),
+          kH2Tag.LocalName(),        kH3Tag.LocalName(),
+          kH4Tag.LocalName(),        kH5Tag.LocalName(),
+          kH6Tag.LocalName(),        kHeaderTag.LocalName(),
+          kHgroupTag.LocalName(),    kHrTag.LocalName(),
+          kLiTag.LocalName(),        kListingTag.LocalName(),
+          kMainTag.LocalName(),  // Missing in the specification.
+          kMenuTag.LocalName(),      kNavTag.LocalName(),
+          kOlTag.LocalName(),        kPTag.LocalName(),
+          kPlaintextTag.LocalName(), kPreTag.LocalName(),
+          kSectionTag.LocalName(),   kSummaryTag.LocalName(),
+          kTableTag.LocalName(),     kTbodyTag.LocalName(),
+          kTdTag.LocalName(),        kTfootTag.LocalName(),
+          kThTag.LocalName(),        kTheadTag.LocalName(),
+          kTrTag.LocalName(),        kUlTag.LocalName(),
+          kXmpTag.LocalName(),
+      }));
   return elements.Contains(name);
 }
 
@@ -711,7 +712,7 @@
     if (IsProhibitedParagraphChild(element.localName())) {
       if (HTMLElement* paragraph_element =
               ToHTMLElement(EnclosingElementWithTag(
-                  Position::InParentBeforeNode(element), pTag))) {
+                  Position::InParentBeforeNode(element), kPTag))) {
         MoveElementOutOfAncestor(&element, paragraph_element, editing_state);
         if (editing_state->IsAborted())
           return;
@@ -780,9 +781,9 @@
   if (last_leaf_inserted && last_leaf_inserted->IsTextNode() &&
       !NodeHasVisibleLayoutText(ToText(*last_leaf_inserted)) &&
       !EnclosingElementWithTag(FirstPositionInOrBeforeNode(*last_leaf_inserted),
-                               selectTag) &&
+                               kSelectTag) &&
       !EnclosingElementWithTag(FirstPositionInOrBeforeNode(*last_leaf_inserted),
-                               scriptTag)) {
+                               kScriptTag)) {
     inserted_nodes.WillRemoveNode(*last_leaf_inserted);
     // Removing a Text node won't dispatch synchronous events.
     RemoveNode(last_leaf_inserted, ASSERT_NO_EDITING_ABORT);
@@ -808,7 +809,7 @@
   // element, since contents of SELECT elements, e.g. OPTION, OPTGROUP, are
   // not editable, or SELECT element is an atomic on editing.
   HTMLSelectElement* enclosing_select = ToHTMLSelectElement(
-      EnclosingElementWithTag(end_of_inserted_content_, selectTag));
+      EnclosingElementWithTag(end_of_inserted_content_, kSelectTag));
   if (enclosing_select) {
     return CreateVisiblePosition(LastPositionInOrAfterNode(*enclosing_select));
   }
@@ -844,10 +845,10 @@
     return false;
 
   const HTMLElement& element = ToHTMLElement(*node);
-  return IsListItem(node) || IsTableCell(node) || element.HasTagName(preTag) ||
-         element.HasTagName(h1Tag) || element.HasTagName(h2Tag) ||
-         element.HasTagName(h3Tag) || element.HasTagName(h4Tag) ||
-         element.HasTagName(h5Tag) || element.HasTagName(h6Tag);
+  return IsListItem(node) || IsTableCell(node) || element.HasTagName(kPreTag) ||
+         element.HasTagName(kH1Tag) || element.HasTagName(kH2Tag) ||
+         element.HasTagName(kH3Tag) || element.HasTagName(kH4Tag) ||
+         element.HasTagName(kH5Tag) || element.HasTagName(kH6Tag);
 }
 
 // Remove style spans before insertion if they are unnecessary.  It's faster
@@ -891,7 +892,7 @@
 
   // FIXME: This string comparison is a naive way of comparing two styles.
   // We should be taking the diff and check that the diff is empty.
-  if (style_text != wrapping_style_span->getAttribute(styleAttr))
+  if (style_text != wrapping_style_span->getAttribute(kStyleAttr))
     return;
 
   fragment.RemoveNodePreservingChildren(wrapping_style_span);
@@ -1676,7 +1677,7 @@
   TextControlElement* text_control =
       EnclosingTextControl(PositionAtStartOfInsertedContent().DeepEquivalent());
   if (IsHTMLInputElement(text_control) &&
-      ToHTMLInputElement(text_control)->type() == InputTypeNames::password)
+      ToHTMLInputElement(text_control)->type() == input_type_names::kPassword)
     return false;  // Disable smart replace for password fields.
 
   return true;
diff --git a/third_party/blink/renderer/core/editing/commands/replace_selection_command_test.cc b/third_party/blink/renderer/core/editing/commands/replace_selection_command_test.cc
index 7a716b1ec..c38c90a 100644
--- a/third_party/blink/renderer/core/editing/commands/replace_selection_command_test.cc
+++ b/third_party/blink/renderer/core/editing/commands/replace_selection_command_test.cc
@@ -40,7 +40,7 @@
       SetSelectionOptions());
 
   DocumentFragment* fragment = GetDocument().createDocumentFragment();
-  fragment->AppendChild(GetDocument().CreateRawElement(HTMLNames::spanTag));
+  fragment->AppendChild(GetDocument().CreateRawElement(html_names::kSpanTag));
 
   // |options| are taken from |Editor::replaceSelectionWithFragment()| with
   // |selectReplacement| and |smartReplace|.
diff --git a/third_party/blink/renderer/core/editing/commands/split_element_command.cc b/third_party/blink/renderer/core/editing/commands/split_element_command.cc
index 4b239aa..08ad760 100644
--- a/third_party/blink/renderer/core/editing/commands/split_element_command.cc
+++ b/third_party/blink/renderer/core/editing/commands/split_element_command.cc
@@ -62,7 +62,7 @@
 
   // Delete id attribute from the second element because the same id cannot be
   // used for more than one element
-  element2_->removeAttribute(HTMLNames::idAttr);
+  element2_->removeAttribute(html_names::kIdAttr);
 
   for (const auto& child : children)
     element1_->AppendChild(child, exception_state);
@@ -88,9 +88,9 @@
     element2_->InsertBefore(child, ref_child, IGNORE_EXCEPTION_FOR_TESTING);
 
   // Recover the id attribute of the original element.
-  const AtomicString& id = element1_->getAttribute(HTMLNames::idAttr);
+  const AtomicString& id = element1_->getAttribute(html_names::kIdAttr);
   if (!id.IsNull())
-    element2_->setAttribute(HTMLNames::idAttr, id);
+    element2_->setAttribute(html_names::kIdAttr, id);
 
   element1_->remove(IGNORE_EXCEPTION_FOR_TESTING);
 }
diff --git a/third_party/blink/renderer/core/editing/commands/typing_command.cc b/third_party/blink/renderer/core/editing/commands/typing_command.cc
index 10f999ea..63581c5 100644
--- a/third_party/blink/renderer/core/editing/commands/typing_command.cc
+++ b/third_party/blink/renderer/core/editing/commands/typing_command.cc
@@ -162,8 +162,6 @@
 
 }  // anonymous namespace
 
-using namespace HTMLNames;
-
 TypingCommand::TypingCommand(Document& document,
                              ETypingCommand command_type,
                              const String& text_to_insert,
diff --git a/third_party/blink/renderer/core/editing/commands/typing_command_test.cc b/third_party/blink/renderer/core/editing/commands/typing_command_test.cc
index a020f98..c3a6062 100644
--- a/third_party/blink/renderer/core/editing/commands/typing_command_test.cc
+++ b/third_party/blink/renderer/core/editing/commands/typing_command_test.cc
@@ -27,14 +27,14 @@
   SetBodyContent("<div contenteditable></div>");
 
   // <input><form></form></input>
-  Element* input1 = GetDocument().CreateRawElement(HTMLNames::inputTag);
-  Element* form = GetDocument().CreateRawElement(HTMLNames::formTag);
+  Element* input1 = GetDocument().CreateRawElement(html_names::kInputTag);
+  Element* form = GetDocument().CreateRawElement(html_names::kFormTag);
   input1->AppendChild(form);
 
   // <tr><input><header></header></input><rbc></rbc></tr>
-  Element* tr = GetDocument().CreateRawElement(HTMLNames::trTag);
-  Element* input2 = GetDocument().CreateRawElement(HTMLNames::inputTag);
-  Element* header = GetDocument().CreateRawElement(HTMLNames::headerTag);
+  Element* tr = GetDocument().CreateRawElement(html_names::kTrTag);
+  Element* input2 = GetDocument().CreateRawElement(html_names::kInputTag);
+  Element* header = GetDocument().CreateRawElement(html_names::kHeaderTag);
   Element* rbc = GetDocument().CreateElementForBinding("rbc");
   input2->AppendChild(header);
   tr->AppendChild(input2);
diff --git a/third_party/blink/renderer/core/editing/editing_style.cc b/third_party/blink/renderer/core/editing/editing_style.cc
index 44dfbd757..71bae8f 100644
--- a/third_party/blink/renderer/core/editing/editing_style.cc
+++ b/third_party/blink/renderer/core/editing/editing_style.cc
@@ -384,8 +384,8 @@
 
 HTMLFontSizeEquivalent::HTMLFontSizeEquivalent()
     : HTMLAttributeEquivalent(CSSPropertyFontSize,
-                              HTMLNames::fontTag,
-                              HTMLNames::sizeAttr) {}
+                              html_names::kFontTag,
+                              html_names::kSizeAttr) {}
 
 const CSSValue* HTMLFontSizeEquivalent::AttributeValueAsCSSValue(
     Element* element) const {
@@ -975,24 +975,24 @@
                       (new HeapVector<Member<HTMLElementEquivalent>>));
   if (!html_element_equivalents->size()) {
     html_element_equivalents->push_back(HTMLElementEquivalent::Create(
-        CSSPropertyFontWeight, CSSValueBold, HTMLNames::bTag));
+        CSSPropertyFontWeight, CSSValueBold, html_names::kBTag));
     html_element_equivalents->push_back(HTMLElementEquivalent::Create(
-        CSSPropertyFontWeight, CSSValueBold, HTMLNames::strongTag));
+        CSSPropertyFontWeight, CSSValueBold, html_names::kStrongTag));
     html_element_equivalents->push_back(HTMLElementEquivalent::Create(
-        CSSPropertyVerticalAlign, CSSValueSub, HTMLNames::subTag));
+        CSSPropertyVerticalAlign, CSSValueSub, html_names::kSubTag));
     html_element_equivalents->push_back(HTMLElementEquivalent::Create(
-        CSSPropertyVerticalAlign, CSSValueSuper, HTMLNames::supTag));
+        CSSPropertyVerticalAlign, CSSValueSuper, html_names::kSupTag));
     html_element_equivalents->push_back(HTMLElementEquivalent::Create(
-        CSSPropertyFontStyle, CSSValueItalic, HTMLNames::iTag));
+        CSSPropertyFontStyle, CSSValueItalic, html_names::kITag));
     html_element_equivalents->push_back(HTMLElementEquivalent::Create(
-        CSSPropertyFontStyle, CSSValueItalic, HTMLNames::emTag));
+        CSSPropertyFontStyle, CSSValueItalic, html_names::kEmTag));
 
     html_element_equivalents->push_back(HTMLTextDecorationEquivalent::Create(
-        CSSValueUnderline, HTMLNames::uTag));
+        CSSValueUnderline, html_names::kUTag));
     html_element_equivalents->push_back(HTMLTextDecorationEquivalent::Create(
-        CSSValueLineThrough, HTMLNames::sTag));
+        CSSValueLineThrough, html_names::kSTag));
     html_element_equivalents->push_back(HTMLTextDecorationEquivalent::Create(
-        CSSValueLineThrough, HTMLNames::strikeTag));
+        CSSValueLineThrough, html_names::kStrikeTag));
   }
 
   return *html_element_equivalents;
@@ -1031,15 +1031,15 @@
     // HTMLAttriuteEquivalent matches exactly one attribute of exactly one
     // element except dirAttr.
     html_attribute_equivalents->push_back(HTMLAttributeEquivalent::Create(
-        CSSPropertyColor, HTMLNames::fontTag, HTMLNames::colorAttr));
+        CSSPropertyColor, html_names::kFontTag, html_names::kColorAttr));
     html_attribute_equivalents->push_back(HTMLAttributeEquivalent::Create(
-        CSSPropertyFontFamily, HTMLNames::fontTag, HTMLNames::faceAttr));
+        CSSPropertyFontFamily, html_names::kFontTag, html_names::kFaceAttr));
     html_attribute_equivalents->push_back(HTMLFontSizeEquivalent::Create());
 
     html_attribute_equivalents->push_back(HTMLAttributeEquivalent::Create(
-        CSSPropertyDirection, HTMLNames::dirAttr));
+        CSSPropertyDirection, html_names::kDirAttr));
     html_attribute_equivalents->push_back(HTMLAttributeEquivalent::Create(
-        CSSPropertyUnicodeBidi, HTMLNames::dirAttr));
+        CSSPropertyUnicodeBidi, html_names::kDirAttr));
   }
 
   return *html_attribute_equivalents;
@@ -1086,7 +1086,7 @@
     // unicode-bidi and direction are pushed down separately so don't push down
     // with other styles.
     if (should_preserve_writing_direction == kPreserveWritingDirection &&
-        equivalent->AttributeName() == HTMLNames::dirAttr)
+        equivalent->AttributeName() == html_names::kDirAttr)
       continue;
 
     if (!equivalent->Matches(element) ||
@@ -1141,7 +1141,7 @@
       html_attribute_equivalents = HtmlAttributeEquivalents();
   for (const auto& equivalent : html_attribute_equivalents) {
     if (equivalent->Matches(element) &&
-        equivalent->AttributeName() != HTMLNames::dirAttr)
+        equivalent->AttributeName() != html_names::kDirAttr)
       matched_attributes++;
   }
 
@@ -1150,7 +1150,7 @@
     return false;
   }
 
-  if (element->hasAttribute(HTMLNames::styleAttr)) {
+  if (element->hasAttribute(html_names::kStyleAttr)) {
     if (const CSSPropertyValueSet* style = element->InlineStyle()) {
       unsigned property_count = style->PropertyCount();
       for (unsigned i = 0; i < property_count; ++i) {
@@ -1306,7 +1306,7 @@
   const HeapVector<Member<HTMLAttributeEquivalent>>& attribute_equivalents =
       HtmlAttributeEquivalents();
   for (const auto& attribute : attribute_equivalents) {
-    if (attribute->AttributeName() == HTMLNames::dirAttr)
+    if (attribute->AttributeName() == html_names::kDirAttr)
       continue;  // We don't want to include directionality
     if (ElementMatchesAndPropertyIsNotInInlineStyleDecl(
             attribute.Get(), element, mode, mutable_style_.Get()))
diff --git a/third_party/blink/renderer/core/editing/editing_utilities.cc b/third_party/blink/renderer/core/editing/editing_utilities.cc
index 2e9b384..888ed30 100644
--- a/third_party/blink/renderer/core/editing/editing_utilities.cc
+++ b/third_party/blink/renderer/core/editing/editing_utilities.cc
@@ -80,7 +80,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 namespace {
 
@@ -1152,10 +1152,10 @@
     return false;
 
   const HTMLElement& element = ToHTMLElement(*node);
-  return element.HasTagName(uTag) || element.HasTagName(sTag) ||
-         element.HasTagName(strikeTag) || element.HasTagName(iTag) ||
-         element.HasTagName(emTag) || element.HasTagName(bTag) ||
-         element.HasTagName(strongTag);
+  return element.HasTagName(kUTag) || element.HasTagName(kSTag) ||
+         element.HasTagName(kStrikeTag) || element.HasTagName(kITag) ||
+         element.HasTagName(kEmTag) || element.HasTagName(kBTag) ||
+         element.HasTagName(kStrongTag);
 }
 
 Element* AssociatedElementOf(const Position& position) {
@@ -1314,7 +1314,7 @@
                                              Text* tab_text_node) {
   // Make the span to hold the tab.
   HTMLSpanElement* span_element = HTMLSpanElement::Create(document);
-  span_element->setAttribute(styleAttr, "white-space:pre");
+  span_element->setAttribute(kStyleAttr, "white-space:pre");
 
   // Add tab text to that span.
   if (!tab_text_node)
@@ -1405,7 +1405,7 @@
     return false;
 
   const HTMLElement& element = ToHTMLElement(*node);
-  return element.HasTagName(blockquoteTag) &&
+  return element.HasTagName(kBlockquoteTag) &&
          element.getAttribute("type") == "cite";
 }
 
@@ -1529,12 +1529,12 @@
     return false;
 
   const HTMLElement& element = ToHTMLElement(*node);
-  return element.HasTagName(listingTag) || element.HasTagName(olTag) ||
-         element.HasTagName(preTag) || element.HasTagName(tableTag) ||
-         element.HasTagName(ulTag) || element.HasTagName(xmpTag) ||
-         element.HasTagName(h1Tag) || element.HasTagName(h2Tag) ||
-         element.HasTagName(h3Tag) || element.HasTagName(h4Tag) ||
-         element.HasTagName(h5Tag);
+  return element.HasTagName(kListingTag) || element.HasTagName(kOlTag) ||
+         element.HasTagName(kPreTag) || element.HasTagName(kTableTag) ||
+         element.HasTagName(kUlTag) || element.HasTagName(kXmpTag) ||
+         element.HasTagName(kH1Tag) || element.HasTagName(kH2Tag) ||
+         element.HasTagName(kH3Tag) || element.HasTagName(kH4Tag) ||
+         element.HasTagName(kH5Tag);
 }
 
 bool IsBlockFlowElement(const Node& node) {
@@ -1546,7 +1546,8 @@
 bool IsInPasswordField(const Position& position) {
   TextControlElement* text_control = EnclosingTextControl(position);
   return IsHTMLInputElement(text_control) &&
-         ToHTMLInputElement(text_control)->type() == InputTypeNames::password;
+         ToHTMLInputElement(text_control)->type() ==
+             input_type_names::kPassword;
 }
 
 // If current position is at grapheme boundary, return 0; otherwise, return the
@@ -1721,7 +1722,7 @@
   // TODO(editing-dev): This should probably be reconciled with
   // HitTestResult::absoluteImageURL.
   if (IsHTMLImageElement(node) || IsHTMLInputElement(node))
-    return ToHTMLElement(node).getAttribute(srcAttr);
+    return ToHTMLElement(node).getAttribute(kSrcAttr);
   if (IsSVGImageElement(node))
     return ToSVGElement(node).ImageSourceURL();
   if (IsHTMLEmbedElement(node) || IsHTMLObjectElement(node) ||
diff --git a/third_party/blink/renderer/core/editing/editing_utilities_test.cc b/third_party/blink/renderer/core/editing/editing_utilities_test.cc
index 6e7fc9e..cb6102d 100644
--- a/third_party/blink/renderer/core/editing/editing_utilities_test.cc
+++ b/third_party/blink/renderer/core/editing/editing_utilities_test.cc
@@ -126,7 +126,7 @@
   // However, |setBodyContent()| automatically creates HTML, HEAD and BODY
   // element. So, we build DOM tree manually.
   // Note: This is unusual HTML taken from http://crbug.com/574230
-  Element* table = GetDocument().CreateRawElement(HTMLNames::tableTag);
+  Element* table = GetDocument().CreateRawElement(html_names::kTableTag);
   table->SetInnerHTMLFromString("<caption>foo</caption>");
   while (GetDocument().firstChild())
     GetDocument().firstChild()->remove();
diff --git a/third_party/blink/renderer/core/editing/editor.cc b/third_party/blink/renderer/core/editing/editor.cc
index 5357dc0a..3f52da5a 100644
--- a/third_party/blink/renderer/core/editing/editor.cc
+++ b/third_party/blink/renderer/core/editing/editor.cc
@@ -94,13 +94,13 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 namespace {
 
 bool IsInPasswordFieldWithUnrevealedPassword(const Position& position) {
   if (auto* input = ToHTMLInputElementOrNull(EnclosingTextControl(position))) {
-    return (input->type() == InputTypeNames::password) &&
+    return (input->type() == input_type_names::kPassword) &&
            !input->ShouldRevealPassword();
   }
   return false;
@@ -649,7 +649,7 @@
     if (direction == WritingDirection::kNatural)
       return;
     focused_element->setAttribute(
-        dirAttr, direction == WritingDirection::kLeftToRight ? "ltr" : "rtl");
+        kDirAttr, direction == WritingDirection::kLeftToRight ? "ltr" : "rtl");
     focused_element->DispatchInputEvent();
     return;
   }
diff --git a/third_party/blink/renderer/core/editing/finder/text_finder_test.cc b/third_party/blink/renderer/core/editing/finder/text_finder_test.cc
index 4e26a328..24dbed9 100644
--- a/third_party/blink/renderer/core/editing/finder/text_finder_test.cc
+++ b/third_party/blink/renderer/core/editing/finder/text_finder_test.cc
@@ -329,7 +329,7 @@
 
   // Modify the document size and ensure the cached match rects are recomputed
   // to reflect the updated layout.
-  GetDocument().body()->setAttribute(HTMLNames::styleAttr, "margin: 2000px");
+  GetDocument().body()->setAttribute(html_names::kStyleAttr, "margin: 2000px");
   GetDocument().UpdateStyleAndLayout();
 
   match_rects = GetTextFinder().FindMatchRects();
diff --git a/third_party/blink/renderer/core/editing/frame_selection.cc b/third_party/blink/renderer/core/editing/frame_selection.cc
index 10770500..9484cfa 100644
--- a/third_party/blink/renderer/core/editing/frame_selection.cc
+++ b/third_party/blink/renderer/core/editing/frame_selection.cc
@@ -90,8 +90,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 static inline bool ShouldAlwaysUseDirectionalSelection(LocalFrame* frame) {
   return frame->GetEditor().Behavior().ShouldConsiderSelectionAsDirectional();
 }
diff --git a/third_party/blink/renderer/core/editing/frame_selection_test.cc b/third_party/blink/renderer/core/editing/frame_selection_test.cc
index c1428c7d..eb3bbd5 100644
--- a/third_party/blink/renderer/core/editing/frame_selection_test.cc
+++ b/third_party/blink/renderer/core/editing/frame_selection_test.cc
@@ -97,7 +97,7 @@
                                    Position(text, 3), Position(text, 6)))
                                .Build(),
                            SetSelectionOptions());
-  sample->setAttribute(HTMLNames::styleAttr, "display:none");
+  sample->setAttribute(html_names::kStyleAttr, "display:none");
   // Move |VisibleSelection| before "abc".
   UpdateAllLifecyclePhases();
   const EphemeralRange& range =
@@ -304,7 +304,7 @@
 }
 
 TEST_F(FrameSelectionTest, SelectAllWithUnselectableRoot) {
-  Element* select = GetDocument().CreateRawElement(HTMLNames::selectTag);
+  Element* select = GetDocument().CreateRawElement(html_names::kSelectTag);
   GetDocument().ReplaceChild(select, GetDocument().documentElement());
   GetDocument().UpdateStyleAndLayout();
   Selection().SelectAll();
diff --git a/third_party/blink/renderer/core/editing/ime/input_method_controller.cc b/third_party/blink/renderer/core/editing/ime/input_method_controller.cc
index 317afcc..664a292 100644
--- a/third_party/blink/renderer/core/editing/ime/input_method_controller.cc
+++ b/third_party/blink/renderer/core/editing/ime/input_method_controller.cc
@@ -210,7 +210,7 @@
 
   // TODO(dtapuska): We may wish to restrict this to a yet to be proposed
   // <contenteditable> or <richtext> element Mozilla discussed at TPAC 2016.
-  return element->FastGetAttribute(HTMLNames::inputmodeAttr).LowerASCII();
+  return element->FastGetAttribute(html_names::kInputmodeAttr).LowerASCII();
 }
 
 constexpr int kInvalidDeletionLength = -1;
@@ -324,9 +324,9 @@
   // https://html.spec.whatwg.org/multipage/interaction.html#used-autocapitalization-hint
   if (auto* input = ToHTMLInputElementOrNull(*html_element)) {
     const AtomicString& input_type = input->type();
-    if (input_type == InputTypeNames::email ||
-        input_type == InputTypeNames::url ||
-        input_type == InputTypeNames::password) {
+    if (input_type == input_type_names::kEmail ||
+        input_type == input_type_names::kUrl ||
+        input_type == input_type_names::kPassword) {
       // The autocapitalize IDL attribute value is ignored for these input
       // types, so we set the None flag.
       return kWebTextInputFlagAutocapitalizeNone;
@@ -1338,14 +1338,14 @@
   int flags = 0;
 
   const AtomicString& autocomplete =
-      element->getAttribute(HTMLNames::autocompleteAttr);
+      element->getAttribute(html_names::kAutocompleteAttr);
   if (autocomplete == "on")
     flags |= kWebTextInputFlagAutocompleteOn;
   else if (autocomplete == "off")
     flags |= kWebTextInputFlagAutocompleteOff;
 
   const AtomicString& autocorrect =
-      element->getAttribute(HTMLNames::autocorrectAttr);
+      element->getAttribute(html_names::kAutocorrectAttr);
   if (autocorrect == "on")
     flags |= kWebTextInputFlagAutocorrectOn;
   else if (autocorrect == "off")
@@ -1440,19 +1440,19 @@
     if (input->IsDisabledOrReadOnly())
       return kWebTextInputTypeNone;
 
-    if (type == InputTypeNames::password)
+    if (type == input_type_names::kPassword)
       return kWebTextInputTypePassword;
-    if (type == InputTypeNames::search)
+    if (type == input_type_names::kSearch)
       return kWebTextInputTypeSearch;
-    if (type == InputTypeNames::email)
+    if (type == input_type_names::kEmail)
       return kWebTextInputTypeEmail;
-    if (type == InputTypeNames::number)
+    if (type == input_type_names::kNumber)
       return kWebTextInputTypeNumber;
-    if (type == InputTypeNames::tel)
+    if (type == input_type_names::kTel)
       return kWebTextInputTypeTelephone;
-    if (type == InputTypeNames::url)
+    if (type == input_type_names::kUrl)
       return kWebTextInputTypeURL;
-    if (type == InputTypeNames::text)
+    if (type == input_type_names::kText)
       return kWebTextInputTypeText;
 
     return kWebTextInputTypeNone;
diff --git a/third_party/blink/renderer/core/editing/ime/input_method_controller_test.cc b/third_party/blink/renderer/core/editing/ime/input_method_controller_test.cc
index 34fefa1e..8f49ce2 100644
--- a/third_party/blink/renderer/core/editing/ime/input_method_controller_test.cc
+++ b/third_party/blink/renderer/core/editing/ime/input_method_controller_test.cc
@@ -56,7 +56,7 @@
   GetDocument().GetSettings()->SetScriptEnabled(true);
   Element* editable =
       InsertHTMLElement("<div id='sample' contenteditable></div>", "sample");
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.getElementById('sample').addEventListener('beforeinput', "
       "  event => document.title = `beforeinput.data:${event.data};`);"
@@ -74,7 +74,7 @@
   GetDocument().GetSettings()->SetScriptEnabled(true);
   Element* editable =
       InsertHTMLElement("<div id='sample' contentEditable></div>", "sample");
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
 
   switch (type) {
     case kNoSelection:
@@ -1192,7 +1192,7 @@
   GetDocument().GetSettings()->SetScriptEnabled(true);
   Element* editable =
       InsertHTMLElement("<div id='sample' contenteditable></div>", "sample");
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.getElementById('sample').addEventListener('beforeinput', "
       "  event => document.title = "
@@ -2546,7 +2546,7 @@
   InsertHTMLElement("<div id='sample' contenteditable>hello</div>", "sample");
 
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.getElementById('sample').addEventListener('input', "
       "  event => {"
@@ -2581,7 +2581,7 @@
       "<div id='sample' contenteditable>hello world</div>", "sample");
 
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.getElementById('sample').addEventListener('input', "
       "  event => {"
@@ -2619,7 +2619,7 @@
                     "sample");
 
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.getElementById('sample').addEventListener('input', "
       "  event => {"
@@ -2652,7 +2652,7 @@
                     "sample");
 
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.getElementById('sample').addEventListener('input', "
       "  event => {"
@@ -2686,7 +2686,7 @@
                     "sample");
 
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.getElementById('sample').addEventListener('input', "
       "  event => {"
@@ -2720,7 +2720,7 @@
                     "sample");
 
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.getElementById('sample').addEventListener('input', "
       "  event => {"
@@ -2753,7 +2753,7 @@
       "<div id='sample' contenteditable>hello world</div>", "sample");
 
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.getElementById('sample').addEventListener('input', "
       "  event => {"
@@ -2790,7 +2790,7 @@
   InsertHTMLElement("<div id='sample' contenteditable>hello</div>", "sample");
 
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.getElementById('sample').addEventListener('compositionend', "
       "  event => {"
@@ -2826,7 +2826,7 @@
                     "sample");
 
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.getElementById('sample').addEventListener('compositionend', "
       "  event => {"
@@ -2860,7 +2860,7 @@
                     "sample");
 
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.getElementById('sample').addEventListener('compositionend', "
       "  event => {"
@@ -2893,7 +2893,7 @@
                     "sample");
 
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.getElementById('sample').addEventListener('compositionend', "
       "  event => {"
@@ -2925,7 +2925,7 @@
                     "sample");
 
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.getElementById('sample').addEventListener('compositionend', "
       "  event => {"
@@ -2957,7 +2957,7 @@
       InsertHTMLElement("<input id='sample' maxlength='2'>", "sample"));
 
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.getElementById('sample').addEventListener('input', "
       "  event => {"
@@ -2987,7 +2987,7 @@
       InsertHTMLElement("<input id='sample' maxlength='2'>", "sample"));
 
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.getElementById('sample').addEventListener('input', "
       "  event => {"
@@ -3017,7 +3017,7 @@
       InsertHTMLElement("<input id='sample' maxlength='2'>", "sample"));
 
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.getElementById('sample').addEventListener('compositionend', "
       "  event => {"
@@ -3049,7 +3049,7 @@
       InsertHTMLElement("<input id='sample' maxlength='2'>", "sample"));
 
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.getElementById('sample').addEventListener('compositionend', "
       "  event => {"
diff --git a/third_party/blink/renderer/core/editing/iterators/text_iterator.cc b/third_party/blink/renderer/core/editing/iterators/text_iterator.cc
index a81a347..ec96922 100644
--- a/third_party/blink/renderer/core/editing/iterators/text_iterator.cc
+++ b/third_party/blink/renderer/core/editing/iterators/text_iterator.cc
@@ -50,7 +50,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 namespace {
 
@@ -489,7 +489,7 @@
   if (IsHTMLImageElement(element))
     return true;
   if (IsHTMLInputElement(element) &&
-      ToHTMLInputElement(node).type() == InputTypeNames::image)
+      ToHTMLInputElement(node).type() == input_type_names::kImage)
     return true;
   return false;
 }
@@ -577,16 +577,16 @@
   if (!r) {
     if (HasDisplayContents(node))
       return false;
-    return (node.HasTagName(blockquoteTag) || node.HasTagName(ddTag) ||
-            node.HasTagName(divTag) || node.HasTagName(dlTag) ||
-            node.HasTagName(dtTag) || node.HasTagName(h1Tag) ||
-            node.HasTagName(h2Tag) || node.HasTagName(h3Tag) ||
-            node.HasTagName(h4Tag) || node.HasTagName(h5Tag) ||
-            node.HasTagName(h6Tag) || node.HasTagName(hrTag) ||
-            node.HasTagName(liTag) || node.HasTagName(listingTag) ||
-            node.HasTagName(olTag) || node.HasTagName(pTag) ||
-            node.HasTagName(preTag) || node.HasTagName(trTag) ||
-            node.HasTagName(ulTag));
+    return (node.HasTagName(kBlockquoteTag) || node.HasTagName(kDdTag) ||
+            node.HasTagName(kDivTag) || node.HasTagName(kDlTag) ||
+            node.HasTagName(kDtTag) || node.HasTagName(kH1Tag) ||
+            node.HasTagName(kH2Tag) || node.HasTagName(kH3Tag) ||
+            node.HasTagName(kH4Tag) || node.HasTagName(kH5Tag) ||
+            node.HasTagName(kH6Tag) || node.HasTagName(kHrTag) ||
+            node.HasTagName(kLiTag) || node.HasTagName(kListingTag) ||
+            node.HasTagName(kOlTag) || node.HasTagName(kPTag) ||
+            node.HasTagName(kPreTag) || node.HasTagName(kTrTag) ||
+            node.HasTagName(kUlTag));
   }
 
   // Need to make an exception for option and optgroup, because we want to
@@ -642,7 +642,7 @@
   if (!r || !r->IsBox())
     return false;
 
-  return node->HasTagName(pTag);
+  return node->HasTagName(kPTag);
 }
 
 // Whether or not we should emit a character as we enter node_ (if it's a
diff --git a/third_party/blink/renderer/core/editing/iterators/text_iterator_test.cc b/third_party/blink/renderer/core/editing/iterators/text_iterator_test.cc
index 2221e11..c6ab879 100644
--- a/third_party/blink/renderer/core/editing/iterators/text_iterator_test.cc
+++ b/third_party/blink/renderer/core/editing/iterators/text_iterator_test.cc
@@ -1066,7 +1066,7 @@
   SetBodyContent("<input id='a' value='b'>");
   auto* input_element = ToTextControl(GetDocument().getElementById("a"));
   Element* inner_editor = input_element->InnerEditorElement();
-  Element* br = GetDocument().CreateRawElement(HTMLNames::brTag);
+  Element* br = GetDocument().CreateRawElement(html_names::kBrTag);
   inner_editor->AppendChild(br);
   const ShadowRoot* shadow_root = input_element->UserAgentShadowRoot();
   const Position start = Position::FirstPositionInNode(*shadow_root);
diff --git a/third_party/blink/renderer/core/editing/markers/document_marker_controller_test.cc b/third_party/blink/renderer/core/editing/markers/document_marker_controller_test.cc
index 3474937..3eea48ee 100644
--- a/third_party/blink/renderer/core/editing/markers/document_marker_controller_test.cc
+++ b/third_party/blink/renderer/core/editing/markers/document_marker_controller_test.cc
@@ -219,7 +219,7 @@
       MarkerController().LayoutRectsForTextMatchMarkers();
   EXPECT_EQ(1u, rendered_rects.size());
 
-  div->setAttribute(HTMLNames::styleAttr, "margin: 200px");
+  div->setAttribute(html_names::kStyleAttr, "margin: 200px");
   GetDocument().UpdateStyleAndLayout();
   Vector<IntRect> new_rendered_rects =
       MarkerController().LayoutRectsForTextMatchMarkers();
diff --git a/third_party/blink/renderer/core/editing/selection_controller_test.cc b/third_party/blink/renderer/core/editing/selection_controller_test.cc
index f07c5c7..d44cf10 100644
--- a/third_party/blink/renderer/core/editing/selection_controller_test.cc
+++ b/third_party/blink/renderer/core/editing/selection_controller_test.cc
@@ -110,7 +110,7 @@
   const char* body_content = "<div id='sample' contenteditable>sample</div>";
   SetBodyContent(body_content);
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "var sample = document.getElementById('sample');"
       "sample.addEventListener('onselectstart', "
@@ -144,7 +144,7 @@
 TEST_F(SelectionControllerTest,
        SetCaretAtHitTestResultWithDisconnectedPosition) {
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.designMode = 'on';"
       "const selection = window.getSelection();"
diff --git a/third_party/blink/renderer/core/editing/serializers/markup_accumulator.cc b/third_party/blink/renderer/core/editing/serializers/markup_accumulator.cc
index ca34467..1b56a06 100644
--- a/third_party/blink/renderer/core/editing/serializers/markup_accumulator.cc
+++ b/third_party/blink/renderer/core/editing/serializers/markup_accumulator.cc
@@ -119,8 +119,8 @@
     // 3.2. Element: If current node's is value is not null, and the
     // element does not have an is attribute in its attribute list, ...
     const AtomicString& is_value = element.IsValue();
-    if (!is_value.IsNull() && !attributes.Find(HTMLNames::isAttr)) {
-      AppendAttribute(result, element, Attribute(HTMLNames::isAttr, is_value),
+    if (!is_value.IsNull() && !attributes.Find(html_names::kIsAttr)) {
+      AppendAttribute(result, element, Attribute(html_names::kIsAttr, is_value),
                       namespaces);
     }
   }
diff --git a/third_party/blink/renderer/core/editing/serializers/markup_formatter.cc b/third_party/blink/renderer/core/editing/serializers/markup_formatter.cc
index f731c72..63c365f1 100644
--- a/third_party/blink/renderer/core/editing/serializers/markup_formatter.cc
+++ b/third_party/blink/renderer/core/editing/serializers/markup_formatter.cc
@@ -46,7 +46,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 struct EntityDescription {
   UChar entity;
@@ -476,11 +476,11 @@
     parent_name = &(text.parentElement())->TagQName();
 
   if (parent_name &&
-      (*parent_name == scriptTag || *parent_name == styleTag ||
-       *parent_name == xmpTag || *parent_name == iframeTag ||
-       *parent_name == plaintextTag || *parent_name == noembedTag ||
-       *parent_name == noframesTag ||
-       (*parent_name == noscriptTag && text.GetDocument().GetFrame() &&
+      (*parent_name == kScriptTag || *parent_name == kStyleTag ||
+       *parent_name == kXmpTag || *parent_name == kIFrameTag ||
+       *parent_name == kPlaintextTag || *parent_name == kNoembedTag ||
+       *parent_name == kNoframesTag ||
+       (*parent_name == kNoscriptTag && text.GetDocument().GetFrame() &&
         text.GetDocument().CanExecuteScripts(kNotAboutToExecuteScript))))
     return kEntityMaskInCDATA;
   return kEntityMaskInHTMLPCDATA;
diff --git a/third_party/blink/renderer/core/editing/serializers/serialization.cc b/third_party/blink/renderer/core/editing/serializers/serialization.cc
index 96cb812..0ad4d70e 100644
--- a/third_party/blink/renderer/core/editing/serializers/serialization.cc
+++ b/third_party/blink/renderer/core/editing/serializers/serialization.cc
@@ -71,7 +71,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 class AttributeChange {
   DISALLOW_NEW();
@@ -130,7 +130,7 @@
   if (!common_ancestor_block)
     return nullptr;
 
-  if (common_ancestor_block->HasTagName(tbodyTag) ||
+  if (common_ancestor_block->HasTagName(kTbodyTag) ||
       IsHTMLTableRowElement(*common_ancestor_block))
     return Traversal<HTMLTableElement>::FirstAncestor(*common_ancestor_block);
 
@@ -243,7 +243,7 @@
               Position::FirstPositionInNode(special_common_ancestor
                                                 ? *special_common_ancestor
                                                 : *common_ancestor),
-              aTag)))
+              kATag)))
     special_common_ancestor = enclosing_anchor;
 
   return special_common_ancestor;
@@ -551,7 +551,7 @@
     fragment->AppendChild(document.createTextNode(string));
     if (string.EndsWith('\n')) {
       HTMLBRElement* element = HTMLBRElement::Create(document);
-      element->setAttribute(classAttr, AppleInterchangeNewline);
+      element->setAttribute(kClassAttr, AppleInterchangeNewline);
       fragment->AppendChild(element);
     }
     return fragment;
@@ -581,7 +581,7 @@
     if (s.IsEmpty() && i + 1 == num_lines) {
       // For last line, use the "magic BR" rather than a P.
       element = HTMLBRElement::Create(document);
-      element->setAttribute(classAttr, AppleInterchangeNewline);
+      element->setAttribute(kClassAttr, AppleInterchangeNewline);
     } else {
       if (use_clones_of_enclosing_block)
         element = block->CloneWithoutChildren();
diff --git a/third_party/blink/renderer/core/editing/serializers/styled_markup_accumulator.cc b/third_party/blink/renderer/core/editing/serializers/styled_markup_accumulator.cc
index aa9f5f3..fb27d4ca 100644
--- a/third_party/blink/renderer/core/editing/serializers/styled_markup_accumulator.cc
+++ b/third_party/blink/renderer/core/editing/serializers/styled_markup_accumulator.cc
@@ -49,7 +49,7 @@
 
 }  // namespace
 
-using namespace HTMLNames;
+using namespace html_names;
 
 StyledMarkupAccumulator::StyledMarkupAccumulator(
     EAbsoluteURLs should_resolve_urls,
@@ -116,7 +116,7 @@
     AppendText(text);
   } else {
     const bool use_rendered_text = !EnclosingElementWithTag(
-        Position::FirstPositionInNode(text), selectTag);
+        Position::FirstPositionInNode(text), kSelectTag);
     String content =
         use_rendered_text ? RenderedText(text) : StringValueForRange(text);
     StringBuilder buffer;
@@ -143,7 +143,7 @@
   AttributeCollection attributes = element.Attributes();
   for (const auto& attribute : attributes) {
     // We'll handle the style attribute separately, below.
-    if (attribute.GetName() == styleAttr)
+    if (attribute.GetName() == kStyleAttr)
       continue;
     formatter_.AppendAttribute(out, element, attribute, nullptr);
   }
diff --git a/third_party/blink/renderer/core/editing/serializers/styled_markup_serializer.cc b/third_party/blink/renderer/core/editing/serializers/styled_markup_serializer.cc
index 7e53181..5a0865a 100644
--- a/third_party/blink/renderer/core/editing/serializers/styled_markup_serializer.cc
+++ b/third_party/blink/renderer/core/editing/serializers/styled_markup_serializer.cc
@@ -79,7 +79,7 @@
 
 }  // namespace
 
-using namespace HTMLNames;
+using namespace html_names;
 
 template <typename Strategy>
 class StyledMarkupTraverser {
@@ -230,7 +230,7 @@
         *start_.ComputeContainerNode(), *end_.ComputeContainerNode());
     DCHECK(common_ancestor);
     HTMLBodyElement* body = ToHTMLBodyElement(EnclosingElementWithTag(
-        Position::FirstPositionInNode(*common_ancestor), bodyTag));
+        Position::FirstPositionInNode(*common_ancestor), kBodyTag));
     HTMLBodyElement* fully_selected_root = nullptr;
     // FIXME: Do this for all fully selected blocks, not just the body.
     if (body && AreSameRanges(body, start_, end_))
@@ -252,10 +252,10 @@
              !fully_selected_root_style->Style() ||
              !fully_selected_root_style->Style()->GetPropertyCSSValue(
                  CSSPropertyBackgroundImage)) &&
-            fully_selected_root->hasAttribute(backgroundAttr)) {
+            fully_selected_root->hasAttribute(kBackgroundAttr)) {
           fully_selected_root_style->Style()->SetProperty(
               CSSPropertyBackgroundImage,
-              "url('" + fully_selected_root->getAttribute(backgroundAttr) +
+              "url('" + fully_selected_root->getAttribute(kBackgroundAttr) +
                   "')",
               /* important */ false,
               fully_selected_root->GetDocument().GetSecureContextMode());
@@ -361,7 +361,7 @@
       if (!n->GetLayoutObject() &&
           (!n->IsElementNode() || !ToElement(n)->HasDisplayContentsStyle()) &&
           !EnclosingElementWithTag(FirstPositionInOrBeforeNode(*n),
-                                   selectTag)) {
+                                   kSelectTag)) {
         next = Strategy::NextSkippingChildren(*n);
         // Don't skip over pastEnd.
         if (past_end && Strategy::IsDescendantOf(*past_end, *n))
diff --git a/third_party/blink/renderer/core/editing/spellcheck/spell_checker.cc b/third_party/blink/renderer/core/editing/spellcheck/spell_checker.cc
index 83d3f34..dc4e797 100644
--- a/third_party/blink/renderer/core/editing/spellcheck/spell_checker.cc
+++ b/third_party/blink/renderer/core/editing/spellcheck/spell_checker.cc
@@ -59,8 +59,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 namespace {
 
 static bool IsWhiteSpaceOrPunctuation(UChar c) {
@@ -756,7 +754,7 @@
     if (auto* input = ToHTMLInputElementOrNull(text_control)) {
       // TODO(tkent): The following password type check should be done in
       // HTMLElement::spellcheck(). crbug.com/371567
-      if (input->type() == InputTypeNames::password)
+      if (input->type() == input_type_names::kPassword)
         return false;
       if (!input->IsFocusedElementInDocument())
         return false;
diff --git a/third_party/blink/renderer/core/editing/testing/editing_test_base.cc b/third_party/blink/renderer/core/editing/testing/editing_test_base.cc
index 06a7691..f768825 100644
--- a/third_party/blink/renderer/core/editing/testing/editing_test_base.cc
+++ b/third_party/blink/renderer/core/editing/testing/editing_test_base.cc
@@ -37,10 +37,11 @@
 EditingTestBase::~EditingTestBase() = default;
 
 void EditingTestBase::InsertStyleElement(const std::string& style_rules) {
-  Element* const head = GetOrCreateElement(&GetDocument(), HTMLNames::headTag);
-  DCHECK_EQ(head, GetOrCreateElement(&GetDocument(), HTMLNames::headTag));
+  Element* const head =
+      GetOrCreateElement(&GetDocument(), html_names::kHeadTag);
+  DCHECK_EQ(head, GetOrCreateElement(&GetDocument(), html_names::kHeadTag));
   Element* const style = GetDocument().CreateRawElement(
-      HTMLNames::styleTag, CreateElementFlags::ByCreateElement());
+      html_names::kStyleTag, CreateElementFlags::ByCreateElement());
   style->setTextContent(String(style_rules.data(), style_rules.size()));
   head->appendChild(style);
 }
diff --git a/third_party/blink/renderer/core/editing/testing/selection_sample_test.cc b/third_party/blink/renderer/core/editing/testing/selection_sample_test.cc
index dbbcd24..75b43ee 100644
--- a/third_party/blink/renderer/core/editing/testing/selection_sample_test.cc
+++ b/third_party/blink/renderer/core/editing/testing/selection_sample_test.cc
@@ -241,7 +241,7 @@
 }
 
 TEST_F(SelectionSampleTest, SerializeVoidElementBR) {
-  Element* const br = GetDocument().CreateRawElement(HTMLNames::brTag);
+  Element* const br = GetDocument().CreateRawElement(html_names::kBrTag);
   br->appendChild(GetDocument().createTextNode("abc"));
   GetDocument().body()->appendChild(br);
   EXPECT_EQ(
diff --git a/third_party/blink/renderer/core/editing/visible_position.cc b/third_party/blink/renderer/core/editing/visible_position.cc
index 4a013d1..71dab2a 100644
--- a/third_party/blink/renderer/core/editing/visible_position.cc
+++ b/third_party/blink/renderer/core/editing/visible_position.cc
@@ -41,8 +41,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 template <typename Strategy>
 VisiblePositionTemplate<Strategy>::VisiblePositionTemplate()
 #if DCHECK_IS_ON()
diff --git a/third_party/blink/renderer/core/editing/visible_position_test.cc b/third_party/blink/renderer/core/editing/visible_position_test.cc
index cb28a35..bccee75d 100644
--- a/third_party/blink/renderer/core/editing/visible_position_test.cc
+++ b/third_party/blink/renderer/core/editing/visible_position_test.cc
@@ -69,7 +69,7 @@
   VisiblePosition null_visible_position;
   VisiblePosition non_null_visible_position = CreateVisiblePosition(position);
 
-  Element* div = GetDocument().CreateRawElement(HTMLNames::divTag);
+  Element* div = GetDocument().CreateRawElement(html_names::kDivTag);
   GetDocument().body()->AppendChild(div);
 
   EXPECT_TRUE(null_visible_position.IsValid());
diff --git a/third_party/blink/renderer/core/editing/visible_selection_test.cc b/third_party/blink/renderer/core/editing/visible_selection_test.cc
index 87cdec2..2a4a891 100644
--- a/third_party/blink/renderer/core/editing/visible_selection_test.cc
+++ b/third_party/blink/renderer/core/editing/visible_selection_test.cc
@@ -685,7 +685,7 @@
 // This is a regression test for https://crbug.com/825120
 TEST_F(VisibleSelectionTest, BackwardSelectionWithMultipleEmptyBodies) {
   Element* body = GetDocument().body();
-  Element* new_body = GetDocument().CreateRawElement(HTMLNames::bodyTag);
+  Element* new_body = GetDocument().CreateRawElement(html_names::kBodyTag);
   body->appendChild(new_body);
   GetDocument().UpdateStyleAndLayout();
 
diff --git a/third_party/blink/renderer/core/editing/visible_units_test.cc b/third_party/blink/renderer/core/editing/visible_units_test.cc
index cd11696..35a139a 100644
--- a/third_party/blink/renderer/core/editing/visible_units_test.cc
+++ b/third_party/blink/renderer/core/editing/visible_units_test.cc
@@ -103,7 +103,7 @@
   Node* two = GetDocument().QuerySelector("#two");
   Node* three = GetDocument().QuerySelector("#three");
   Node* four = GetDocument().QuerySelector("#four");
-  Element* html = GetDocument().CreateRawElement(HTMLNames::htmlTag);
+  Element* html = GetDocument().CreateRawElement(html_names::kHTMLTag);
   // Move two, three and four into second html element.
   html->AppendChild(two);
   html->AppendChild(three);
@@ -282,7 +282,7 @@
   Node* two = GetDocument().QuerySelector("#two");
   Node* three = GetDocument().QuerySelector("#three");
   Node* four = GetDocument().QuerySelector("#four");
-  Element* html = GetDocument().CreateRawElement(HTMLNames::htmlTag);
+  Element* html = GetDocument().CreateRawElement(html_names::kHTMLTag);
   // Move two, three and four into second html element.
   html->AppendChild(two);
   html->AppendChild(three);
@@ -319,10 +319,10 @@
   Node* two = GetDocument().QuerySelector("#two");
   Node* three = GetDocument().QuerySelector("#three");
   Node* four = GetDocument().QuerySelector("#four");
-  Element* body = GetDocument().CreateRawElement(HTMLNames::bodyTag);
-  Element* empty_body = GetDocument().CreateRawElement(HTMLNames::bodyTag);
-  Element* div = GetDocument().CreateRawElement(HTMLNames::divTag);
-  Element* br = GetDocument().CreateRawElement(HTMLNames::brTag);
+  Element* body = GetDocument().CreateRawElement(html_names::kBodyTag);
+  Element* empty_body = GetDocument().CreateRawElement(html_names::kBodyTag);
+  Element* div = GetDocument().CreateRawElement(html_names::kDivTag);
+  Element* br = GetDocument().CreateRawElement(html_names::kBrTag);
   empty_body->appendChild(div);
   empty_body->appendChild(br);
   one->appendChild(empty_body);
diff --git a/third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc b/third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc
index 6a45377..41db169 100644
--- a/third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc
@@ -77,7 +77,6 @@
 #include "third_party/blink/renderer/core/inspector/inspector_session.h"
 #include "third_party/blink/renderer/core/inspector/inspector_task_runner.h"
 #include "third_party/blink/renderer/core/inspector/inspector_testing_agent.h"
-#include "third_party/blink/renderer/core/inspector/inspector_worker_agent.h"
 #include "third_party/blink/renderer/core/inspector/main_thread_debugger.h"
 #include "third_party/blink/renderer/core/layout/layout_view.h"
 #include "third_party/blink/renderer/core/page/focus_controller.h"
@@ -239,9 +238,6 @@
   inspector_session->Append(
       InspectorApplicationCacheAgent::Create(inspected_frames));
 
-  inspector_session->Append(
-      new InspectorWorkerAgent(inspected_frames, nullptr));
-
   InspectorPageAgent* page_agent = InspectorPageAgent::Create(
       inspected_frames, this, resource_content_loader_.Get(),
       inspector_session->V8Session());
@@ -355,7 +351,7 @@
     mojom::blink::DevToolsAgentAssociatedRequest request) {
   agent_->BindRequest(
       std::move(host_ptr_info), std::move(request),
-      web_local_frame_impl_->GetTaskRunner(blink::TaskType::kInternalDefault));
+      web_local_frame_impl_->GetTaskRunner(TaskType::kInternalInspector));
 }
 
 void WebDevToolsAgentImpl::DetachSession(InspectorSession* session) {
@@ -410,6 +406,10 @@
   }
 }
 
+void WebDevToolsAgentImpl::DebuggerTaskStarted() {}
+
+void WebDevToolsAgentImpl::DebuggerTaskFinished() {}
+
 void WebDevToolsAgentImpl::DidCommitLoadForLocalFrame(LocalFrame* frame) {
   resource_container_->DidCommitLoadForLocalFrame(frame);
   resource_content_loader_->DidCommitLoadForLocalFrame(frame);
diff --git a/third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.h b/third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.h
index 5a8ccedf..e2735a9 100644
--- a/third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.h
+++ b/third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.h
@@ -72,6 +72,7 @@
                                                WorkerClient*);
   ~WebDevToolsAgentImpl() override;
   virtual void Trace(blink::Visitor*);
+  DevToolsAgent* GetDevToolsAgent() const { return agent_.Get(); }
 
   void WillBeDestroyed();
   void FlushProtocolNotifications();
@@ -100,6 +101,8 @@
       mojom::blink::DevToolsSessionStatePtr reattach_session_state) override;
   void DetachSession(InspectorSession*) override;
   void InspectElement(const WebPoint& point_in_local_root) override;
+  void DebuggerTaskStarted() override;
+  void DebuggerTaskFinished() override;
 
   // InspectorPageAgent::Client implementation.
   void PageLayoutInvalidated(bool resized) override;
diff --git a/third_party/blink/renderer/core/exported/web_document.cc b/third_party/blink/renderer/core/exported/web_document.cc
index 5bee06d9..c19761a 100644
--- a/third_party/blink/renderer/core/exported/web_document.cc
+++ b/third_party/blink/renderer/core/exported/web_document.cc
@@ -270,7 +270,7 @@
   if (!link_element)
     return false;
   return EqualIgnoringASCIICase(
-      link_element->FastGetAttribute(HTMLNames::crossoriginAttr),
+      link_element->FastGetAttribute(html_names::kCrossoriginAttr),
       "use-credentials");
 }
 
diff --git a/third_party/blink/renderer/core/exported/web_document_test.cc b/third_party/blink/renderer/core/exported/web_document_test.cc
index 58b33555..6e13d631 100644
--- a/third_party/blink/renderer/core/exported/web_document_test.cc
+++ b/third_party/blink/renderer/core/exported/web_document_test.cc
@@ -143,12 +143,12 @@
   ASSERT_EQ(link_manifest->Href(), static_cast<KURL>(web_doc.ManifestURL()));
 
   // Set to some absolute url.
-  link_manifest->setAttribute(HTMLNames::hrefAttr,
+  link_manifest->setAttribute(html_names::kHrefAttr,
                               "http://example.com/manifest.json");
   ASSERT_EQ(link_manifest->Href(), static_cast<KURL>(web_doc.ManifestURL()));
 
   // Set to some relative url.
-  link_manifest->setAttribute(HTMLNames::hrefAttr, "static/manifest.json");
+  link_manifest->setAttribute(html_names::kHrefAttr, "static/manifest.json");
   ASSERT_EQ(link_manifest->Href(), static_cast<KURL>(web_doc.ManifestURL()));
 }
 
@@ -160,19 +160,19 @@
   HTMLLinkElement* link_manifest = document->LinkManifest();
 
   // No crossorigin attribute was set so credentials shouldn't be used.
-  ASSERT_FALSE(link_manifest->FastHasAttribute(HTMLNames::crossoriginAttr));
+  ASSERT_FALSE(link_manifest->FastHasAttribute(html_names::kCrossoriginAttr));
   ASSERT_FALSE(web_doc.ManifestUseCredentials());
 
   // Crossorigin set to a random string shouldn't trigger using credentials.
-  link_manifest->setAttribute(HTMLNames::crossoriginAttr, "foobar");
+  link_manifest->setAttribute(html_names::kCrossoriginAttr, "foobar");
   ASSERT_FALSE(web_doc.ManifestUseCredentials());
 
   // Crossorigin set to 'anonymous' shouldn't trigger using credentials.
-  link_manifest->setAttribute(HTMLNames::crossoriginAttr, "anonymous");
+  link_manifest->setAttribute(html_names::kCrossoriginAttr, "anonymous");
   ASSERT_FALSE(web_doc.ManifestUseCredentials());
 
   // Crossorigin set to 'use-credentials' should trigger using credentials.
-  link_manifest->setAttribute(HTMLNames::crossoriginAttr, "use-credentials");
+  link_manifest->setAttribute(html_names::kCrossoriginAttr, "use-credentials");
   ASSERT_TRUE(web_doc.ManifestUseCredentials());
 }
 
diff --git a/third_party/blink/renderer/core/exported/web_element.cc b/third_party/blink/renderer/core/exported/web_element.cc
index 24931b7..3adf980 100644
--- a/third_party/blink/renderer/core/exported/web_element.cc
+++ b/third_party/blink/renderer/core/exported/web_element.cc
@@ -46,7 +46,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 bool WebElement::IsFormControlElement() const {
   return ConstUnwrap<Element>()->IsFormControlElement();
@@ -66,7 +66,7 @@
       return true;
   }
 
-  return EqualIgnoringASCIICase(element->getAttribute(roleAttr), "textbox");
+  return EqualIgnoringASCIICase(element->getAttribute(kRoleAttr), "textbox");
 }
 
 WebString WebElement::TagName() const {
@@ -80,7 +80,7 @@
   // createElementNS(xhtmlNS, 'input') HTMLInputElement   INPUT    input
   // createElementNS(xhtmlNS, 'INPUT') HTMLUnknownElement INPUT    INPUT
   const Element* element = ConstUnwrap<Element>();
-  return HTMLNames::xhtmlNamespaceURI == element->namespaceURI() &&
+  return html_names::xhtmlNamespaceURI == element->namespaceURI() &&
          element->localName() == String(tag_name).DeprecatedLower();
 }
 
diff --git a/third_party/blink/renderer/core/exported/web_element_test.cc b/third_party/blink/renderer/core/exported/web_element_test.cc
index f6665ce..0f5b6a0 100644
--- a/third_party/blink/renderer/core/exported/web_element_test.cc
+++ b/third_party/blink/renderer/core/exported/web_element_test.cc
@@ -172,7 +172,7 @@
   EXPECT_FALSE(TestElement().IsAutonomousCustomElement());
 
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  auto* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  auto* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->setTextContent(R"JS(
     customElements.define('v1-custom', class extends HTMLElement {});
     document.body.appendChild(document.createElement('v1-custom'));
diff --git a/third_party/blink/renderer/core/exported/web_form_control_element.cc b/third_party/blink/renderer/core/exported/web_form_control_element.cc
index 3ddef9c..7edbd85 100644
--- a/third_party/blink/renderer/core/exported/web_form_control_element.cc
+++ b/third_party/blink/renderer/core/exported/web_form_control_element.cc
@@ -62,7 +62,7 @@
 WebString WebFormControlElement::FormControlTypeForAutofill() const {
   if (auto* input = ToHTMLInputElementOrNull(*private_)) {
     if (input->IsTextField() && input->HasBeenPasswordField())
-      return InputTypeNames::password;
+      return input_type_names::kPassword;
   }
 
   return ConstUnwrap<HTMLFormControlElement>()->type();
diff --git a/third_party/blink/renderer/core/exported/web_form_element.cc b/third_party/blink/renderer/core/exported/web_form_element.cc
index 97330c2..3c6fd34 100644
--- a/third_party/blink/renderer/core/exported/web_form_element.cc
+++ b/third_party/blink/renderer/core/exported/web_form_element.cc
@@ -47,7 +47,7 @@
 
 WebString WebFormElement::Action() const {
   return ConstUnwrap<HTMLFormElement>()->FastGetAttribute(
-      HTMLNames::actionAttr);
+      html_names::kActionAttr);
 }
 
 WebString WebFormElement::GetName() const {
diff --git a/third_party/blink/renderer/core/exported/web_frame_serializer.cc b/third_party/blink/renderer/core/exported/web_frame_serializer.cc
index 08bc3a23..277218c 100644
--- a/third_party/blink/renderer/core/exported/web_frame_serializer.cc
+++ b/third_party/blink/renderer/core/exported/web_frame_serializer.cc
@@ -175,12 +175,12 @@
   }
 
   // Do not include the element that is marked with hidden attribute.
-  if (element.FastHasAttribute(HTMLNames::hiddenAttr))
+  if (element.FastHasAttribute(html_names::kHiddenAttr))
     return true;
 
   // Do not include the hidden form element.
   return IsHTMLInputElement(element) &&
-         ToHTMLInputElement(&element)->type() == InputTypeNames::hidden;
+         ToHTMLInputElement(&element)->type() == input_type_names::kHidden;
 }
 
 bool MHTMLFrameSerializerDelegate::ShouldIgnoreMetaElement(
@@ -193,10 +193,10 @@
   // scheme could be prevented from loading.
   if (!IsHTMLMetaElement(element))
     return false;
-  if (!element.FastHasAttribute(HTMLNames::contentAttr))
+  if (!element.FastHasAttribute(html_names::kContentAttr))
     return false;
   const AtomicString& http_equiv =
-      element.FastGetAttribute(HTMLNames::http_equivAttr);
+      element.FastGetAttribute(html_names::kHttpEquivAttr);
   return http_equiv == "Content-Security-Policy";
 }
 
@@ -237,13 +237,13 @@
   // images, as only the value of src is pulled into the archive. Discarding
   // srcset prevents the problem. Long term we should make sure to MHTML plays
   // nicely with srcset.
-  if (attribute.LocalName() == HTMLNames::srcsetAttr)
+  if (attribute.LocalName() == html_names::kSrcsetAttr)
     return true;
 
   // Do not save ping attribute since anyway the ping will be blocked from
   // MHTML.
   if (IsHTMLAnchorElement(element) &&
-      attribute.LocalName() == HTMLNames::pingAttr) {
+      attribute.LocalName() == html_names::kPingAttr) {
     return true;
   }
 
@@ -261,13 +261,13 @@
   // containing link instead of html contents, don't ignore the attribute.
   // Bail out now to avoid the check in Element::isScriptingAttribute.
   bool is_src_doc_attribute = IsHTMLFrameElementBase(element) &&
-                              attribute.GetName() == HTMLNames::srcdocAttr;
+                              attribute.GetName() == html_names::kSrcdocAttr;
   String new_link_for_the_element;
   if (is_src_doc_attribute && RewriteLink(element, new_link_for_the_element))
     return false;
 
   //  Drop integrity attribute for those links with subresource loaded.
-  if (attribute.LocalName() == HTMLNames::integrityAttr &&
+  if (attribute.LocalName() == html_names::kIntegrityAttr &&
       IsHTMLLinkElement(element) && ToHTMLLinkElement(element).sheet()) {
     return true;
   }
@@ -339,8 +339,8 @@
   }
 
   // The width and height attributes should not be set.
-  if (element.FastHasAttribute(HTMLNames::widthAttr) ||
-      element.FastHasAttribute(HTMLNames::heightAttr)) {
+  if (element.FastHasAttribute(html_names::kWidthAttr) ||
+      element.FastHasAttribute(html_names::kHeightAttr)) {
     return;
   }
 
@@ -351,10 +351,10 @@
     return;
   }
 
-  Attribute width_attribute(HTMLNames::widthAttr,
+  Attribute width_attribute(html_names::kWidthAttr,
                             AtomicString::Number(element.LayoutBoxWidth()));
   attributes->push_back(width_attribute);
-  Attribute height_attribute(HTMLNames::heightAttr,
+  Attribute height_attribute(html_names::kHeightAttr,
                              AtomicString::Number(element.LayoutBoxHeight()));
   attributes->push_back(height_attribute);
 }
@@ -384,7 +384,7 @@
   // Put the shadow DOM content inside a template element. A special attribute
   // is set to tell the mode of the shadow DOM.
   Element* template_element =
-      Element::Create(HTMLNames::templateTag, &(element.GetDocument()));
+      Element::Create(html_names::kTemplateTag, &(element.GetDocument()));
   template_element->setAttribute(
       QualifiedName(g_null_atom, kShadowModeAttributeName, g_null_atom),
       AtomicString(shadow_mode));
diff --git a/third_party/blink/renderer/core/exported/web_frame_test.cc b/third_party/blink/renderer/core/exported/web_frame_test.cc
index 5416754..609f4fa2 100644
--- a/third_party/blink/renderer/core/exported/web_frame_test.cc
+++ b/third_party/blink/renderer/core/exported/web_frame_test.cc
@@ -2193,9 +2193,9 @@
   // properties.
   Document* child_document = local_frame->GetFrame()->GetDocument();
   EXPECT_EQ(11, child_document->FirstBodyElement()->GetIntegralAttribute(
-                    HTMLNames::marginwidthAttr));
+                    html_names::kMarginwidthAttr));
   EXPECT_EQ(22, child_document->FirstBodyElement()->GetIntegralAttribute(
-                    HTMLNames::marginheightAttr));
+                    html_names::kMarginheightAttr));
 
   LocalFrameView* frame_view = local_frame->GetFrameView();
   frame_view->Resize(800, 600);
@@ -2223,9 +2223,9 @@
 
   Document* child_document = local_frame->GetFrame()->GetDocument();
   EXPECT_EQ(0, child_document->FirstBodyElement()->GetIntegralAttribute(
-                   HTMLNames::marginwidthAttr));
+                   html_names::kMarginwidthAttr));
   EXPECT_EQ(0, child_document->FirstBodyElement()->GetIntegralAttribute(
-                   HTMLNames::marginheightAttr));
+                   html_names::kMarginheightAttr));
 
   LocalFrameView* frame_view =
       static_cast<WebLocalFrameImpl*>(local_frame)->GetFrameView();
@@ -12630,7 +12630,7 @@
   EXPECT_EQ(ScrollOffset(0, 1), scrollable_area->GetScrollOffset());
 
   // Make the scrollable area non-scrollable.
-  scrollable->setAttribute(HTMLNames::styleAttr, "overflow: visible");
+  scrollable->setAttribute(html_names::kStyleAttr, "overflow: visible");
 
   // Update layout without updating compositing state.
   WebLocalFrame* frame = web_view_helper.LocalMainFrame();
@@ -12760,7 +12760,7 @@
   EXPECT_EQ(ScrollOffset(0, 1), scrollable_area->GetScrollOffset());
 
   // Make the scrollable area non-scrollable.
-  scrollable->setAttribute(HTMLNames::styleAttr, "overflow: visible");
+  scrollable->setAttribute(html_names::kStyleAttr, "overflow: visible");
 
   // Update layout without updating compositing state.
   LocalMainFrame()->ExecuteScript(
@@ -12904,7 +12904,7 @@
   EXPECT_FALSE(host->LayersThatShouldPushProperties().count(b_layer));
 
   // Modifying b should only cause the b layer to need to push properties.
-  b_element->setAttribute(HTMLNames::styleAttr, "opacity: 0.2");
+  b_element->setAttribute(html_names::kStyleAttr, "opacity: 0.2");
   WebView().UpdateAllLifecyclePhases();
   EXPECT_FALSE(host->LayersThatShouldPushProperties().count(a_layer));
   EXPECT_TRUE(host->LayersThatShouldPushProperties().count(b_layer));
@@ -12963,8 +12963,8 @@
 
   // Modifying a and b (adding opacity to a and removing opacity from b) should
   // not cause the c layer to push properties.
-  a_element->setAttribute(HTMLNames::styleAttr, "opacity: 0.3");
-  b_element->setAttribute(HTMLNames::styleAttr, "");
+  a_element->setAttribute(html_names::kStyleAttr, "opacity: 0.3");
+  b_element->setAttribute(html_names::kStyleAttr, "");
   WebView().UpdateAllLifecyclePhases();
   EXPECT_TRUE(host->LayersThatShouldPushProperties().count(a_layer));
   EXPECT_TRUE(host->LayersThatShouldPushProperties().count(b_layer));
diff --git a/third_party/blink/renderer/core/exported/web_input_element.cc b/third_party/blink/renderer/core/exported/web_input_element.cc
index c93cbc2..048beb0d 100644
--- a/third_party/blink/renderer/core/exported/web_input_element.cc
+++ b/third_party/blink/renderer/core/exported/web_input_element.cc
@@ -50,15 +50,15 @@
 
 bool WebInputElement::IsText() const {
   return ConstUnwrap<HTMLInputElement>()->IsTextField() &&
-         ConstUnwrap<HTMLInputElement>()->type() != InputTypeNames::number;
+         ConstUnwrap<HTMLInputElement>()->type() != input_type_names::kNumber;
 }
 
 bool WebInputElement::IsEmailField() const {
-  return ConstUnwrap<HTMLInputElement>()->type() == InputTypeNames::email;
+  return ConstUnwrap<HTMLInputElement>()->type() == input_type_names::kEmail;
 }
 
 bool WebInputElement::IsPasswordField() const {
-  return ConstUnwrap<HTMLInputElement>()->type() == InputTypeNames::password;
+  return ConstUnwrap<HTMLInputElement>()->type() == input_type_names::kPassword;
 }
 
 bool WebInputElement::IsPasswordFieldForAutofill() const {
@@ -67,19 +67,19 @@
     return true;
   }
 
-  return ConstUnwrap<HTMLInputElement>()->type() == InputTypeNames::password;
+  return ConstUnwrap<HTMLInputElement>()->type() == input_type_names::kPassword;
 }
 
 bool WebInputElement::IsImageButton() const {
-  return ConstUnwrap<HTMLInputElement>()->type() == InputTypeNames::image;
+  return ConstUnwrap<HTMLInputElement>()->type() == input_type_names::kImage;
 }
 
 bool WebInputElement::IsRadioButton() const {
-  return ConstUnwrap<HTMLInputElement>()->type() == InputTypeNames::radio;
+  return ConstUnwrap<HTMLInputElement>()->type() == input_type_names::kRadio;
 }
 
 bool WebInputElement::IsCheckbox() const {
-  return ConstUnwrap<HTMLInputElement>()->type() == InputTypeNames::checkbox;
+  return ConstUnwrap<HTMLInputElement>()->type() == input_type_names::kCheckbox;
 }
 
 int WebInputElement::MaxLength() const {
diff --git a/third_party/blink/renderer/core/exported/web_language_detection_details.cc b/third_party/blink/renderer/core/exported/web_language_detection_details.cc
index 78910b9..d54c9a2f 100644
--- a/third_party/blink/renderer/core/exported/web_language_detection_details.cc
+++ b/third_party/blink/renderer/core/exported/web_language_detection_details.cc
@@ -19,7 +19,7 @@
   Element* html_element = document.documentElement();
   if (!html_element)
     return g_null_atom;
-  return html_element->getAttribute(HTMLNames::langAttr);
+  return html_element->getAttribute(html_names::kLangAttr);
 }
 
 bool HasNoTranslate(const Document& document) {
@@ -37,7 +37,7 @@
     // Check if the tag contains content="notranslate" or value="notranslate"
     AtomicString content = meta_element.Content();
     if (content.IsNull())
-      content = meta_element.getAttribute(HTMLNames::valueAttr);
+      content = meta_element.getAttribute(html_names::kValueAttr);
     if (EqualIgnoringASCIICase(content, "notranslate"))
       return true;
   }
diff --git a/third_party/blink/renderer/core/exported/web_node.cc b/third_party/blink/renderer/core/exported/web_node.cc
index 55843e70..f56c99b 100644
--- a/third_party/blink/renderer/core/exported/web_node.cc
+++ b/third_party/blink/renderer/core/exported/web_node.cc
@@ -176,7 +176,7 @@
   if (private_->IsContainerNode()) {
     return WebElementCollection(
         ToContainerNode(private_.Get())
-            ->getElementsByTagNameNS(HTMLNames::xhtmlNamespaceURI, tag));
+            ->getElementsByTagNameNS(html_names::xhtmlNamespaceURI, tag));
   }
   return WebElementCollection();
 }
diff --git a/third_party/blink/renderer/core/exported/web_searchable_form_data.cc b/third_party/blink/renderer/core/exported/web_searchable_form_data.cc
index cd36d12..58141f5 100644
--- a/third_party/blink/renderer/core/exported/web_searchable_form_data.cc
+++ b/third_party/blink/renderer/core/exported/web_searchable_form_data.cc
@@ -46,14 +46,14 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 namespace {
 
 // Gets the encoding for the form.
 // TODO(tkent): Use FormDataEncoder::encodingFromAcceptCharset().
 void GetFormEncoding(const HTMLFormElement& form, WTF::TextEncoding* encoding) {
-  String str(form.FastGetAttribute(HTMLNames::accept_charsetAttr));
+  String str(form.FastGetAttribute(html_names::kAcceptCharsetAttr));
   str.Replace(',', ' ');
   Vector<String> charsets;
   str.Split(' ', charsets);
@@ -91,7 +91,7 @@
   if (select.IsMultiple() || select.size() > 1) {
     for (auto* const option_element : select.GetOptionList()) {
       if (option_element->Selected() !=
-          option_element->FastHasAttribute(selectedAttr))
+          option_element->FastHasAttribute(kSelectedAttr))
         return false;
     }
     return true;
@@ -101,7 +101,7 @@
   // least one item is selected, determine which one.
   HTMLOptionElement* initial_selected = nullptr;
   for (auto* const option_element : select.GetOptionList()) {
-    if (option_element->FastHasAttribute(selectedAttr)) {
+    if (option_element->FastHasAttribute(kSelectedAttr)) {
       // The page specified the option to select.
       initial_selected = option_element;
       break;
@@ -119,9 +119,9 @@
 // attribute.
 bool IsInDefaultState(const HTMLFormControlElement& form_element) {
   if (auto* input = ToHTMLInputElementOrNull(form_element)) {
-    if (input->type() == InputTypeNames::checkbox ||
-        input->type() == InputTypeNames::radio)
-      return input->checked() == input->FastHasAttribute(checkedAttr);
+    if (input->type() == input_type_names::kCheckbox ||
+        input->type() == input_type_names::kRadio)
+      return input->checked() == input->FastHasAttribute(kCheckedAttr);
   } else if (auto* select = ToHTMLSelectElementOrNull(form_element)) {
     return IsSelectInDefaultState(*select);
   }
@@ -153,8 +153,8 @@
 
       // Return nothing if a file upload field or a password field are
       // found.
-      if (input.type() == InputTypeNames::file ||
-          input.type() == InputTypeNames::password)
+      if (input.type() == input_type_names::kFile ||
+          input.type() == input_type_names::kPassword)
         return nullptr;
 
       if (input.IsTextField()) {
@@ -223,7 +223,7 @@
       static_cast<HTMLInputElement*>(selected_input_element);
 
   // Only consider forms that GET data.
-  if (EqualIgnoringASCIICase(form_element->getAttribute(methodAttr), "post"))
+  if (EqualIgnoringASCIICase(form_element->getAttribute(kMethodAttr), "post"))
     return;
 
   WTF::TextEncoding encoding;
diff --git a/third_party/blink/renderer/core/exported/web_shared_worker_impl.cc b/third_party/blink/renderer/core/exported/web_shared_worker_impl.cc
index 87c846d3..409e5d0 100644
--- a/third_party/blink/renderer/core/exported/web_shared_worker_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_shared_worker_impl.cc
@@ -60,7 +60,6 @@
 #include "third_party/blink/renderer/core/workers/worker_classic_script_loader.h"
 #include "third_party/blink/renderer/core/workers/worker_content_settings_client.h"
 #include "third_party/blink/renderer/core/workers/worker_global_scope.h"
-#include "third_party/blink/renderer/core/workers/worker_inspector_proxy.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
 #include "third_party/blink/renderer/platform/heap/handle.h"
 #include "third_party/blink/renderer/platform/heap/persistent.h"
@@ -75,8 +74,7 @@
 namespace blink {
 
 WebSharedWorkerImpl::WebSharedWorkerImpl(WebSharedWorkerClient* client)
-    : worker_inspector_proxy_(WorkerInspectorProxy::Create()),
-      client_(client),
+    : client_(client),
       creation_address_space_(mojom::IPAddressSpace::kPublic),
       parent_execution_context_task_runners_(
           ParentExecutionContextTaskRunners::Create()),
@@ -105,9 +103,11 @@
     // |this| is deleted at this point.
     return;
   }
-  if (worker_thread_)
+  if (worker_thread_) {
     worker_thread_->Terminate();
-  worker_inspector_proxy_->WorkerThreadTerminated();
+    if (DevToolsAgent* agent = DevToolsAgent::From(shadow_page_->GetDocument()))
+      agent->ChildWorkerThreadTerminated(worker_thread_.get());
+  }
 }
 
 std::unique_ptr<WebApplicationCacheHost>
@@ -160,12 +160,6 @@
   client_->CountFeature(feature);
 }
 
-void WebSharedWorkerImpl::PostMessageToPageInspector(int session_id,
-                                                     const String& message) {
-  DCHECK(IsMainThread());
-  worker_inspector_proxy_->DispatchMessageFromWorker(session_id, message);
-}
-
 void WebSharedWorkerImpl::DidCloseWorkerGlobalScope() {
   DCHECK(IsMainThread());
   client_->WorkerContextClosed();
@@ -356,12 +350,9 @@
   thread_startup_data.atomics_wait_mode =
       WorkerBackingThreadStartupData::AtomicsWaitMode::kAllow;
 
-  GetWorkerThread()->Start(
-      std::move(global_scope_creation_params), thread_startup_data,
-      worker_inspector_proxy_->ShouldPauseOnWorkerStart(document),
-      parent_execution_context_task_runners_);
-  worker_inspector_proxy_->WorkerThreadCreated(document, GetWorkerThread(),
-                                               script_response_url);
+  GetWorkerThread()->Start(std::move(global_scope_creation_params),
+                           thread_startup_data, DevToolsAgent::From(document),
+                           parent_execution_context_task_runners_);
   // TODO(nhiroki): Support module workers (https://crbug.com/680046).
   // Shared worker is origin-bound, so use kSharableCrossOrigin.
   GetWorkerThread()->EvaluateClassicScript(
diff --git a/third_party/blink/renderer/core/exported/web_shared_worker_impl.h b/third_party/blink/renderer/core/exported/web_shared_worker_impl.h
index ac4becf..2aeba5d 100644
--- a/third_party/blink/renderer/core/exported/web_shared_worker_impl.h
+++ b/third_party/blink/renderer/core/exported/web_shared_worker_impl.h
@@ -65,7 +65,6 @@
 class WebString;
 class WebURL;
 class WorkerClassicScriptLoader;
-class WorkerInspectorProxy;
 
 // This class is used by the worker process code to talk to the SharedWorker
 // implementation. This is basically accessed on the main thread, but some
@@ -110,7 +109,6 @@
 
   // Callback methods for SharedWorkerReportingProxy.
   void CountFeature(WebFeature);
-  void PostMessageToPageInspector(int session_id, const String& message);
   void DidCloseWorkerGlobalScope();
   void DidTerminateWorkerThread();
 
@@ -131,8 +129,6 @@
   // to the same worker.
   base::UnguessableToken devtools_worker_token_;
 
-  Persistent<WorkerInspectorProxy> worker_inspector_proxy_;
-
   Persistent<SharedWorkerReportingProxy> reporting_proxy_;
   std::unique_ptr<WorkerThread> worker_thread_;
   mojom::blink::WorkerContentSettingsProxyPtrInfo content_settings_info_;
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index 124825f..9124e5c8 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -2073,7 +2073,7 @@
       return true;
   }
 
-  return EqualIgnoringASCIICase(element->getAttribute(HTMLNames::roleAttr),
+  return EqualIgnoringASCIICase(element->getAttribute(html_names::kRoleAttr),
                                 "textbox");
 }
 
diff --git a/third_party/blink/renderer/core/exported/web_view_test.cc b/third_party/blink/renderer/core/exported/web_view_test.cc
index 470873e9..0947dd3b 100644
--- a/third_party/blink/renderer/core/exported/web_view_test.cc
+++ b/third_party/blink/renderer/core/exported/web_view_test.cc
@@ -1020,7 +1020,7 @@
 
   // Do arbitrary change to make layout dirty.
   Document& document = *web_view->MainFrameImpl()->GetFrame()->GetDocument();
-  Element* br = document.CreateRawElement(HTMLNames::brTag);
+  Element* br = document.CreateRawElement(html_names::kBrTag);
   document.body()->AppendChild(br);
 
   // Should not hit assertion when calling
diff --git a/third_party/blink/renderer/core/frame/document_loading_rendering_test.cc b/third_party/blink/renderer/core/frame/document_loading_rendering_test.cc
index 1605bb4..bc0e16b 100644
--- a/third_party/blink/renderer/core/frame/document_loading_rendering_test.cc
+++ b/third_party/blink/renderer/core/frame/document_loading_rendering_test.cc
@@ -217,7 +217,7 @@
   // Replace the stylesheet by changing href.
   auto* element = GetDocument().getElementById("link");
   EXPECT_NE(nullptr, element);
-  element->setAttribute(HTMLNames::hrefAttr, "second.css");
+  element->setAttribute(html_names::kHrefAttr, "second.css");
   EXPECT_FALSE(Compositor().NeedsBeginFrame());
 
   second_css_resource.Complete("body { color: red; }");
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
index 19ae96f..c720f826 100644
--- a/third_party/blink/renderer/core/frame/frame.cc
+++ b/third_party/blink/renderer/core/frame/frame.cc
@@ -56,8 +56,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 Frame::~Frame() {
   InstanceCounters::DecrementCounter(InstanceCounters::kFrameCounter);
   DCHECK(!owner_);
diff --git a/third_party/blink/renderer/core/frame/frame_serializer.cc b/third_party/blink/renderer/core/frame/frame_serializer.cc
index 89fe3b26..3ad72a5 100644
--- a/third_party/blink/renderer/core/frame/frame_serializer.cc
+++ b/third_party/blink/renderer/core/frame/frame_serializer.cc
@@ -197,7 +197,7 @@
   // Check if link rewriting can affect the attribute.
   bool is_link_attribute = element.HasLegalLinkAttribute(attribute.GetName());
   bool is_src_doc_attribute = IsHTMLFrameElementBase(element) &&
-                              attribute.GetName() == HTMLNames::srcdocAttr;
+                              attribute.GetName() == html_names::kSrcdocAttr;
   if (is_link_attribute || is_src_doc_attribute) {
     // Check if the delegate wants to do link rewriting for the element.
     String new_link_for_the_element;
@@ -212,7 +212,7 @@
         // serialized subframe to use html contents from the link provided by
         // Delegate::rewriteLink rather than html contents from srcdoc
         // attribute.
-        AppendRewrittenAttribute(out, element, HTMLNames::srcAttr.LocalName(),
+        AppendRewrittenAttribute(out, element, html_names::kSrcAttr.LocalName(),
                                  new_link_for_the_element);
       }
       return;
@@ -329,11 +329,12 @@
     }
 
     if (auto* image = ToHTMLImageElementOrNull(element)) {
-      KURL url = document.CompleteURL(image->getAttribute(HTMLNames::srcAttr));
+      KURL url =
+          document.CompleteURL(image->getAttribute(html_names::kSrcAttr));
       ImageResourceContent* cached_image = image->CachedImage();
       AddImageToResources(cached_image, url);
     } else if (auto* input = ToHTMLInputElementOrNull(element)) {
-      if (input->type() == InputTypeNames::image && input->ImageLoader()) {
+      if (input->type() == input_type_names::kImage && input->ImageLoader()) {
         KURL url = input->Src();
         ImageResourceContent* cached_image = input->ImageLoader()->GetContent();
         AddImageToResources(cached_image, url);
@@ -341,7 +342,7 @@
     } else if (auto* link = ToHTMLLinkElementOrNull(element)) {
       if (CSSStyleSheet* sheet = link->sheet()) {
         KURL url =
-            document.CompleteURL(link->getAttribute(HTMLNames::hrefAttr));
+            document.CompleteURL(link->getAttribute(html_names::kHrefAttr));
         SerializeCSSStyleSheet(*sheet, url);
       }
     } else if (auto* style = ToHTMLStyleElementOrNull(element)) {
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index c3cc252..5f3f2dc 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -114,8 +114,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 namespace {
 
 inline float ParentPageZoomFactor(LocalFrame* frame) {
diff --git a/third_party/blink/renderer/core/frame/local_frame_view.cc b/third_party/blink/renderer/core/frame/local_frame_view.cc
index 04d6fcd6..3e41b91 100644
--- a/third_party/blink/renderer/core/frame/local_frame_view.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_view.cc
@@ -207,8 +207,6 @@
   auto scoped_ukm_hierarchical_timer =     \
       EnsureUkmAggregator().GetScopedTimer(static_cast<size_t>(ukm_enum));
 
-using namespace HTMLNames;
-
 // The maximum number of updatePlugins iterations that should be done before
 // returning.
 static const unsigned kMaxUpdatePluginsIterations = 2;
@@ -3547,12 +3545,14 @@
       !frame_->GetDocument() || !frame_->GetPage())
     return false;
 
+  const TopDocumentRootScrollerController& controller =
+      frame_->GetPage()->GlobalRootScrollerController();
+
   if (!LayoutViewport())
     return false;
 
-  const TopDocumentRootScrollerController& controller =
-      frame_->GetPage()->GlobalRootScrollerController();
-  return controller.RootScrollerArea() == LayoutViewport();
+  return root_scroller_util::ScrollableAreaForRootScroller(
+             controller.GlobalRootScroller()) == LayoutViewport();
 }
 
 AXObjectCache* LocalFrameView::ExistingAXObjectCache() const {
diff --git a/third_party/blink/renderer/core/frame/local_frame_view_test.cc b/third_party/blink/renderer/core/frame/local_frame_view_test.cc
index 24d0f33..02a9f5c5 100644
--- a/third_party/blink/renderer/core/frame/local_frame_view_test.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_view_test.cc
@@ -78,7 +78,7 @@
 
 TEST_F(LocalFrameViewTest, SetPaintInvalidationDuringUpdateAllLifecyclePhases) {
   SetBodyInnerHTML("<div id='a' style='color: blue'>A</div>");
-  GetDocument().getElementById("a")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("a")->setAttribute(html_names::kStyleAttr,
                                                   "color: green");
   GetAnimationMockChromeClient().has_scheduled_animation_ = false;
   GetDocument().View()->UpdateAllLifecyclePhases();
diff --git a/third_party/blink/renderer/core/frame/smart_clip.cc b/third_party/blink/renderer/core/frame/smart_clip.cc
index 36046146..dda9cb4 100644
--- a/third_party/blink/renderer/core/frame/smart_clip.cc
+++ b/third_party/blink/renderer/core/frame/smart_clip.cc
@@ -163,7 +163,7 @@
 
     if (node->IsElementNode() &&
         DeprecatedEqualIgnoringCase(
-            ToElement(node)->FastGetAttribute(HTMLNames::aria_hiddenAttr),
+            ToElement(node)->FastGetAttribute(html_names::kAriaHiddenAttr),
             "true")) {
       node = NodeTraversal::NextSkippingChildren(*node, root_node);
       continue;
diff --git a/third_party/blink/renderer/core/frame/web_frame_serializer_impl.cc b/third_party/blink/renderer/core/frame/web_frame_serializer_impl.cc
index f1de4c6..224dd0b 100644
--- a/third_party/blink/renderer/core/frame/web_frame_serializer_impl.cc
+++ b/third_party/blink/renderer/core/frame/web_frame_serializer_impl.cc
@@ -320,7 +320,7 @@
     String attr_value = it.Value();
 
     // Skip srcdoc attribute if we will emit src attribute (for frames).
-    if (should_rewrite_frame_src && attr_name == HTMLNames::srcdocAttr)
+    if (should_rewrite_frame_src && attr_name == html_names::kSrcdocAttr)
       continue;
 
     // Rewrite the attribute value if requested.
@@ -353,7 +353,7 @@
   if (should_rewrite_frame_src && !did_rewrite_frame_src &&
       IsHTMLIFrameElement(element)) {
     AppendAttribute(result, param->is_html_document,
-                    HTMLNames::srcAttr.ToString(), rewritten_frame_link);
+                    html_names::kSrcAttr.ToString(), rewritten_frame_link);
   }
 
   // Do post action for open tag.
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
index 5cc7ff7..eb727b65 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
@@ -2492,7 +2492,7 @@
       media_element->SetLoop(action.enable);
       break;
     case WebMediaPlayerAction::kControls:
-      media_element->SetBooleanAttribute(HTMLNames::controlsAttr,
+      media_element->SetBooleanAttribute(html_names::kControlsAttr,
                                          action.enable);
       break;
     case WebMediaPlayerAction::kPictureInPicture:
diff --git a/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc b/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc
index 4176407..85322f7 100644
--- a/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc
+++ b/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc
@@ -88,7 +88,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 namespace {
 
@@ -122,7 +122,7 @@
 }  // namespace
 
 inline HTMLCanvasElement::HTMLCanvasElement(Document& document)
-    : HTMLElement(canvasTag, document),
+    : HTMLElement(kCanvasTag, document),
       ContextLifecycleObserver(&document),
       PageVisibilityObserver(document.GetPage()),
       size_(kDefaultCanvasWidth, kDefaultCanvasHeight),
@@ -176,7 +176,7 @@
 
 void HTMLCanvasElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == widthAttr || params.name == heightAttr)
+  if (params.name == kWidthAttr || params.name == kHeightAttr)
     Reset();
   HTMLElement::ParseAttribute(params);
 }
@@ -203,7 +203,7 @@
         "Cannot resize canvas after call to transferControlToOffscreen().");
     return;
   }
-  SetUnsignedIntegralAttribute(heightAttr, value, kDefaultCanvasHeight);
+  SetUnsignedIntegralAttribute(kHeightAttr, value, kDefaultCanvasHeight);
 }
 
 void HTMLCanvasElement::setWidth(unsigned value,
@@ -214,15 +214,15 @@
         "Cannot resize canvas after call to transferControlToOffscreen().");
     return;
   }
-  SetUnsignedIntegralAttribute(widthAttr, value, kDefaultCanvasWidth);
+  SetUnsignedIntegralAttribute(kWidthAttr, value, kDefaultCanvasWidth);
 }
 
 void HTMLCanvasElement::SetSize(const IntSize& new_size) {
   if (new_size == Size())
     return;
   ignore_reset_ = true;
-  SetIntegralAttribute(widthAttr, new_size.Width());
-  SetIntegralAttribute(heightAttr, new_size.Height());
+  SetIntegralAttribute(kWidthAttr, new_size.Width());
+  SetIntegralAttribute(kHeightAttr, new_size.Height());
   ignore_reset_ = false;
   Reset();
 }
@@ -550,14 +550,14 @@
   bool had_resource_provider = HasResourceProvider();
 
   unsigned w = 0;
-  AtomicString value = getAttribute(widthAttr);
+  AtomicString value = getAttribute(kWidthAttr);
   if (value.IsEmpty() || !ParseHTMLNonNegativeInteger(value, w) ||
       w > 0x7fffffffu) {
     w = kDefaultCanvasWidth;
   }
 
   unsigned h = 0;
-  value = getAttribute(heightAttr);
+  value = getAttribute(kHeightAttr);
   if (value.IsEmpty() || !ParseHTMLNonNegativeInteger(value, h) ||
       h > 0x7fffffffu) {
     h = kDefaultCanvasHeight;
@@ -1112,8 +1112,8 @@
     std::unique_ptr<Canvas2DLayerBridge> bridge,
     const IntSize& size) {
   DiscardResourceProvider();
-  SetIntegralAttribute(widthAttr, size.Width());
-  SetIntegralAttribute(heightAttr, size.Height());
+  SetIntegralAttribute(kWidthAttr, size.Width());
+  SetIntegralAttribute(kHeightAttr, size.Height());
   SetCanvas2DLayerBridgeInternal(std::move(bridge));
   ReplaceResourceProvider(std::move(resource_provider));
 }
@@ -1301,8 +1301,8 @@
   // Button states.  An input element that is a button but its type attribute is
   // not in the Image Button state.
   if (auto* input_element = ToHTMLInputElementOrNull(element)) {
-    if (input_element->type() == InputTypeNames::checkbox ||
-        input_element->type() == InputTypeNames::radio ||
+    if (input_element->type() == input_type_names::kCheckbox ||
+        input_element->type() == input_type_names::kRadio ||
         input_element->IsTextButton()) {
       return true;
     }
@@ -1327,19 +1327,19 @@
 
   // An element that would not be interactive content except for having the
   // tabindex attribute specified.
-  if (element.FastHasAttribute(HTMLNames::tabindexAttr))
+  if (element.FastHasAttribute(html_names::kTabindexAttr))
     return true;
 
   // A non-interactive table, caption, thead, tbody, tfoot, tr, td, or th
   // element.
   if (IsHTMLTableElement(element) ||
-      element.HasTagName(HTMLNames::captionTag) ||
-      element.HasTagName(HTMLNames::theadTag) ||
-      element.HasTagName(HTMLNames::tbodyTag) ||
-      element.HasTagName(HTMLNames::tfootTag) ||
-      element.HasTagName(HTMLNames::trTag) ||
-      element.HasTagName(HTMLNames::tdTag) ||
-      element.HasTagName(HTMLNames::thTag))
+      element.HasTagName(html_names::kCaptionTag) ||
+      element.HasTagName(html_names::kTheadTag) ||
+      element.HasTagName(html_names::kTbodyTag) ||
+      element.HasTagName(html_names::kTfootTag) ||
+      element.HasTagName(html_names::kTrTag) ||
+      element.HasTagName(html_names::kTdTag) ||
+      element.HasTagName(html_names::kThTag))
     return true;
 
   return false;
diff --git a/third_party/blink/renderer/core/html/custom/custom_element.cc b/third_party/blink/renderer/core/html/custom/custom_element.cc
index 25176be..1aedc71 100644
--- a/third_party/blink/renderer/core/html/custom/custom_element.cc
+++ b/third_party/blink/renderer/core/html/custom/custom_element.cc
@@ -98,7 +98,7 @@
 
 bool CustomElement::ShouldCreateCustomElement(const QualifiedName& tag_name) {
   return ShouldCreateCustomElement(tag_name.LocalName()) &&
-         tag_name.NamespaceURI() == HTMLNames::xhtmlNamespaceURI;
+         tag_name.NamespaceURI() == html_names::xhtmlNamespaceURI;
 }
 
 bool CustomElement::ShouldCreateCustomizedBuiltinElement(
@@ -110,7 +110,7 @@
 bool CustomElement::ShouldCreateCustomizedBuiltinElement(
     const QualifiedName& tag_name) {
   return ShouldCreateCustomizedBuiltinElement(tag_name.LocalName()) &&
-         tag_name.NamespaceURI() == HTMLNames::xhtmlNamespaceURI;
+         tag_name.NamespaceURI() == html_names::xhtmlNamespaceURI;
 }
 
 static CustomElementDefinition* DefinitionFor(
@@ -175,7 +175,7 @@
   // custom element state to "undefined".
   if (level == kQNameIsValid)
     element->SetCustomElementState(CustomElementState::kUndefined);
-  else if (tag_name.NamespaceURI() == HTMLNames::xhtmlNamespaceURI &&
+  else if (tag_name.NamespaceURI() == html_names::xhtmlNamespaceURI &&
            (CustomElement::IsValidName(tag_name.LocalName()) ||
             !is_value.IsNull()))
     element->SetCustomElementState(CustomElementState::kUndefined);
diff --git a/third_party/blink/renderer/core/html/custom/custom_element_definition.cc b/third_party/blink/renderer/core/html/custom/custom_element_definition.cc
index b1db1c30..2d88d56 100644
--- a/third_party/blink/renderer/core/html/custom/custom_element_definition.cc
+++ b/third_party/blink/renderer/core/html/custom/custom_element_definition.cc
@@ -33,7 +33,7 @@
     : descriptor_(descriptor),
       observed_attributes_(observed_attributes),
       has_style_attribute_changed_callback_(
-          observed_attributes.Contains(HTMLNames::styleAttr.LocalName())) {}
+          observed_attributes.Contains(html_names::kStyleAttr.LocalName())) {}
 CustomElementDefinition::~CustomElementDefinition() = default;
 
 void CustomElementDefinition::Trace(blink::Visitor* visitor) {
@@ -61,7 +61,7 @@
     return "The result must be in the same document";
   // 6.1.8. If result's namespace is not the HTML namespace, then throw a
   // NotSupportedError.
-  if (element->namespaceURI() != HTMLNames::xhtmlNamespaceURI)
+  if (element->namespaceURI() != html_names::xhtmlNamespaceURI)
     return "The result must have HTML namespace";
   // 6.1.9. If result's local name is not equal to localName, then throw a
   // NotSupportedError.
@@ -104,7 +104,7 @@
   } else {
     element =
         HTMLElement::Create(QualifiedName(g_null_atom, Descriptor().LocalName(),
-                                          HTMLNames::xhtmlNamespaceURI),
+                                          html_names::xhtmlNamespaceURI),
                             document);
   }
   // TODO(davaajav): write this as one call to setCustomElementState instead of
diff --git a/third_party/blink/renderer/core/html/custom/custom_element_descriptor.h b/third_party/blink/renderer/core/html/custom/custom_element_descriptor.h
index d47ce6d..d24e368a 100644
--- a/third_party/blink/renderer/core/html/custom/custom_element_descriptor.h
+++ b/third_party/blink/renderer/core/html/custom/custom_element_descriptor.h
@@ -49,7 +49,7 @@
   bool Matches(const Element& element) const {
     return LocalName() == element.localName() &&
            (IsAutonomous() || GetName() == element.IsValue()) &&
-           element.namespaceURI() == HTMLNames::xhtmlNamespaceURI;
+           element.namespaceURI() == html_names::xhtmlNamespaceURI;
   }
 
   bool IsAutonomous() const { return name_ == local_name_; }
diff --git a/third_party/blink/renderer/core/html/custom/custom_element_registry_test.cc b/third_party/blink/renderer/core/html/custom/custom_element_registry_test.cc
index 7cef1b70..7d46358e 100644
--- a/third_party/blink/renderer/core/html/custom/custom_element_registry_test.cc
+++ b/third_party/blink/renderer/core/html/custom/custom_element_registry_test.cc
@@ -170,7 +170,7 @@
       : TestCustomElementDefinition(
             descriptor,
             {
-                "attr1", "attr2", HTMLNames::contenteditableAttr.LocalName(),
+                "attr1", "attr2", html_names::kContenteditableAttr.LocalName(),
             }) {}
 
   void Trace(blink::Visitor* visitor) override {
@@ -276,8 +276,8 @@
 
   Element* element = CreateElement("a-a").InDocument(&GetDocument());
   element->setAttribute(
-      QualifiedName(g_null_atom, "attr1", HTMLNames::xhtmlNamespaceURI), "v1");
-  element->SetBooleanAttribute(HTMLNames::contenteditableAttr, true);
+      QualifiedName(g_null_atom, "attr1", html_names::xhtmlNamespaceURI), "v1");
+  element->SetBooleanAttribute(html_names::kContenteditableAttr, true);
   GetDocument().documentElement()->AppendChild(element);
 
   LogUpgradeBuilder builder;
@@ -335,7 +335,7 @@
   {
     CEReactionsScope reactions;
     element->setAttribute(
-        QualifiedName(g_null_atom, "attr2", HTMLNames::xhtmlNamespaceURI),
+        QualifiedName(g_null_atom, "attr2", html_names::xhtmlNamespaceURI),
         "v2");
   }
   EXPECT_EQ(LogUpgradeDefinition::kAttributeChangedCallback,
diff --git a/third_party/blink/renderer/core/html/custom/custom_element_test.cc b/third_party/blink/renderer/core/html/custom/custom_element_test.cc
index b6140c8..8b8dbcb 100644
--- a/third_party/blink/renderer/core/html/custom/custom_element_test.cc
+++ b/third_party/blink/renderer/core/html/custom/custom_element_test.cc
@@ -199,7 +199,7 @@
     EXPECT_EQ(data.state, element->GetCustomElementState()) << data.name;
     EXPECT_EQ(data.v0state, element->GetV0CustomElementState()) << data.name;
 
-    element = document.createElementNS(HTMLNames::xhtmlNamespaceURI, data.name,
+    element = document.createElementNS(html_names::xhtmlNamespaceURI, data.name,
                                        ASSERT_NO_EXCEPTION);
     EXPECT_EQ(data.state, element->GetCustomElementState()) << data.name;
     EXPECT_EQ(data.v0state, element->GetV0CustomElementState()) << data.name;
diff --git a/third_party/blink/renderer/core/html/custom/custom_element_test_helpers.h b/third_party/blink/renderer/core/html/custom/custom_element_test_helpers.h
index 97d6c59..12c0e14 100644
--- a/third_party/blink/renderer/core/html/custom/custom_element_test_helpers.h
+++ b/third_party/blink/renderer/core/html/custom/custom_element_test_helpers.h
@@ -104,7 +104,8 @@
 
  public:
   CreateElement(const AtomicString& local_name)
-      : namespace_uri_(HTMLNames::xhtmlNamespaceURI), local_name_(local_name) {}
+      : namespace_uri_(html_names::xhtmlNamespaceURI),
+        local_name_(local_name) {}
 
   CreateElement& InDocument(Document* document) {
     document_ = document;
@@ -117,7 +118,7 @@
   }
 
   CreateElement& WithId(const AtomicString& id) {
-    attributes_.push_back(std::make_pair(HTMLNames::idAttr, id));
+    attributes_.push_back(std::make_pair(html_names::kIdAttr, id));
     return *this;
   }
 
diff --git a/third_party/blink/renderer/core/html/custom/custom_element_upgrade_sorter_test.cc b/third_party/blink/renderer/core/html/custom/custom_element_upgrade_sorter_test.cc
index 431aa916..c6b0a66 100644
--- a/third_party/blink/renderer/core/html/custom/custom_element_upgrade_sorter_test.cc
+++ b/third_party/blink/renderer/core/html/custom/custom_element_upgrade_sorter_test.cc
@@ -29,7 +29,7 @@
     NonThrowableExceptionState no_exceptions;
     Element* element = GetDocument().CreateElementForBinding(
         local_name, StringOrDictionary(), no_exceptions);
-    element->setAttribute(HTMLNames::idAttr, id);
+    element->setAttribute(html_names::kIdAttr, id);
     return element;
   }
 
diff --git a/third_party/blink/renderer/core/html/custom/v0_custom_element_registration_context.cc b/third_party/blink/renderer/core/html/custom/v0_custom_element_registration_context.cc
index 517684d..73ad40a 100644
--- a/third_party/blink/renderer/core/html/custom/v0_custom_element_registration_context.cc
+++ b/third_party/blink/renderer/core/html/custom/v0_custom_element_registration_context.cc
@@ -76,7 +76,7 @@
 
   Element* element;
 
-  if (HTMLNames::xhtmlNamespaceURI == tag_name.NamespaceURI()) {
+  if (html_names::xhtmlNamespaceURI == tag_name.NamespaceURI()) {
     element = HTMLElement::Create(tag_name, document);
   } else if (svg_names::kNamespaceURI == tag_name.NamespaceURI()) {
     element = SVGUnknownElement::Create(tag_name, document);
@@ -132,7 +132,7 @@
     const AtomicString& type) {
   DCHECK(element);
   DCHECK(!type.IsEmpty());
-  element->setAttribute(HTMLNames::isAttr, type);
+  element->setAttribute(html_names::kIsAttr, type);
   SetTypeExtension(element, type);
 }
 
diff --git a/third_party/blink/renderer/core/html/custom/v0_custom_element_registry.cc b/third_party/blink/renderer/core/html/custom/v0_custom_element_registry.cc
index bdbd7ad02..eccbfad7 100644
--- a/third_party/blink/renderer/core/html/custom/v0_custom_element_registry.cc
+++ b/third_party/blink/renderer/core/html/custom/v0_custom_element_registry.cc
@@ -73,7 +73,7 @@
   if (!constructor_builder->ValidateOptions(type, tag_name, exception_state))
     return nullptr;
 
-  DCHECK(tag_name.NamespaceURI() == HTMLNames::xhtmlNamespaceURI ||
+  DCHECK(tag_name.NamespaceURI() == html_names::xhtmlNamespaceURI ||
          tag_name.NamespaceURI() == svg_names::kNamespaceURI);
 
   DCHECK(!document_was_detached_);
diff --git a/third_party/blink/renderer/core/html/document_all_name_collection.cc b/third_party/blink/renderer/core/html/document_all_name_collection.cc
index 1335835..777fd7f 100644
--- a/third_party/blink/renderer/core/html/document_all_name_collection.cc
+++ b/third_party/blink/renderer/core/html/document_all_name_collection.cc
@@ -14,20 +14,20 @@
 bool DocumentAllNameCollection::ElementMatches(const Element& element) const {
   // https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#all-named-elements
   // Match below type of elements by name but any type of element by id.
-  if (element.HasTagName(HTMLNames::aTag) ||
-      element.HasTagName(HTMLNames::buttonTag) ||
-      element.HasTagName(HTMLNames::embedTag) ||
-      element.HasTagName(HTMLNames::formTag) ||
-      element.HasTagName(HTMLNames::frameTag) ||
-      element.HasTagName(HTMLNames::framesetTag) ||
-      element.HasTagName(HTMLNames::iframeTag) ||
-      element.HasTagName(HTMLNames::imgTag) ||
-      element.HasTagName(HTMLNames::inputTag) ||
-      element.HasTagName(HTMLNames::mapTag) ||
-      element.HasTagName(HTMLNames::metaTag) ||
-      element.HasTagName(HTMLNames::objectTag) ||
-      element.HasTagName(HTMLNames::selectTag) ||
-      element.HasTagName(HTMLNames::textareaTag)) {
+  if (element.HasTagName(html_names::kATag) ||
+      element.HasTagName(html_names::kButtonTag) ||
+      element.HasTagName(html_names::kEmbedTag) ||
+      element.HasTagName(html_names::kFormTag) ||
+      element.HasTagName(html_names::kFrameTag) ||
+      element.HasTagName(html_names::kFramesetTag) ||
+      element.HasTagName(html_names::kIFrameTag) ||
+      element.HasTagName(html_names::kImgTag) ||
+      element.HasTagName(html_names::kInputTag) ||
+      element.HasTagName(html_names::kMapTag) ||
+      element.HasTagName(html_names::kMetaTag) ||
+      element.HasTagName(html_names::kObjectTag) ||
+      element.HasTagName(html_names::kSelectTag) ||
+      element.HasTagName(html_names::kTextareaTag)) {
     if (element.GetNameAttribute() == name_)
       return true;
   }
diff --git a/third_party/blink/renderer/core/html/forms/base_button_input_type.cc b/third_party/blink/renderer/core/html/forms/base_button_input_type.cc
index 83d3d68f..19f35f6 100644
--- a/third_party/blink/renderer/core/html/forms/base_button_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/base_button_input_type.cc
@@ -41,7 +41,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 BaseButtonInputType::BaseButtonInputType(HTMLInputElement& element)
     : InputType(element), KeyboardClickableInputTypeView(element) {}
@@ -89,7 +89,7 @@
                                    bool,
                                    TextFieldEventBehavior,
                                    TextControlSetValueSelection) {
-  GetElement().setAttribute(valueAttr, AtomicString(sanitized_value));
+  GetElement().setAttribute(kValueAttr, AtomicString(sanitized_value));
 }
 
 bool BaseButtonInputType::MatchesDefaultPseudoClass() {
diff --git a/third_party/blink/renderer/core/html/forms/base_checkable_input_type.cc b/third_party/blink/renderer/core/html/forms/base_checkable_input_type.cc
index fefc9d7..2df7aaf 100644
--- a/third_party/blink/renderer/core/html/forms/base_checkable_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/base_checkable_input_type.cc
@@ -40,7 +40,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 void BaseCheckableInputType::Trace(blink::Visitor* visitor) {
   InputTypeView::Trace(visitor);
@@ -95,7 +95,7 @@
 }
 
 bool BaseCheckableInputType::MatchesDefaultPseudoClass() {
-  return GetElement().FastHasAttribute(checkedAttr);
+  return GetElement().FastHasAttribute(kCheckedAttr);
 }
 
 InputType::ValueMode BaseCheckableInputType::GetValueMode() const {
@@ -106,7 +106,7 @@
                                       bool,
                                       TextFieldEventBehavior,
                                       TextControlSetValueSelection) {
-  GetElement().setAttribute(valueAttr, AtomicString(sanitized_value));
+  GetElement().setAttribute(kValueAttr, AtomicString(sanitized_value));
 }
 
 void BaseCheckableInputType::ReadingChecked() const {
diff --git a/third_party/blink/renderer/core/html/forms/base_temporal_input_type.cc b/third_party/blink/renderer/core/html/forms/base_temporal_input_type.cc
index 7cf6b0fb..d0d21be 100644
--- a/third_party/blink/renderer/core/html/forms/base_temporal_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/base_temporal_input_type.cc
@@ -43,7 +43,6 @@
 namespace blink {
 
 using blink::WebLocalizedString;
-using namespace HTMLNames;
 
 static const int kMsecPerMinute = 60 * 1000;
 static const int kMsecPerSecond = 1000;
diff --git a/third_party/blink/renderer/core/html/forms/base_text_input_type.cc b/third_party/blink/renderer/core/html/forms/base_text_input_type.cc
index 5f167eb..e4189959 100644
--- a/third_party/blink/renderer/core/html/forms/base_text_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/base_text_input_type.cc
@@ -31,7 +31,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 BaseTextInputType::BaseTextInputType(HTMLInputElement& element)
     : TextFieldInputType(element) {}
@@ -79,7 +79,7 @@
 }
 
 bool BaseTextInputType::PatternMismatch(const String& value) const {
-  const AtomicString& raw_pattern = GetElement().FastGetAttribute(patternAttr);
+  const AtomicString& raw_pattern = GetElement().FastGetAttribute(kPatternAttr);
   // Empty values can't be mismatched
   if (raw_pattern.IsNull() || value.IsEmpty())
     return false;
diff --git a/third_party/blink/renderer/core/html/forms/button_input_type.cc b/third_party/blink/renderer/core/html/forms/button_input_type.cc
index 7c58447..f9a3738 100644
--- a/third_party/blink/renderer/core/html/forms/button_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/button_input_type.cc
@@ -39,7 +39,7 @@
 }
 
 const AtomicString& ButtonInputType::FormControlType() const {
-  return InputTypeNames::button;
+  return input_type_names::kButton;
 }
 
 bool ButtonInputType::SupportsValidation() const {
diff --git a/third_party/blink/renderer/core/html/forms/checkbox_input_type.cc b/third_party/blink/renderer/core/html/forms/checkbox_input_type.cc
index 3ef8609..26a4522f 100644
--- a/third_party/blink/renderer/core/html/forms/checkbox_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/checkbox_input_type.cc
@@ -43,7 +43,7 @@
 }
 
 const AtomicString& CheckboxInputType::FormControlType() const {
-  return InputTypeNames::checkbox;
+  return input_type_names::kCheckbox;
 }
 
 bool CheckboxInputType::ValueMissing(const String&) const {
diff --git a/third_party/blink/renderer/core/html/forms/clear_button_element.cc b/third_party/blink/renderer/core/html/forms/clear_button_element.cc
index 6321006..3a21760 100644
--- a/third_party/blink/renderer/core/html/forms/clear_button_element.cc
+++ b/third_party/blink/renderer/core/html/forms/clear_button_element.cc
@@ -33,7 +33,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline ClearButtonElement::ClearButtonElement(
     Document& document,
@@ -46,7 +46,7 @@
   ClearButtonElement* element =
       new ClearButtonElement(document, clear_button_owner);
   element->SetShadowPseudoId(AtomicString("-webkit-clear-button"));
-  element->setAttribute(idAttr, ShadowElementNames::ClearButton());
+  element->setAttribute(kIdAttr, ShadowElementNames::ClearButton());
   return element;
 }
 
diff --git a/third_party/blink/renderer/core/html/forms/color_input_type.cc b/third_party/blink/renderer/core/html/forms/color_input_type.cc
index 020384bc..26166ed 100644
--- a/third_party/blink/renderer/core/html/forms/color_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/color_input_type.cc
@@ -53,7 +53,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 // Upper limit of number of datalist suggestions shown.
 static const unsigned kMaxSuggestions = 1000;
@@ -102,7 +102,7 @@
 }
 
 const AtomicString& ColorInputType::FormControlType() const {
-  return InputTypeNames::color;
+  return input_type_names::kColor;
 }
 
 bool ColorInputType::SupportsRequired() const {
@@ -243,7 +243,7 @@
 }
 
 bool ColorInputType::ShouldShowSuggestions() const {
-  return GetElement().FastHasAttribute(listAttr);
+  return GetElement().FastHasAttribute(kListAttr);
 }
 
 Vector<mojom::blink::ColorSuggestionPtr> ColorInputType::Suggestions() const {
diff --git a/third_party/blink/renderer/core/html/forms/date_input_type.cc b/third_party/blink/renderer/core/html/forms/date_input_type.cc
index 36be3e52..657e058c 100644
--- a/third_party/blink/renderer/core/html/forms/date_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/date_input_type.cc
@@ -42,7 +42,7 @@
 namespace blink {
 
 using blink::WebLocalizedString;
-using namespace HTMLNames;
+using namespace html_names;
 
 static const int kDateDefaultStep = 1;
 static const int kDateDefaultStepBase = 0;
@@ -60,7 +60,7 @@
 }
 
 const AtomicString& DateInputType::FormControlType() const {
-  return InputTypeNames::date;
+  return input_type_names::kDate;
 }
 
 StepRange DateInputType::CreateStepRange(
@@ -113,10 +113,10 @@
     const DateComponents& date) const {
   layout_parameters.date_time_format = layout_parameters.locale.DateFormat();
   layout_parameters.fallback_date_time_format = "yyyy-MM-dd";
-  if (!ParseToDateComponents(GetElement().FastGetAttribute(minAttr),
+  if (!ParseToDateComponents(GetElement().FastGetAttribute(kMinAttr),
                              &layout_parameters.minimum))
     layout_parameters.minimum = DateComponents();
-  if (!ParseToDateComponents(GetElement().FastGetAttribute(maxAttr),
+  if (!ParseToDateComponents(GetElement().FastGetAttribute(kMaxAttr),
                              &layout_parameters.maximum))
     layout_parameters.maximum = DateComponents();
   layout_parameters.placeholder_for_day = GetLocale().QueryString(
diff --git a/third_party/blink/renderer/core/html/forms/date_time_chooser_impl.cc b/third_party/blink/renderer/core/html/forms/date_time_chooser_impl.cc
index d4127eae..6f8040a7 100644
--- a/third_party/blink/renderer/core/html/forms/date_time_chooser_impl.cc
+++ b/third_party/blink/renderer/core/html/forms/date_time_chooser_impl.cc
@@ -85,15 +85,15 @@
 
 static String ValueToDateTimeString(double value, AtomicString type) {
   DateComponents components;
-  if (type == InputTypeNames::date)
+  if (type == input_type_names::kDate)
     components.SetMillisecondsSinceEpochForDate(value);
-  else if (type == InputTypeNames::datetime_local)
+  else if (type == input_type_names::kDatetimeLocal)
     components.SetMillisecondsSinceEpochForDateTimeLocal(value);
-  else if (type == InputTypeNames::month)
+  else if (type == input_type_names::kMonth)
     components.SetMonthsSinceEpoch(value);
-  else if (type == InputTypeNames::time)
+  else if (type == input_type_names::kTime)
     components.SetMillisecondsSinceMidnight(value);
-  else if (type == InputTypeNames::week)
+  else if (type == input_type_names::kWeek)
     components.SetMillisecondsSinceEpochForWeek(value);
   else
     NOTREACHED();
@@ -107,12 +107,12 @@
   String step_base_string = String::Number(parameters_.step_base, 11);
   String today_label_string;
   String other_date_label_string;
-  if (parameters_.type == InputTypeNames::month) {
+  if (parameters_.type == input_type_names::kMonth) {
     today_label_string =
         GetLocale().QueryString(WebLocalizedString::kThisMonthButtonLabel);
     other_date_label_string =
         GetLocale().QueryString(WebLocalizedString::kOtherMonthLabel);
-  } else if (parameters_.type == InputTypeNames::week) {
+  } else if (parameters_.type == input_type_names::kWeek) {
     today_label_string =
         GetLocale().QueryString(WebLocalizedString::kThisWeekButtonLabel);
     other_date_label_string =
diff --git a/third_party/blink/renderer/core/html/forms/date_time_edit_element.cc b/third_party/blink/renderer/core/html/forms/date_time_edit_element.cc
index 96d96782..0d9c783 100644
--- a/third_party/blink/renderer/core/html/forms/date_time_edit_element.cc
+++ b/third_party/blink/renderer/core/html/forms/date_time_edit_element.cc
@@ -42,7 +42,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 class DateTimeEditBuilder : private DateTimeFormat::TokenHandler {
  public:
@@ -559,7 +559,7 @@
   DateTimeEditElement* container =
       new DateTimeEditElement(document, edit_control_owner);
   container->SetShadowPseudoId(AtomicString("-webkit-datetime-edit"));
-  container->setAttribute(idAttr, ShadowElementNames::DateTimeEdit());
+  container->setAttribute(kIdAttr, ShadowElementNames::DateTimeEdit());
   return container;
 }
 
diff --git a/third_party/blink/renderer/core/html/forms/date_time_field_element.cc b/third_party/blink/renderer/core/html/forms/date_time_field_element.cc
index 9c184ebe..de003201 100644
--- a/third_party/blink/renderer/core/html/forms/date_time_field_element.cc
+++ b/third_party/blink/renderer/core/html/forms/date_time_field_element.cc
@@ -37,7 +37,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 DateTimeFieldElement::FieldOwner::~FieldOwner() = default;
 
@@ -154,12 +154,12 @@
                                       int ax_minimum,
                                       int ax_maximum) {
   // On accessibility, DateTimeFieldElement acts like spin button.
-  setAttribute(roleAttr, AtomicString("spinbutton"));
-  setAttribute(aria_placeholderAttr, AtomicString(Placeholder()));
-  setAttribute(aria_valueminAttr, AtomicString::Number(ax_minimum));
-  setAttribute(aria_valuemaxAttr, AtomicString::Number(ax_maximum));
+  setAttribute(kRoleAttr, AtomicString("spinbutton"));
+  setAttribute(kAriaPlaceholderAttr, AtomicString(Placeholder()));
+  setAttribute(kAriaValueminAttr, AtomicString::Number(ax_minimum));
+  setAttribute(kAriaValuemaxAttr, AtomicString::Number(ax_maximum));
 
-  setAttribute(aria_labelAttr, AtomicString(ax_help_text));
+  setAttribute(kAriaLabelAttr, AtomicString(ax_help_text));
   SetShadowPseudoId(pseudo);
   AppendChild(Text::Create(GetDocument(), VisibleValue()));
 }
@@ -177,7 +177,7 @@
 }
 
 bool DateTimeFieldElement::IsDisabled() const {
-  return FastHasAttribute(disabledAttr);
+  return FastHasAttribute(kDisabledAttr);
 }
 
 Locale& DateTimeFieldElement::LocaleForOwner() const {
@@ -195,7 +195,7 @@
 
 void DateTimeFieldElement::SetDisabled() {
   // Set HTML attribute disabled to change apperance.
-  SetBooleanAttribute(disabledAttr, true);
+  SetBooleanAttribute(kDisabledAttr, true);
   SetNeedsStyleRecalc(
       kSubtreeStyleChange,
       StyleChangeReasonForTracing::CreateWithExtraData(
@@ -216,12 +216,12 @@
 
   text_node->ReplaceWholeText(new_visible_value);
   if (HasValue()) {
-    setAttribute(aria_valuenowAttr,
+    setAttribute(kAriaValuenowAttr,
                  AtomicString::Number(ValueForARIAValueNow()));
-    setAttribute(aria_valuetextAttr, AtomicString(new_visible_value));
+    setAttribute(kAriaValuetextAttr, AtomicString(new_visible_value));
   } else {
-    removeAttribute(aria_valuenowAttr);
-    removeAttribute(aria_valuetextAttr);
+    removeAttribute(kAriaValuenowAttr);
+    removeAttribute(kAriaValuetextAttr);
   }
 
   if (event_behavior == kDispatchEvent && field_owner_)
diff --git a/third_party/blink/renderer/core/html/forms/date_time_local_input_type.cc b/third_party/blink/renderer/core/html/forms/date_time_local_input_type.cc
index 399fe7a..e44e1a8 100644
--- a/third_party/blink/renderer/core/html/forms/date_time_local_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/date_time_local_input_type.cc
@@ -43,7 +43,7 @@
 namespace blink {
 
 using blink::WebLocalizedString;
-using namespace HTMLNames;
+using namespace html_names;
 
 static const int kDateTimeLocalDefaultStep = 60;
 static const int kDateTimeLocalDefaultStepBase = 0;
@@ -58,7 +58,7 @@
 }
 
 const AtomicString& DateTimeLocalInputType::FormControlType() const {
-  return InputTypeNames::datetime_local;
+  return input_type_names::kDatetimeLocal;
 }
 
 double DateTimeLocalInputType::ValueAsDate() const {
@@ -170,10 +170,10 @@
         layout_parameters.locale.DateTimeFormatWithoutSeconds();
     layout_parameters.fallback_date_time_format = "yyyy-MM-dd'T'HH:mm";
   }
-  if (!ParseToDateComponents(GetElement().FastGetAttribute(minAttr),
+  if (!ParseToDateComponents(GetElement().FastGetAttribute(kMinAttr),
                              &layout_parameters.minimum))
     layout_parameters.minimum = DateComponents();
-  if (!ParseToDateComponents(GetElement().FastGetAttribute(maxAttr),
+  if (!ParseToDateComponents(GetElement().FastGetAttribute(kMaxAttr),
                              &layout_parameters.maximum))
     layout_parameters.maximum = DateComponents();
   layout_parameters.placeholder_for_day = GetLocale().QueryString(
diff --git a/third_party/blink/renderer/core/html/forms/email_input_type.cc b/third_party/blink/renderer/core/html/forms/email_input_type.cc
index 8c95319..b73aea1a 100644
--- a/third_party/blink/renderer/core/html/forms/email_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/email_input_type.cc
@@ -165,7 +165,8 @@
 
 void EmailInputType::CountUsage() {
   CountUsageIfVisible(WebFeature::kInputTypeEmail);
-  bool has_max_length = GetElement().FastHasAttribute(HTMLNames::maxlengthAttr);
+  bool has_max_length =
+      GetElement().FastHasAttribute(html_names::kMaxlengthAttr);
   if (has_max_length)
     CountUsageIfVisible(WebFeature::kInputTypeEmailMaxLength);
   if (GetElement().Multiple()) {
@@ -176,7 +177,7 @@
 }
 
 const AtomicString& EmailInputType::FormControlType() const {
-  return InputTypeNames::email;
+  return input_type_names::kEmail;
 }
 
 ScriptRegexp& EmailInputType::EnsureEmailRegexp() const {
diff --git a/third_party/blink/renderer/core/html/forms/external_date_time_chooser.cc b/third_party/blink/renderer/core/html/forms/external_date_time_chooser.cc
index a50c2db2..c798fa5 100644
--- a/third_party/blink/renderer/core/html/forms/external_date_time_chooser.cc
+++ b/third_party/blink/renderer/core/html/forms/external_date_time_chooser.cc
@@ -81,17 +81,17 @@
 }
 
 static WebDateTimeInputType ToWebDateTimeInputType(const AtomicString& source) {
-  if (source == InputTypeNames::date)
+  if (source == input_type_names::kDate)
     return kWebDateTimeInputTypeDate;
-  if (source == InputTypeNames::datetime)
+  if (source == input_type_names::kDatetime)
     return kWebDateTimeInputTypeDateTime;
-  if (source == InputTypeNames::datetime_local)
+  if (source == input_type_names::kDatetimeLocal)
     return kWebDateTimeInputTypeDateTimeLocal;
-  if (source == InputTypeNames::month)
+  if (source == input_type_names::kMonth)
     return kWebDateTimeInputTypeMonth;
-  if (source == InputTypeNames::time)
+  if (source == input_type_names::kTime)
     return kWebDateTimeInputTypeTime;
-  if (source == InputTypeNames::week)
+  if (source == input_type_names::kWeek)
     return kWebDateTimeInputTypeWeek;
   return kWebDateTimeInputTypeNone;
 }
diff --git a/third_party/blink/renderer/core/html/forms/file_input_type.cc b/third_party/blink/renderer/core/html/forms/file_input_type.cc
index a681735..f2828a6 100644
--- a/third_party/blink/renderer/core/html/forms/file_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/file_input_type.cc
@@ -48,7 +48,7 @@
 namespace blink {
 
 using blink::WebLocalizedString;
-using namespace HTMLNames;
+using namespace html_names;
 
 namespace {
 
@@ -97,7 +97,7 @@
 }
 
 const AtomicString& FileInputType::FormControlType() const {
-  return InputTypeNames::file;
+  return input_type_names::kFile;
 }
 
 FormControlState FileInputType::SaveFormControlState() const {
@@ -157,10 +157,10 @@
     WebFileChooserParams params;
     HTMLInputElement& input = GetElement();
     Document& document = input.GetDocument();
-    bool is_directory = input.FastHasAttribute(webkitdirectoryAttr);
+    bool is_directory = input.FastHasAttribute(kWebkitdirectoryAttr);
     if (is_directory)
       params.mode = WebFileChooserParams::Mode::kUploadFolder;
-    else if (input.FastHasAttribute(multipleAttr))
+    else if (input.FastHasAttribute(kMultipleAttr))
       params.mode = WebFileChooserParams::Mode::kOpenMultiple;
     else
       params.mode = WebFileChooserParams::Mode::kOpen;
@@ -168,7 +168,7 @@
     params.accept_types = CollectAcceptTypes(input);
     params.selected_files = file_list_->PathsForUserVisibleFiles();
     params.use_media_capture = RuntimeEnabledFeatures::MediaCaptureEnabled() &&
-                               input.FastHasAttribute(captureAttr);
+                               input.FastHasAttribute(kCaptureAttr);
     params.requestor = document.Url();
 
     UseCounter::Count(
@@ -296,9 +296,9 @@
   DCHECK(IsShadowHost(GetElement()));
   auto* button = HTMLInputElement::Create(GetElement().GetDocument(),
                                           CreateElementFlags());
-  button->setType(InputTypeNames::button);
+  button->setType(input_type_names::kButton);
   button->setAttribute(
-      valueAttr,
+      kValueAttr,
       AtomicString(GetLocale().QueryString(
           GetElement().Multiple()
               ? WebLocalizedString::kFileButtonChooseMultipleFilesLabel
@@ -311,7 +311,7 @@
   DCHECK(IsShadowHost(GetElement()));
   if (Element* button =
           ToElementOrDie(GetElement().UserAgentShadowRoot()->firstChild()))
-    button->SetBooleanAttribute(disabledAttr,
+    button->SetBooleanAttribute(kDisabledAttr,
                                 GetElement().IsDisabledFormControl());
 }
 
@@ -320,7 +320,7 @@
   if (Element* button =
           ToElementOrDie(GetElement().UserAgentShadowRoot()->firstChild()))
     button->setAttribute(
-        valueAttr,
+        kValueAttr,
         AtomicString(GetLocale().QueryString(
             GetElement().Multiple()
                 ? WebLocalizedString::kFileButtonChooseMultipleFilesLabel
@@ -361,7 +361,7 @@
 
 void FileInputType::FilesChosen(const FileChooserFileInfoList& files) {
   SetFiles(CreateFileList(files,
-                          GetElement().FastHasAttribute(webkitdirectoryAttr)));
+                          GetElement().FastHasAttribute(kWebkitdirectoryAttr)));
   if (HasConnectedFileChooser())
     DisconnectFileChooser();
 }
@@ -388,7 +388,7 @@
     return;
 
   HTMLInputElement& input = GetElement();
-  if (input.FastHasAttribute(webkitdirectoryAttr)) {
+  if (input.FastHasAttribute(kWebkitdirectoryAttr)) {
     SetFilesFromDirectory(paths[0]);
     return;
   }
@@ -397,7 +397,7 @@
   for (const auto& path : paths)
     files.push_back(CreateFileChooserFileInfoNative(path));
 
-  if (input.FastHasAttribute(multipleAttr)) {
+  if (input.FastHasAttribute(kMultipleAttr)) {
     FilesChosen(files);
   } else {
     FileChooserFileInfoList first_file_only;
@@ -412,7 +412,7 @@
   if (paths.IsEmpty())
     return false;
 
-  if (!GetElement().FastHasAttribute(webkitdirectoryAttr)) {
+  if (!GetElement().FastHasAttribute(kWebkitdirectoryAttr)) {
     dropped_file_system_id_ = drag_data->DroppedFileSystemId();
   }
   SetFilesFromPaths(paths);
@@ -448,7 +448,7 @@
 }
 
 void FileInputType::HandleKeypressEvent(KeyboardEvent& event) {
-  if (GetElement().FastHasAttribute(webkitdirectoryAttr)) {
+  if (GetElement().FastHasAttribute(kWebkitdirectoryAttr)) {
     // Override to invoke the action on Enter key up (not press) to avoid
     // repeats committing the file chooser.
     if (event.key() == "Enter") {
@@ -460,7 +460,7 @@
 }
 
 void FileInputType::HandleKeyupEvent(KeyboardEvent& event) {
-  if (GetElement().FastHasAttribute(webkitdirectoryAttr)) {
+  if (GetElement().FastHasAttribute(kWebkitdirectoryAttr)) {
     // Override to invoke the action on Enter key up (not press) to avoid
     // repeats committing the file chooser.
     if (event.key() == "Enter") {
diff --git a/third_party/blink/renderer/core/html/forms/file_input_type_test.cc b/third_party/blink/renderer/core/html/forms/file_input_type_test.cc
index bb3d71d..bca1bf76 100644
--- a/third_party/blink/renderer/core/html/forms/file_input_type_test.cc
+++ b/third_party/blink/renderer/core/html/forms/file_input_type_test.cc
@@ -117,7 +117,7 @@
   EXPECT_EQ(String("/native/path1"), file_input->Files()->item(0)->GetPath());
 
   // Try to upload multiple files with multipleAttr
-  input->SetBooleanAttribute(HTMLNames::multipleAttr, true);
+  input->SetBooleanAttribute(html_names::kMultipleAttr, true);
   paths.clear();
   paths.push_back("/native/real/path1");
   paths.push_back("/native/real/path2");
diff --git a/third_party/blink/renderer/core/html/forms/form_controller.cc b/third_party/blink/renderer/core/html/forms/form_controller.cc
index e721c5f6..2ce825b 100644
--- a/third_party/blink/renderer/core/html/forms/form_controller.cc
+++ b/third_party/blink/renderer/core/html/forms/form_controller.cc
@@ -37,14 +37,14 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 static inline HTMLFormElement* OwnerFormForState(
     const HTMLFormControlElementWithState& control) {
   // Assume controls with form attribute have no owners because we restore
   // state during parsing and form owners of such controls might be
   // indeterminate.
-  return control.FastHasAttribute(formAttr) ? nullptr : control.Form();
+  return control.FastHasAttribute(kFormAttr) ? nullptr : control.Form();
 }
 
 // ----------------------------------------------------------------------------
@@ -357,7 +357,7 @@
 }
 
 static inline String FormSignature(const HTMLFormElement& form) {
-  KURL action_url = form.GetURLAttribute(actionAttr);
+  KURL action_url = form.GetURLAttribute(kActionAttr);
   // Remove the query part because it might contain volatile parameters such
   // as a session key.
   if (!action_url.IsEmpty())
diff --git a/third_party/blink/renderer/core/html/forms/hidden_input_type.cc b/third_party/blink/renderer/core/html/forms/hidden_input_type.cc
index 47277e8..8da157d 100644
--- a/third_party/blink/renderer/core/html/forms/hidden_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/hidden_input_type.cc
@@ -39,7 +39,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 InputType* HiddenInputType::Create(HTMLInputElement& element) {
   return new HiddenInputType(element);
@@ -55,7 +55,7 @@
 }
 
 const AtomicString& HiddenInputType::FormControlType() const {
-  return InputTypeNames::hidden;
+  return input_type_names::kHidden;
 }
 
 bool HiddenInputType::ShouldSaveAndRestoreFormControlState() const {
@@ -85,7 +85,7 @@
                                bool,
                                TextFieldEventBehavior,
                                TextControlSetValueSelection) {
-  GetElement().setAttribute(valueAttr, AtomicString(sanitized_value));
+  GetElement().setAttribute(kValueAttr, AtomicString(sanitized_value));
 }
 
 void HiddenInputType::AppendToFormData(FormData& form_data) const {
diff --git a/third_party/blink/renderer/core/html/forms/html_button_element.cc b/third_party/blink/renderer/core/html/forms/html_button_element.cc
index d7f49d92..02da5e4 100644
--- a/third_party/blink/renderer/core/html/forms/html_button_element.cc
+++ b/third_party/blink/renderer/core/html/forms/html_button_element.cc
@@ -35,10 +35,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLButtonElement::HTMLButtonElement(Document& document)
-    : HTMLFormControlElement(buttonTag, document),
+    : HTMLFormControlElement(kButtonTag, document),
       type_(SUBMIT),
       is_activated_submit_(false) {}
 
@@ -47,7 +47,7 @@
 }
 
 void HTMLButtonElement::setType(const AtomicString& type) {
-  setAttribute(typeAttr, type);
+  setAttribute(kTypeAttr, type);
 }
 
 LayoutObject* HTMLButtonElement::CreateLayoutObject(const ComputedStyle&) {
@@ -76,7 +76,7 @@
 
 bool HTMLButtonElement::IsPresentationAttribute(
     const QualifiedName& name) const {
-  if (name == alignAttr) {
+  if (name == kAlignAttr) {
     // Don't map 'align' attribute.  This matches what Firefox and IE do, but
     // not Opera.  See http://bugs.webkit.org/show_bug.cgi?id=12071
     return false;
@@ -87,7 +87,7 @@
 
 void HTMLButtonElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == typeAttr) {
+  if (params.name == kTypeAttr) {
     if (DeprecatedEqualIgnoringCase(params.new_value, "reset"))
       type_ = RESET;
     else if (DeprecatedEqualIgnoringCase(params.new_value, "button"))
@@ -98,7 +98,7 @@
     if (formOwner() && isConnected())
       formOwner()->InvalidateDefaultButtonStyle();
   } else {
-    if (params.name == formactionAttr)
+    if (params.name == kFormactionAttr)
       LogUpdateAttributeIfIsolatedWorldAndInDocument("button", params);
     HTMLFormControlElement::ParseAttribute(params);
   }
@@ -182,12 +182,12 @@
 }
 
 bool HTMLButtonElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName() == formactionAttr ||
+  return attribute.GetName() == kFormactionAttr ||
          HTMLFormControlElement::IsURLAttribute(attribute);
 }
 
 const AtomicString& HTMLButtonElement::Value() const {
-  return getAttribute(valueAttr);
+  return getAttribute(kValueAttr);
 }
 
 bool HTMLButtonElement::RecalcWillValidate() const {
@@ -213,8 +213,8 @@
     ContainerNode& insertion_point) {
   InsertionNotificationRequest request =
       HTMLFormControlElement::InsertedInto(insertion_point);
-  LogAddElementIfIsolatedWorldAndInDocument("button", typeAttr, formmethodAttr,
-                                            formactionAttr);
+  LogAddElementIfIsolatedWorldAndInDocument("button", kTypeAttr,
+                                            kFormmethodAttr, kFormactionAttr);
   return request;
 }
 
diff --git a/third_party/blink/renderer/core/html/forms/html_data_list_element.cc b/third_party/blink/renderer/core/html/forms/html_data_list_element.cc
index 7ded38a..9d94ff4 100644
--- a/third_party/blink/renderer/core/html/forms/html_data_list_element.cc
+++ b/third_party/blink/renderer/core/html/forms/html_data_list_element.cc
@@ -40,7 +40,7 @@
 namespace blink {
 
 inline HTMLDataListElement::HTMLDataListElement(Document& document)
-    : HTMLElement(HTMLNames::datalistTag, document) {}
+    : HTMLElement(html_names::kDatalistTag, document) {}
 
 HTMLDataListElement* HTMLDataListElement::Create(Document& document) {
   UseCounter::Count(document, WebFeature::kDataListElement);
diff --git a/third_party/blink/renderer/core/html/forms/html_field_set_element.cc b/third_party/blink/renderer/core/html/forms/html_field_set_element.cc
index 47970055..67ab86ff 100644
--- a/third_party/blink/renderer/core/html/forms/html_field_set_element.cc
+++ b/third_party/blink/renderer/core/html/forms/html_field_set_element.cc
@@ -37,10 +37,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLFieldSetElement::HTMLFieldSetElement(Document& document)
-    : HTMLFormControlElement(fieldsetTag, document) {}
+    : HTMLFormControlElement(kFieldsetTag, document) {}
 
 HTMLFieldSetElement* HTMLFieldSetElement::Create(Document& document) {
   return new HTMLFieldSetElement(document);
diff --git a/third_party/blink/renderer/core/html/forms/html_form_control_element.cc b/third_party/blink/renderer/core/html/forms/html_form_control_element.cc
index bd5a3f6..9d71f0f 100644
--- a/third_party/blink/renderer/core/html/forms/html_form_control_element.cc
+++ b/third_party/blink/renderer/core/html/forms/html_form_control_element.cc
@@ -47,7 +47,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 HTMLFormControlElement::HTMLFormControlElement(const QualifiedName& tag_name,
                                                Document& document)
@@ -75,29 +75,29 @@
 }
 
 String HTMLFormControlElement::formAction() const {
-  const AtomicString& action = FastGetAttribute(formactionAttr);
+  const AtomicString& action = FastGetAttribute(kFormactionAttr);
   if (action.IsEmpty())
     return GetDocument().Url();
   return GetDocument().CompleteURL(StripLeadingAndTrailingHTMLSpaces(action));
 }
 
 void HTMLFormControlElement::setFormAction(const AtomicString& value) {
-  setAttribute(formactionAttr, value);
+  setAttribute(kFormactionAttr, value);
 }
 
 String HTMLFormControlElement::formEnctype() const {
-  const AtomicString& form_enctype_attr = FastGetAttribute(formenctypeAttr);
+  const AtomicString& form_enctype_attr = FastGetAttribute(kFormenctypeAttr);
   if (form_enctype_attr.IsNull())
     return g_empty_string;
   return FormSubmission::Attributes::ParseEncodingType(form_enctype_attr);
 }
 
 void HTMLFormControlElement::setFormEnctype(const AtomicString& value) {
-  setAttribute(formenctypeAttr, value);
+  setAttribute(kFormenctypeAttr, value);
 }
 
 String HTMLFormControlElement::formMethod() const {
-  const AtomicString& form_method_attr = FastGetAttribute(formmethodAttr);
+  const AtomicString& form_method_attr = FastGetAttribute(kFormmethodAttr);
   if (form_method_attr.IsNull())
     return g_empty_string;
   return FormSubmission::Attributes::MethodString(
@@ -105,11 +105,11 @@
 }
 
 void HTMLFormControlElement::setFormMethod(const AtomicString& value) {
-  setAttribute(formmethodAttr, value);
+  setAttribute(kFormmethodAttr, value);
 }
 
 bool HTMLFormControlElement::FormNoValidate() const {
-  return FastHasAttribute(formnovalidateAttr);
+  return FastHasAttribute(kFormnovalidateAttr);
 }
 
 void HTMLFormControlElement::UpdateAncestorDisabledState() const {
@@ -154,7 +154,7 @@
 void HTMLFormControlElement::AttributeChanged(
     const AttributeModificationParams& params) {
   HTMLElement::AttributeChanged(params);
-  if (params.name == disabledAttr &&
+  if (params.name == kDisabledAttr &&
       params.old_value.IsNull() != params.new_value.IsNull()) {
     DisabledAttributeChanged();
     if (params.reason == AttributeModificationReason::kDirectly &&
@@ -166,10 +166,10 @@
 void HTMLFormControlElement::ParseAttribute(
     const AttributeModificationParams& params) {
   const QualifiedName& name = params.name;
-  if (name == formAttr) {
+  if (name == kFormAttr) {
     FormAttributeChanged();
     UseCounter::Count(GetDocument(), WebFeature::kFormAttribute);
-  } else if (name == readonlyAttr) {
+  } else if (name == kReadonlyAttr) {
     if (params.old_value.IsNull() != params.new_value.IsNull()) {
       SetNeedsWillValidateCheck();
       PseudoStateChanged(CSSSelector::kPseudoReadOnly);
@@ -177,11 +177,11 @@
       if (LayoutObject* o = GetLayoutObject())
         o->InvalidateIfControlStateChanged(kReadOnlyControlState);
     }
-  } else if (name == requiredAttr) {
+  } else if (name == kRequiredAttr) {
     if (params.old_value.IsNull() != params.new_value.IsNull())
       RequiredAttributeChanged();
     UseCounter::Count(GetDocument(), WebFeature::kRequiredAttribute);
-  } else if (name == autofocusAttr) {
+  } else if (name == kAutofocusAttr) {
     HTMLElement::ParseAttribute(params);
     UseCounter::Count(GetDocument(), WebFeature::kAutoFocusAttribute);
   } else {
@@ -217,7 +217,7 @@
 }
 
 bool HTMLFormControlElement::IsReadOnly() const {
-  return FastHasAttribute(HTMLNames::readonlyAttr);
+  return FastHasAttribute(html_names::kReadonlyAttr);
 }
 
 bool HTMLFormControlElement::IsDisabledOrReadOnly() const {
@@ -229,7 +229,7 @@
 }
 
 bool HTMLFormControlElement::IsAutofocusable() const {
-  return FastHasAttribute(autofocusAttr) && SupportsAutofocus();
+  return FastHasAttribute(kAutofocusAttr) && SupportsAutofocus();
 }
 
 void HTMLFormControlElement::SetAutofillState(WebAutofillState autofill_state) {
@@ -247,7 +247,7 @@
 }
 
 const AtomicString& HTMLFormControlElement::autocapitalize() const {
-  if (!FastGetAttribute(autocapitalizeAttr).IsEmpty())
+  if (!FastGetAttribute(kAutocapitalizeAttr).IsEmpty())
     return HTMLElement::autocapitalize();
 
   // If the form control itself does not have the autocapitalize attribute set,
@@ -371,7 +371,7 @@
 }
 
 bool HTMLFormControlElement::IsDisabledFormControl() const {
-  if (FastHasAttribute(disabledAttr))
+  if (FastHasAttribute(kDisabledAttr))
     return true;
 
   // Since the MHTML is loaded in sandboxing mode with form submission and
@@ -390,11 +390,11 @@
 }
 
 bool HTMLFormControlElement::IsRequired() const {
-  return FastHasAttribute(requiredAttr);
+  return FastHasAttribute(kRequiredAttr);
 }
 
 String HTMLFormControlElement::ResultForDialogSubmit() {
-  return FastGetAttribute(valueAttr);
+  return FastGetAttribute(kValueAttr);
 }
 
 void HTMLFormControlElement::DidRecalcStyle(StyleRecalcChange) {
diff --git a/third_party/blink/renderer/core/html/forms/html_form_control_element_test.cc b/third_party/blink/renderer/core/html/forms/html_form_control_element_test.cc
index d85fbda..a152ce28 100644
--- a/third_party/blink/renderer/core/html/forms/html_form_control_element_test.cc
+++ b/third_party/blink/renderer/core/html/forms/html_form_control_element_test.cc
@@ -75,7 +75,7 @@
   input->setCustomValidity(
       String::FromUTF8("\xD8\xB9\xD8\xB1\xD8\xA8\xD9\x89"));
   input->setAttribute(
-      HTMLNames::titleAttr,
+      html_names::kTitleAttr,
       AtomicString::FromUTF8("\xD8\xB9\xD8\xB1\xD8\xA8\xD9\x89"));
 
   String message = input->validationMessage().StripWhiteSpace();
@@ -135,7 +135,8 @@
   GetDocument().documentElement()->SetInnerHTMLFromString("<select></select>");
   HTMLFormControlElement* const select =
       ToHTMLFormControlElement(GetDocument().QuerySelector("select"));
-  auto* const optgroup = GetDocument().CreateRawElement(HTMLNames::optgroupTag);
+  auto* const optgroup =
+      GetDocument().CreateRawElement(html_names::kOptgroupTag);
   auto* validation_client = new MockFormValidationMessageClient();
   GetDocument().GetPage()->SetValidationMessageClientForTesting(
       validation_client);
diff --git a/third_party/blink/renderer/core/html/forms/html_form_control_element_with_state.cc b/third_party/blink/renderer/core/html/forms/html_form_control_element_with_state.cc
index 3971c46..48c95e7 100644
--- a/third_party/blink/renderer/core/html/forms/html_form_control_element_with_state.cc
+++ b/third_party/blink/renderer/core/html/forms/html_form_control_element_with_state.cc
@@ -142,7 +142,7 @@
 }
 
 bool HTMLFormControlElementWithState::IsWearingAutofillAnchorMantle() const {
-  return FormControlType() == InputTypeNames::hidden;
+  return FormControlType() == input_type_names::kHidden;
 }
 
 String HTMLFormControlElementWithState::IDLExposedAutofillValue() const {
@@ -152,7 +152,7 @@
   // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill-processing-model
   // 1. If the element has no autocomplete attribute, then jump to the step
   // labeled default.
-  const AtomicString& value = FastGetAttribute(HTMLNames::autocompleteAttr);
+  const AtomicString& value = FastGetAttribute(html_names::kAutocompleteAttr);
   if (value.IsNull())
     return g_empty_string;
 
@@ -281,7 +281,7 @@
 
 void HTMLFormControlElementWithState::setIDLExposedAutofillValue(
     const String& autocomplete_value) {
-  setAttribute(HTMLNames::autocompleteAttr, AtomicString(autocomplete_value));
+  setAttribute(html_names::kAutocompleteAttr, AtomicString(autocomplete_value));
 }
 
 void HTMLFormControlElementWithState::NotifyFormStateChanged() {
diff --git a/third_party/blink/renderer/core/html/forms/html_form_controls_collection.cc b/third_party/blink/renderer/core/html/forms/html_form_controls_collection.cc
index 8f0d4784..08520b1 100644
--- a/third_party/blink/renderer/core/html/forms/html_form_controls_collection.cc
+++ b/third_party/blink/renderer/core/html/forms/html_form_controls_collection.cc
@@ -33,7 +33,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 // Since the collections are to be "live", we have to do the
 // calculation every time if anything has changed.
@@ -107,7 +107,7 @@
 static HTMLElement* FirstNamedItem(const ListedElement::List& elements_array,
                                    const QualifiedName& attr_name,
                                    const String& name) {
-  DCHECK(attr_name == idAttr || attr_name == nameAttr);
+  DCHECK(attr_name == kIdAttr || attr_name == kNameAttr);
 
   for (const auto& listed_element : elements_array) {
     HTMLElement* element = ToHTMLElement(listed_element);
@@ -125,9 +125,9 @@
   // attribute. If a match is not found, the method then searches for an
   // object with a matching name attribute, but only on those elements
   // that are allowed a name attribute.
-  if (HTMLElement* item = FirstNamedItem(ListedElements(), idAttr, name))
+  if (HTMLElement* item = FirstNamedItem(ListedElements(), kIdAttr, name))
     return item;
-  return FirstNamedItem(ListedElements(), nameAttr, name);
+  return FirstNamedItem(ListedElements(), kNameAttr, name);
 }
 
 void HTMLFormControlsCollection::UpdateIdNameCache() const {
diff --git a/third_party/blink/renderer/core/html/forms/html_form_element.cc b/third_party/blink/renderer/core/html/forms/html_form_element.cc
index 62508b4b..95a4873 100644
--- a/third_party/blink/renderer/core/html/forms/html_form_element.cc
+++ b/third_party/blink/renderer/core/html/forms/html_form_element.cc
@@ -65,10 +65,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 HTMLFormElement::HTMLFormElement(Document& document)
-    : HTMLElement(formTag, document),
+    : HTMLElement(kFormTag, document),
       listed_elements_are_dirty_(false),
       image_elements_are_dirty_(false),
       has_elements_associated_by_parser_(false),
@@ -107,7 +107,7 @@
 Node::InsertionNotificationRequest HTMLFormElement::InsertedInto(
     ContainerNode& insertion_point) {
   HTMLElement::InsertedInto(insertion_point);
-  LogAddElementIfIsolatedWorldAndInDocument("form", methodAttr, actionAttr);
+  LogAddElementIfIsolatedWorldAndInDocument("form", kMethodAttr, kActionAttr);
   if (insertion_point.isConnected())
     GetDocument().DidAssociateFormControl(this);
   return kInsertionDone;
@@ -418,7 +418,7 @@
     if (!element.IsDisabledFormControl())
       control->AppendToFormData(form_data);
     if (auto* input = ToHTMLInputElementOrNull(element)) {
-      if (input->type() == InputTypeNames::password &&
+      if (input->type() == input_type_names::kPassword &&
           !input->value().IsEmpty())
         form_data.SetContainsPasswordData(true);
     }
@@ -451,7 +451,7 @@
   }
 
   if (submission->Action().ProtocolIsJavaScript()) {
-    if (FastHasAttribute(disabledAttr)) {
+    if (FastHasAttribute(kDisabledAttr)) {
       UseCounter::Count(GetDocument(),
                         WebFeature::kFormDisabledAttributePresentAndSubmit);
     }
@@ -479,7 +479,7 @@
     UseCounter::Count(GetDocument().GetFrame(),
                       WebFeature::kMixedContentFormsSubmitted);
   }
-  if (FastHasAttribute(disabledAttr)) {
+  if (FastHasAttribute(kDisabledAttr)) {
     UseCounter::Count(GetDocument(),
                       WebFeature::kFormDisabledAttributePresentAndSubmit);
   }
@@ -530,7 +530,7 @@
 void HTMLFormElement::ParseAttribute(
     const AttributeModificationParams& params) {
   const QualifiedName& name = params.name;
-  if (name == actionAttr) {
+  if (name == kActionAttr) {
     attributes_.ParseAction(params.new_value);
     LogUpdateAttributeIfIsolatedWorldAndInDocument("form", params);
 
@@ -547,15 +547,15 @@
       UseCounter::Count(GetDocument().GetFrame(),
                         WebFeature::kMixedContentFormPresent);
     }
-  } else if (name == targetAttr) {
+  } else if (name == kTargetAttr) {
     attributes_.SetTarget(params.new_value);
-  } else if (name == methodAttr) {
+  } else if (name == kMethodAttr) {
     attributes_.UpdateMethodType(params.new_value);
-  } else if (name == enctypeAttr) {
+  } else if (name == kEnctypeAttr) {
     attributes_.UpdateEncodingType(params.new_value);
-  } else if (name == accept_charsetAttr) {
+  } else if (name == kAcceptCharsetAttr) {
     attributes_.SetAcceptCharset(params.new_value);
-  } else if (name == disabledAttr) {
+  } else if (name == kDisabledAttr) {
     UseCounter::Count(GetDocument(), WebFeature::kFormDisabledAttributePresent);
   } else {
     HTMLElement::ParseAttribute(params);
@@ -565,7 +565,7 @@
 void HTMLFormElement::Associate(ListedElement& e) {
   listed_elements_are_dirty_ = true;
   listed_elements_.clear();
-  if (ToHTMLElement(e).FastHasAttribute(formAttr))
+  if (ToHTMLElement(e).FastHasAttribute(kFormAttr))
     has_elements_associated_by_form_attribute_ = true;
 }
 
@@ -576,12 +576,12 @@
 }
 
 bool HTMLFormElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName() == actionAttr ||
+  return attribute.GetName() == kActionAttr ||
          HTMLElement::IsURLAttribute(attribute);
 }
 
 bool HTMLFormElement::HasLegalLinkAttribute(const QualifiedName& name) const {
-  return name == actionAttr || HTMLElement::HasLegalLinkAttribute(name);
+  return name == kActionAttr || HTMLElement::HasLegalLinkAttribute(name);
 }
 
 void HTMLFormElement::Associate(HTMLImageElement& e) {
@@ -667,7 +667,7 @@
 }
 
 bool HTMLFormElement::NoValidate() const {
-  return FastHasAttribute(novalidateAttr);
+  return FastHasAttribute(kNovalidateAttr);
 }
 
 String HTMLFormElement::action() const {
@@ -679,11 +679,11 @@
 }
 
 void HTMLFormElement::setAction(const AtomicString& value) {
-  setAttribute(actionAttr, value);
+  setAttribute(kActionAttr, value);
 }
 
 void HTMLFormElement::setEnctype(const AtomicString& value) {
-  setAttribute(enctypeAttr, value);
+  setAttribute(kEnctypeAttr, value);
 }
 
 String HTMLFormElement::method() const {
@@ -691,7 +691,7 @@
 }
 
 void HTMLFormElement::setMethod(const AtomicString& value) {
-  setAttribute(methodAttr, value);
+  setAttribute(kMethodAttr, value);
 }
 
 HTMLFormControlElement* HTMLFormElement::FindDefaultButton() const {
@@ -800,7 +800,7 @@
 }
 
 bool HTMLFormElement::ShouldAutocomplete() const {
-  return !DeprecatedEqualIgnoringCase(FastGetAttribute(autocompleteAttr),
+  return !DeprecatedEqualIgnoringCase(FastGetAttribute(kAutocompleteAttr),
                                       "off");
 }
 
diff --git a/third_party/blink/renderer/core/html/forms/html_input_element.cc b/third_party/blink/renderer/core/html/forms/html_input_element.cc
index e4d0a7f..c9037410 100644
--- a/third_party/blink/renderer/core/html/forms/html_input_element.cc
+++ b/third_party/blink/renderer/core/html/forms/html_input_element.cc
@@ -78,7 +78,7 @@
 namespace blink {
 
 using ValueMode = InputType::ValueMode;
-using namespace HTMLNames;
+using namespace html_names;
 
 class ListAttributeTargetObserver : public IdTargetObserver {
  public:
@@ -97,7 +97,7 @@
 
 HTMLInputElement::HTMLInputElement(Document& document,
                                    const CreateElementFlags flags)
-    : TextControlElement(inputTag, document),
+    : TextControlElement(kInputTag, document),
       size_(kDefaultSize),
       has_dirty_value_(false),
       is_checked_(false),
@@ -362,7 +362,7 @@
 }
 
 void HTMLInputElement::setType(const AtomicString& type) {
-  setAttribute(typeAttr, type);
+  setAttribute(kTypeAttr, type);
 }
 
 void HTMLInputElement::InitializeTypeInParsing() {
@@ -371,13 +371,13 @@
   DCHECK(!input_type_view_);
 
   const AtomicString& new_type_name =
-      InputType::NormalizeTypeName(FastGetAttribute(typeAttr));
+      InputType::NormalizeTypeName(FastGetAttribute(kTypeAttr));
   input_type_ = InputType::Create(*this, new_type_name);
   input_type_view_ = input_type_->CreateView();
-  String default_value = FastGetAttribute(valueAttr);
+  String default_value = FastGetAttribute(kValueAttr);
   if (input_type_->GetValueMode() == ValueMode::kValue)
     non_attribute_value_ = SanitizeValue(default_value);
-  has_been_password_field_ |= new_type_name == InputTypeNames::password;
+  has_been_password_field_ |= new_type_name == input_type_names::kPassword;
 
   if (input_type_view_->NeedsShadowSubtree()) {
     CreateUserAgentShadowRoot();
@@ -397,7 +397,7 @@
   DCHECK(input_type_view_);
 
   const AtomicString& new_type_name =
-      InputType::NormalizeTypeName(FastGetAttribute(typeAttr));
+      InputType::NormalizeTypeName(FastGetAttribute(kTypeAttr));
   if (input_type_->FormControlType() == new_type_name)
     return;
 
@@ -434,7 +434,7 @@
   bool placeholder_changed =
       input_type_->SupportsPlaceholder() != new_type->SupportsPlaceholder();
 
-  has_been_password_field_ |= new_type_name == InputTypeNames::password;
+  has_been_password_field_ |= new_type_name == input_type_names::kPassword;
 
   input_type_ = new_type;
   input_type_view_ = input_type_->CreateView();
@@ -468,7 +468,7 @@
       (new_value_mode == ValueMode::kDefault ||
        new_value_mode == ValueMode::kDefaultOn)) {
     if (HasDirtyValue())
-      setAttribute(valueAttr, AtomicString(non_attribute_value_));
+      setAttribute(kValueAttr, AtomicString(non_attribute_value_));
     non_attribute_value_ = String();
     has_dirty_value_ = false;
   }
@@ -480,7 +480,7 @@
   // set the control's dirty value flag to false.
   else if (old_value_mode != ValueMode::kValue &&
            new_value_mode == ValueMode::kValue) {
-    AtomicString value_string = FastGetAttribute(valueAttr);
+    AtomicString value_string = FastGetAttribute(kValueAttr);
     input_type_->WarnIfValueIsInvalid(value_string);
     non_attribute_value_ = SanitizeValue(value_string);
     has_dirty_value_ = false;
@@ -497,7 +497,7 @@
   } else {
     // ValueMode wasn't changed, or kDefault <-> kDefaultOn.
     if (!HasDirtyValue()) {
-      String default_value = FastGetAttribute(valueAttr);
+      String default_value = FastGetAttribute(kValueAttr);
       if (!default_value.IsNull())
         input_type_->WarnIfValueIsInvalid(default_value);
     }
@@ -520,20 +520,20 @@
       input_type_->ShouldRespectHeightAndWidthAttributes()) {
     DCHECK(GetElementData());
     AttributeCollection attributes = AttributesWithoutUpdate();
-    if (const Attribute* height = attributes.Find(heightAttr)) {
+    if (const Attribute* height = attributes.Find(kHeightAttr)) {
       TextControlElement::AttributeChanged(AttributeModificationParams(
-          heightAttr, height->Value(), height->Value(),
+          kHeightAttr, height->Value(), height->Value(),
           AttributeModificationReason::kDirectly));
     }
-    if (const Attribute* width = attributes.Find(widthAttr)) {
-      TextControlElement::AttributeChanged(
-          AttributeModificationParams(widthAttr, width->Value(), width->Value(),
-                                      AttributeModificationReason::kDirectly));
+    if (const Attribute* width = attributes.Find(kWidthAttr)) {
+      TextControlElement::AttributeChanged(AttributeModificationParams(
+          kWidthAttr, width->Value(), width->Value(),
+          AttributeModificationReason::kDirectly));
     }
-    if (const Attribute* align = attributes.Find(alignAttr)) {
-      TextControlElement::AttributeChanged(
-          AttributeModificationParams(alignAttr, align->Value(), align->Value(),
-                                      AttributeModificationReason::kDirectly));
+    if (const Attribute* align = attributes.Find(kAlignAttr)) {
+      TextControlElement::AttributeChanged(AttributeModificationParams(
+          kAlignAttr, align->Value(), align->Value(),
+          AttributeModificationReason::kDirectly));
     }
   }
 
@@ -691,9 +691,9 @@
 bool HTMLInputElement::IsPresentationAttribute(
     const QualifiedName& name) const {
   // FIXME: Remove type check.
-  if (name == vspaceAttr || name == hspaceAttr || name == alignAttr ||
-      name == widthAttr || name == heightAttr ||
-      (name == borderAttr && type() == InputTypeNames::image))
+  if (name == kVspaceAttr || name == kHspaceAttr || name == kAlignAttr ||
+      name == kWidthAttr || name == kHeightAttr ||
+      (name == kBorderAttr && type() == input_type_names::kImage))
     return true;
   return TextControlElement::IsPresentationAttribute(name);
 }
@@ -702,23 +702,23 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == vspaceAttr) {
+  if (name == kVspaceAttr) {
     AddHTMLLengthToStyle(style, CSSPropertyMarginTop, value);
     AddHTMLLengthToStyle(style, CSSPropertyMarginBottom, value);
-  } else if (name == hspaceAttr) {
+  } else if (name == kHspaceAttr) {
     AddHTMLLengthToStyle(style, CSSPropertyMarginLeft, value);
     AddHTMLLengthToStyle(style, CSSPropertyMarginRight, value);
-  } else if (name == alignAttr) {
+  } else if (name == kAlignAttr) {
     if (input_type_->ShouldRespectAlignAttribute())
       ApplyAlignmentAttributeToStyle(value, style);
-  } else if (name == widthAttr) {
+  } else if (name == kWidthAttr) {
     if (input_type_->ShouldRespectHeightAndWidthAttributes())
       AddHTMLLengthToStyle(style, CSSPropertyWidth, value);
-  } else if (name == heightAttr) {
+  } else if (name == kHeightAttr) {
     if (input_type_->ShouldRespectHeightAndWidthAttributes())
       AddHTMLLengthToStyle(style, CSSPropertyHeight, value);
-  } else if (name == borderAttr &&
-             type() == InputTypeNames::image) {  // FIXME: Remove type check.
+  } else if (name == kBorderAttr &&
+             type() == input_type_names::kImage) {  // FIXME: Remove type check.
     ApplyBorderAttributeToStyle(value, style);
   } else {
     TextControlElement::CollectStyleForPresentationAttribute(name, value,
@@ -733,12 +733,12 @@
   const QualifiedName& name = params.name;
   const AtomicString& value = params.new_value;
 
-  if (name == nameAttr) {
+  if (name == kNameAttr) {
     RemoveFromRadioButtonGroup();
     name_ = value;
     AddToRadioButtonGroup();
     TextControlElement::ParseAttribute(params);
-  } else if (name == autocompleteAttr) {
+  } else if (name == kAutocompleteAttr) {
     if (DeprecatedEqualIgnoringCase(value, "off")) {
       autocomplete_ = kOff;
     } else {
@@ -747,9 +747,9 @@
       else
         autocomplete_ = kOn;
     }
-  } else if (name == typeAttr) {
+  } else if (name == kTypeAttr) {
     UpdateType();
-  } else if (name == valueAttr) {
+  } else if (name == kValueAttr) {
     // We only need to setChanged if the form is looking at the default value
     // right now.
     if (!HasDirtyValue()) {
@@ -758,14 +758,14 @@
       UpdatePlaceholderVisibility();
       SetNeedsStyleRecalc(
           kSubtreeStyleChange,
-          StyleChangeReasonForTracing::FromAttribute(valueAttr));
+          StyleChangeReasonForTracing::FromAttribute(kValueAttr));
     }
     needs_to_update_view_value_ = true;
     SetNeedsValidityCheck();
     input_type_->WarnIfValueIsInvalidAndElementIsVisible(value);
     input_type_->InRangeChanged();
     input_type_view_->ValueAttributeChanged();
-  } else if (name == checkedAttr) {
+  } else if (name == kCheckedAttr) {
     // Another radio button in the same group might be checked by state
     // restore. We shouldn't call setChecked() even if this has the checked
     // attribute. So, delay the setChecked() call until
@@ -777,11 +777,11 @@
       dirty_checkedness_ = false;
     }
     PseudoStateChanged(CSSSelector::kPseudoDefault);
-  } else if (name == maxlengthAttr) {
+  } else if (name == kMaxlengthAttr) {
     SetNeedsValidityCheck();
-  } else if (name == minlengthAttr) {
+  } else if (name == kMinlengthAttr) {
     SetNeedsValidityCheck();
-  } else if (name == sizeAttr) {
+  } else if (name == kSizeAttr) {
     unsigned size = 0;
     if (value.IsEmpty() || !ParseHTMLNonNegativeInteger(value, size) ||
         size == 0 || size > 0x7fffffffu)
@@ -793,56 +793,56 @@
             ->SetNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
                 LayoutInvalidationReason::kAttributeChanged);
     }
-  } else if (name == altAttr) {
+  } else if (name == kAltAttr) {
     input_type_view_->AltAttributeChanged();
-  } else if (name == srcAttr) {
+  } else if (name == kSrcAttr) {
     input_type_view_->SrcAttributeChanged();
-  } else if (name == usemapAttr || name == accesskeyAttr) {
+  } else if (name == kUsemapAttr || name == kAccesskeyAttr) {
     // FIXME: ignore for the moment
-  } else if (name == onsearchAttr) {
+  } else if (name == kOnsearchAttr) {
     // Search field and slider attributes all just cause updateFromElement to be
     // called through style recalcing.
     SetAttributeEventListener(EventTypeNames::search,
                               CreateAttributeEventListener(this, name, value));
-  } else if (name == incrementalAttr) {
+  } else if (name == kIncrementalAttr) {
     UseCounter::Count(GetDocument(), WebFeature::kIncrementalAttribute);
-  } else if (name == minAttr) {
+  } else if (name == kMinAttr) {
     input_type_view_->MinOrMaxAttributeChanged();
     input_type_->SanitizeValueInResponseToMinOrMaxAttributeChange();
     input_type_->InRangeChanged();
     SetNeedsValidityCheck();
     UseCounter::Count(GetDocument(), WebFeature::kMinAttribute);
-  } else if (name == maxAttr) {
+  } else if (name == kMaxAttr) {
     input_type_view_->MinOrMaxAttributeChanged();
     input_type_->SanitizeValueInResponseToMinOrMaxAttributeChange();
     input_type_->InRangeChanged();
     SetNeedsValidityCheck();
     UseCounter::Count(GetDocument(), WebFeature::kMaxAttribute);
-  } else if (name == multipleAttr) {
+  } else if (name == kMultipleAttr) {
     input_type_view_->MultipleAttributeChanged();
     SetNeedsValidityCheck();
-  } else if (name == stepAttr) {
+  } else if (name == kStepAttr) {
     input_type_view_->StepAttributeChanged();
     SetNeedsValidityCheck();
     UseCounter::Count(GetDocument(), WebFeature::kStepAttribute);
-  } else if (name == patternAttr) {
+  } else if (name == kPatternAttr) {
     SetNeedsValidityCheck();
     UseCounter::Count(GetDocument(), WebFeature::kPatternAttribute);
-  } else if (name == readonlyAttr) {
+  } else if (name == kReadonlyAttr) {
     TextControlElement::ParseAttribute(params);
     input_type_view_->ReadonlyAttributeChanged();
-  } else if (name == listAttr) {
+  } else if (name == kListAttr) {
     has_non_empty_list_ = !value.IsEmpty();
     if (has_non_empty_list_) {
       ResetListAttributeTargetObserver();
       ListAttributeTargetChanged();
     }
     UseCounter::Count(GetDocument(), WebFeature::kListAttribute);
-  } else if (name == webkitdirectoryAttr) {
+  } else if (name == kWebkitdirectoryAttr) {
     TextControlElement::ParseAttribute(params);
     UseCounter::Count(GetDocument(), WebFeature::kPrefixedDirectoryAttribute);
   } else {
-    if (name == formactionAttr)
+    if (name == kFormactionAttr)
       LogUpdateAttributeIfIsolatedWorldAndInDocument("input", params);
     TextControlElement::ParseAttribute(params);
   }
@@ -860,7 +860,7 @@
   DCHECK(input_type_view_);
   TextControlElement::FinishParsingChildren();
   if (!state_restored_) {
-    bool checked = hasAttribute(checkedAttr);
+    bool checked = hasAttribute(kCheckedAttr);
     if (checked)
       setChecked(checked);
     dirty_checkedness_ = false;
@@ -899,12 +899,12 @@
   // http://www.w3.org/TR/1998/REC-html40-19980424/appendix/notes.html#altgen
   // also heavily discussed by Hixie on bugzilla
   // note this is intentionally different to HTMLImageElement::altText()
-  String alt = FastGetAttribute(altAttr);
+  String alt = FastGetAttribute(kAltAttr);
   // fall back to title attribute
   if (alt.IsNull())
-    alt = FastGetAttribute(titleAttr);
+    alt = FastGetAttribute(kTitleAttr);
   if (alt.IsNull())
-    alt = FastGetAttribute(valueAttr);
+    alt = FastGetAttribute(kValueAttr);
   if (alt.IsNull())
     alt = GetLocale().QueryString(WebLocalizedString::kInputElementAltText);
   return alt;
@@ -940,7 +940,7 @@
     SetNeedsValidityCheck();
   }
 
-  setChecked(hasAttribute(checkedAttr));
+  setChecked(hasAttribute(kCheckedAttr));
   dirty_checkedness_ = false;
 }
 
@@ -1049,9 +1049,9 @@
     case ValueMode::kFilename:
       return input_type_->ValueInFilenameValueMode();
     case ValueMode::kDefault:
-      return FastGetAttribute(valueAttr);
+      return FastGetAttribute(kValueAttr);
     case ValueMode::kDefaultOn: {
-      AtomicString value_string = FastGetAttribute(valueAttr);
+      AtomicString value_string = FastGetAttribute(kValueAttr);
       return value_string.IsNull() ? "on" : value_string;
     }
     case ValueMode::kValue:
@@ -1104,7 +1104,7 @@
                                 ExceptionState& exception_state,
                                 TextFieldEventBehavior event_behavior) {
   // FIXME: Remove type check.
-  if (type() == InputTypeNames::file && !value.IsEmpty()) {
+  if (type() == input_type_names::kFile && !value.IsEmpty()) {
     exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError,
                                       "This input element accepts a filename, "
                                       "which may only be programmatically set "
@@ -1204,7 +1204,7 @@
 
 void HTMLInputElement::SetValueFromRenderer(const String& value) {
   // File upload controls will never use this.
-  DCHECK_NE(type(), InputTypeNames::file);
+  DCHECK_NE(type(), input_type_names::kFile);
 
   // Clear the suggested value. Use the base class version to not trigger a view
   // update.
@@ -1313,7 +1313,7 @@
 
   if (input_type_view_->ShouldSubmitImplicitly(evt)) {
     // FIXME: Remove type check.
-    if (type() == InputTypeNames::search) {
+    if (type() == input_type_names::kSearch) {
       GetDocument()
           .GetTaskRunner(TaskType::kUserInteraction)
           ->PostTask(FROM_HERE, WTF::Bind(&HTMLInputElement::OnSearch,
@@ -1370,8 +1370,8 @@
 }
 
 bool HTMLInputElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName() == srcAttr ||
-         attribute.GetName() == formactionAttr ||
+  return attribute.GetName() == kSrcAttr ||
+         attribute.GetName() == kFormactionAttr ||
          TextControlElement::IsURLAttribute(attribute);
 }
 
@@ -1385,7 +1385,7 @@
 }
 
 const AtomicString& HTMLInputElement::DefaultValue() const {
-  return FastGetAttribute(valueAttr);
+  return FastGetAttribute(kValueAttr);
 }
 
 static inline bool IsRFC2616TokenCharacter(UChar ch) {
@@ -1433,20 +1433,20 @@
 }
 
 Vector<String> HTMLInputElement::AcceptMIMETypes() const {
-  return ParseAcceptAttribute(FastGetAttribute(acceptAttr), IsValidMIMEType);
+  return ParseAcceptAttribute(FastGetAttribute(kAcceptAttr), IsValidMIMEType);
 }
 
 Vector<String> HTMLInputElement::AcceptFileExtensions() const {
-  return ParseAcceptAttribute(FastGetAttribute(acceptAttr),
+  return ParseAcceptAttribute(FastGetAttribute(kAcceptAttr),
                               IsValidFileExtension);
 }
 
 const AtomicString& HTMLInputElement::Alt() const {
-  return FastGetAttribute(altAttr);
+  return FastGetAttribute(kAltAttr);
 }
 
 bool HTMLInputElement::Multiple() const {
-  return FastHasAttribute(multipleAttr);
+  return FastHasAttribute(kMultipleAttr);
 }
 
 void HTMLInputElement::setSize(unsigned size, ExceptionState& exception_state) {
@@ -1455,13 +1455,13 @@
         DOMExceptionCode::kIndexSizeError,
         "The value provided is 0, which is an invalid size.");
   } else {
-    SetUnsignedIntegralAttribute(sizeAttr, size ? size : kDefaultSize,
+    SetUnsignedIntegralAttribute(kSizeAttr, size ? size : kDefaultSize,
                                  kDefaultSize);
   }
 }
 
 KURL HTMLInputElement::Src() const {
-  return GetDocument().CompleteURL(FastGetAttribute(srcAttr));
+  return GetDocument().CompleteURL(FastGetAttribute(kSrcAttr));
 }
 
 FileList* HTMLInputElement::files() const {
@@ -1549,7 +1549,8 @@
   if (insertion_point.isConnected() && !Form())
     AddToRadioButtonGroup();
   ResetListAttributeTargetObserver();
-  LogAddElementIfIsolatedWorldAndInDocument("input", typeAttr, formactionAttr);
+  LogAddElementIfIsolatedWorldAndInDocument("input", kTypeAttr,
+                                            kFormactionAttr);
   return kInsertionShouldCallDidNotifySubtreeInsertions;
 }
 
@@ -1567,7 +1568,7 @@
     ImageLoader()->ElementDidMoveToNewDocument();
 
   // FIXME: Remove type check.
-  if (type() == InputTypeNames::radio)
+  if (type() == input_type_names::kRadio)
     GetTreeScope().GetRadioButtonGroupScope().RemoveButton(this);
 
   TextControlElement::DidMoveToNewDocument(old_document);
@@ -1612,7 +1613,7 @@
     return nullptr;
 
   return ToHTMLDataListElementOrNull(
-      GetTreeScope().getElementById(FastGetAttribute(listAttr)));
+      GetTreeScope().getElementById(FastGetAttribute(kListAttr)));
 }
 
 bool HTMLInputElement::HasValidDataListOptions() const {
@@ -1636,7 +1637,7 @@
     return filtered;
 
   String value = InnerEditorValue();
-  if (Multiple() && type() == InputTypeNames::email) {
+  if (Multiple() && type() == input_type_names::kEmail) {
     Vector<String> emails;
     value.Split(',', true, emails);
     if (!emails.IsEmpty())
@@ -1673,7 +1674,7 @@
 }
 
 void HTMLInputElement::ResetListAttributeTargetObserver() {
-  const AtomicString& value = FastGetAttribute(listAttr);
+  const AtomicString& value = FastGetAttribute(kListAttr);
   if (!value.IsNull() && isConnected()) {
     SetListAttributeTargetObserver(
         ListAttributeTargetObserver::Create(value, this));
@@ -1736,7 +1737,7 @@
 
 bool HTMLInputElement::IsInRequiredRadioButtonGroup() {
   // TODO(tkent): Remove type check.
-  DCHECK_EQ(type(), InputTypeNames::radio);
+  DCHECK_EQ(type(), input_type_names::kRadio);
   if (RadioButtonGroupScope* scope = GetRadioButtonGroupScope())
     return scope->IsInRequiredGroup(this);
   return false;
@@ -1752,7 +1753,7 @@
 
 RadioButtonGroupScope* HTMLInputElement::GetRadioButtonGroupScope() const {
   // FIXME: Remove type check.
-  if (type() != InputTypeNames::radio)
+  if (type() != input_type_names::kRadio)
     return nullptr;
   if (HTMLFormElement* form_element = Form())
     return &form_element->GetRadioButtonGroupScope();
@@ -1787,11 +1788,11 @@
 }
 
 void HTMLInputElement::setHeight(unsigned height) {
-  SetUnsignedIntegralAttribute(heightAttr, height);
+  SetUnsignedIntegralAttribute(kHeightAttr, height);
 }
 
 void HTMLInputElement::setWidth(unsigned width) {
-  SetUnsignedIntegralAttribute(widthAttr, width);
+  SetUnsignedIntegralAttribute(kWidthAttr, width);
 }
 
 ListAttributeTargetObserver* ListAttributeTargetObserver::Create(
diff --git a/third_party/blink/renderer/core/html/forms/html_input_element.h b/third_party/blink/renderer/core/html/forms/html_input_element.h
index fe681ff..87727dd 100644
--- a/third_party/blink/renderer/core/html/forms/html_input_element.h
+++ b/third_party/blink/renderer/core/html/forms/html_input_element.h
@@ -107,7 +107,7 @@
   bool IsTextField() const;
   // Do not add type check predicates for concrete input types; e.g.  isImage,
   // isRadio, isFile.  If you want to check the input type, you may use
-  // |input->type() == InputTypeNames::image|, etc.
+  // |input->type() == input_type_names::kImage|, etc.
 
   // Returns whether this field is or has ever been a password field so that
   // its value can be protected from memorization by autofill or keyboards.
diff --git a/third_party/blink/renderer/core/html/forms/html_input_element_test.cc b/third_party/blink/renderer/core/html/forms/html_input_element_test.cc
index 8ef3fb5..38f7c0c0 100644
--- a/third_party/blink/renderer/core/html/forms/html_input_element_test.cc
+++ b/third_party/blink/renderer/core/html/forms/html_input_element_test.cc
@@ -121,7 +121,7 @@
 TEST_F(HTMLInputElementTest, DefaultToolTip) {
   auto* input_without_form =
       HTMLInputElement::Create(GetDocument(), CreateElementFlags());
-  input_without_form->SetBooleanAttribute(HTMLNames::requiredAttr, true);
+  input_without_form->SetBooleanAttribute(html_names::kRequiredAttr, true);
   GetDocument().body()->AppendChild(input_without_form);
   EXPECT_EQ("<<ValidationValueMissing>>", input_without_form->DefaultToolTip());
 
@@ -129,23 +129,23 @@
   GetDocument().body()->AppendChild(form);
   auto* input_with_form =
       HTMLInputElement::Create(GetDocument(), CreateElementFlags());
-  input_with_form->SetBooleanAttribute(HTMLNames::requiredAttr, true);
+  input_with_form->SetBooleanAttribute(html_names::kRequiredAttr, true);
   form->AppendChild(input_with_form);
   EXPECT_EQ("<<ValidationValueMissing>>", input_with_form->DefaultToolTip());
 
-  form->SetBooleanAttribute(HTMLNames::novalidateAttr, true);
+  form->SetBooleanAttribute(html_names::kNovalidateAttr, true);
   EXPECT_EQ(String(), input_with_form->DefaultToolTip());
 }
 
 // crbug.com/589838
 TEST_F(HTMLInputElementTest, ImageTypeCrash) {
   auto* input = HTMLInputElement::Create(GetDocument(), CreateElementFlags());
-  input->setAttribute(HTMLNames::typeAttr, "image");
+  input->setAttribute(html_names::kTypeAttr, "image");
   input->EnsureFallbackContent();
   // Make sure ensurePrimaryContent() recreates UA shadow tree, and updating
   // |value| doesn't crash.
   input->EnsurePrimaryContent();
-  input->setAttribute(HTMLNames::valueAttr, "aaa");
+  input->setAttribute(html_names::kValueAttr, "aaa");
 }
 
 TEST_F(HTMLInputElementTest, RadioKeyDownDCHECKFailure) {
@@ -157,7 +157,7 @@
   HTMLInputElement& radio2 = ToHTMLInputElement(*radio1.nextSibling());
   radio1.focus();
   // Make layout-dirty.
-  radio2.setAttribute(HTMLNames::styleAttr, "position:fixed");
+  radio2.setAttribute(html_names::kStyleAttr, "position:fixed");
   KeyboardEventInit init;
   init.setKey("ArrowRight");
   radio1.DefaultEventHandler(*new KeyboardEvent("keydown", init));
@@ -182,9 +182,9 @@
 
 TEST_F(HTMLInputElementTest, StepDownOverflow) {
   auto* input = HTMLInputElement::Create(GetDocument(), CreateElementFlags());
-  input->setAttribute(HTMLNames::typeAttr, "date");
-  input->setAttribute(HTMLNames::minAttr, "2010-02-10");
-  input->setAttribute(HTMLNames::stepAttr, "9223372036854775556");
+  input->setAttribute(html_names::kTypeAttr, "date");
+  input->setAttribute(html_names::kMinAttr, "2010-02-10");
+  input->setAttribute(html_names::kStepAttr, "9223372036854775556");
   // InputType::applyStep() should not pass an out-of-range value to
   // setValueAsDecimal, and WTF::msToYear() should not cause a DCHECK failure.
   input->stepDown(1, ASSERT_NO_EXCEPTION);
@@ -202,7 +202,7 @@
   HTMLInputElement* input =
       ToHTMLInputElement(GetDocument().body()->firstChild());
   EXPECT_EQ(nullptr, input->UserAgentShadowRoot());
-  input->setAttribute(HTMLNames::typeAttr, "text");
+  input->setAttribute(html_names::kTypeAttr, "text");
   EXPECT_NE(nullptr, input->UserAgentShadowRoot());
 }
 
diff --git a/third_party/blink/renderer/core/html/forms/html_label_element.cc b/third_party/blink/renderer/core/html/forms/html_label_element.cc
index 8dcffb2b7..303a4b0 100644
--- a/third_party/blink/renderer/core/html/forms/html_label_element.cc
+++ b/third_party/blink/renderer/core/html/forms/html_label_element.cc
@@ -41,17 +41,17 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLLabelElement::HTMLLabelElement(Document& document)
-    : HTMLElement(labelTag, document), processing_click_(false) {}
+    : HTMLElement(kLabelTag, document), processing_click_(false) {}
 
 HTMLLabelElement* HTMLLabelElement::Create(Document& document) {
   return new HTMLLabelElement(document);
 }
 
 LabelableElement* HTMLLabelElement::control() const {
-  const AtomicString& control_id = getAttribute(forAttr);
+  const AtomicString& control_id = getAttribute(kForAttr);
   if (control_id.IsNull()) {
     // Search the children and descendants of the label element for a form
     // element.
diff --git a/third_party/blink/renderer/core/html/forms/html_legend_element.cc b/third_party/blink/renderer/core/html/forms/html_legend_element.cc
index 2efbd56..98f698c 100644
--- a/third_party/blink/renderer/core/html/forms/html_legend_element.cc
+++ b/third_party/blink/renderer/core/html/forms/html_legend_element.cc
@@ -33,10 +33,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLLegendElement::HTMLLegendElement(Document& document)
-    : HTMLElement(legendTag, document) {}
+    : HTMLElement(kLegendTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLLegendElement)
 
diff --git a/third_party/blink/renderer/core/html/forms/html_opt_group_element.cc b/third_party/blink/renderer/core/html/forms/html_opt_group_element.cc
index f04ceb6..feeba452 100644
--- a/third_party/blink/renderer/core/html/forms/html_opt_group_element.cc
+++ b/third_party/blink/renderer/core/html/forms/html_opt_group_element.cc
@@ -37,10 +37,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLOptGroupElement::HTMLOptGroupElement(Document& document)
-    : HTMLElement(optgroupTag, document) {}
+    : HTMLElement(kOptgroupTag, document) {}
 
 // An explicit empty destructor should be in html_opt_group_element.cc, because
 // if an implicit destructor is used or an empty destructor is defined in
@@ -57,21 +57,21 @@
 
 // static
 bool HTMLOptGroupElement::CanAssignToOptGroupSlot(const Node& node) {
-  return node.HasTagName(optionTag) || node.HasTagName(hrTag);
+  return node.HasTagName(kOptionTag) || node.HasTagName(kHrTag);
 }
 
 bool HTMLOptGroupElement::IsDisabledFormControl() const {
-  return FastHasAttribute(disabledAttr);
+  return FastHasAttribute(kDisabledAttr);
 }
 
 void HTMLOptGroupElement::ParseAttribute(
     const AttributeModificationParams& params) {
   HTMLElement::ParseAttribute(params);
 
-  if (params.name == disabledAttr) {
+  if (params.name == kDisabledAttr) {
     PseudoStateChanged(CSSSelector::kPseudoDisabled);
     PseudoStateChanged(CSSSelector::kPseudoEnabled);
-  } else if (params.name == labelAttr) {
+  } else if (params.name == kLabelAttr) {
     UpdateGroupLabel();
   }
 }
@@ -106,7 +106,7 @@
 }
 
 String HTMLOptGroupElement::GroupLabelText() const {
-  String item_text = getAttribute(labelAttr);
+  String item_text = getAttribute(kLabelAttr);
 
   // In WinIE, leading and trailing whitespace is ignored in options and
   // optgroups. We match this behavior.
@@ -139,8 +139,8 @@
   DEFINE_STATIC_LOCAL(AtomicString, label_padding, ("0 2px 1px 2px"));
   DEFINE_STATIC_LOCAL(AtomicString, label_min_height, ("1.2em"));
   HTMLDivElement* label = HTMLDivElement::Create(GetDocument());
-  label->setAttribute(roleAttr, AtomicString("group"));
-  label->setAttribute(aria_labelAttr, AtomicString());
+  label->setAttribute(kRoleAttr, AtomicString("group"));
+  label->setAttribute(kAriaLabelAttr, AtomicString());
   label->SetInlineStyleProperty(CSSPropertyPadding, label_padding);
   label->SetInlineStyleProperty(CSSPropertyMinHeight, label_min_height);
   label->SetIdAttribute(ShadowElementNames::OptGroupLabel());
@@ -154,7 +154,7 @@
   const String& label_text = GroupLabelText();
   HTMLDivElement& label = OptGroupLabelElement();
   label.setTextContent(label_text);
-  label.setAttribute(aria_labelAttr, AtomicString(label_text));
+  label.setAttribute(kAriaLabelAttr, AtomicString(label_text));
 }
 
 HTMLDivElement& HTMLOptGroupElement::OptGroupLabelElement() const {
diff --git a/third_party/blink/renderer/core/html/forms/html_option_element.cc b/third_party/blink/renderer/core/html/forms/html_option_element.cc
index 4f88654..8526a9f9 100644
--- a/third_party/blink/renderer/core/html/forms/html_option_element.cc
+++ b/third_party/blink/renderer/core/html/forms/html_option_element.cc
@@ -44,10 +44,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 HTMLOptionElement::HTMLOptionElement(Document& document)
-    : HTMLElement(optionTag, document), is_selected_(false) {}
+    : HTMLElement(kOptionTag, document), is_selected_(false) {}
 
 // An explicit empty destructor should be in html_option_element.cc, because
 // if an implicit destructor is used or an empty destructor is defined in
@@ -80,7 +80,7 @@
   if (!value.IsNull())
     element->setValue(value);
   if (default_selected)
-    element->setAttribute(selectedAttr, g_empty_atom);
+    element->setAttribute(kSelectedAttr, g_empty_atom);
   element->SetSelected(selected);
 
   return element;
@@ -94,7 +94,7 @@
 }
 
 bool HTMLOptionElement::MatchesDefaultPseudoClass() const {
-  return FastHasAttribute(selectedAttr);
+  return FastHasAttribute(kSelectedAttr);
 }
 
 bool HTMLOptionElement::MatchesEnabledPseudoClass() const {
@@ -107,7 +107,7 @@
 
   // WinIE does not use the label attribute, so as a quirk, we ignore it.
   if (!document.InQuirksMode())
-    text = FastGetAttribute(labelAttr);
+    text = FastGetAttribute(kLabelAttr);
 
   // FIXME: The following treats an element with the label attribute set to
   // the empty string the same as an element with no label attribute at all.
@@ -172,21 +172,21 @@
 void HTMLOptionElement::ParseAttribute(
     const AttributeModificationParams& params) {
   const QualifiedName& name = params.name;
-  if (name == valueAttr) {
+  if (name == kValueAttr) {
     if (HTMLDataListElement* data_list = OwnerDataListElement())
       data_list->OptionElementChildrenChanged();
-  } else if (name == disabledAttr) {
+  } else if (name == kDisabledAttr) {
     if (params.old_value.IsNull() != params.new_value.IsNull()) {
       PseudoStateChanged(CSSSelector::kPseudoDisabled);
       PseudoStateChanged(CSSSelector::kPseudoEnabled);
       if (LayoutObject* o = GetLayoutObject())
         o->InvalidateIfControlStateChanged(kEnabledControlState);
     }
-  } else if (name == selectedAttr) {
+  } else if (name == kSelectedAttr) {
     if (params.old_value.IsNull() != params.new_value.IsNull() && !is_dirty_)
       SetSelected(!params.new_value.IsNull());
     PseudoStateChanged(CSSSelector::kPseudoDefault);
-  } else if (name == labelAttr) {
+  } else if (name == kLabelAttr) {
     UpdateLabel();
   } else {
     HTMLElement::ParseAttribute(params);
@@ -194,7 +194,7 @@
 }
 
 String HTMLOptionElement::value() const {
-  const AtomicString& value = FastGetAttribute(valueAttr);
+  const AtomicString& value = FastGetAttribute(kValueAttr);
   if (!value.IsNull())
     return value;
   return CollectOptionInnerText()
@@ -203,7 +203,7 @@
 }
 
 void HTMLOptionElement::setValue(const AtomicString& value) {
-  setAttribute(valueAttr, value);
+  setAttribute(kValueAttr, value);
 }
 
 bool HTMLOptionElement::Selected() const {
@@ -291,7 +291,7 @@
 }
 
 String HTMLOptionElement::label() const {
-  const AtomicString& label = FastGetAttribute(labelAttr);
+  const AtomicString& label = FastGetAttribute(kLabelAttr);
   if (!label.IsNull())
     return label;
   return CollectOptionInnerText()
@@ -300,7 +300,7 @@
 }
 
 void HTMLOptionElement::setLabel(const AtomicString& label) {
-  setAttribute(labelAttr, label);
+  setAttribute(kLabelAttr, label);
 }
 
 String HTMLOptionElement::TextIndentedToRespectGroupLabel() const {
@@ -311,7 +311,7 @@
 }
 
 bool HTMLOptionElement::OwnElementDisabled() const {
-  return FastHasAttribute(disabledAttr);
+  return FastHasAttribute(kDisabledAttr);
 }
 
 bool HTMLOptionElement::IsDisabledFormControl() const {
diff --git a/third_party/blink/renderer/core/html/forms/html_output_element.cc b/third_party/blink/renderer/core/html/forms/html_output_element.cc
index 05478b0..20c0286 100644
--- a/third_party/blink/renderer/core/html/forms/html_output_element.cc
+++ b/third_party/blink/renderer/core/html/forms/html_output_element.cc
@@ -36,10 +36,10 @@
 namespace blink {
 
 inline HTMLOutputElement::HTMLOutputElement(Document& document)
-    : HTMLFormControlElement(HTMLNames::outputTag, document),
+    : HTMLFormControlElement(html_names::kOutputTag, document),
       is_default_value_mode_(true),
       default_value_(""),
-      tokens_(DOMTokenList::Create(*this, HTMLNames::forAttr)) {}
+      tokens_(DOMTokenList::Create(*this, html_names::kForAttr)) {}
 
 HTMLOutputElement::~HTMLOutputElement() = default;
 
@@ -66,7 +66,7 @@
 
 void HTMLOutputElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == HTMLNames::forAttr)
+  if (params.name == html_names::kForAttr)
     tokens_->DidUpdateAttributeValue(params.old_value, params.new_value);
   else
     HTMLFormControlElement::ParseAttribute(params);
diff --git a/third_party/blink/renderer/core/html/forms/html_output_element_test.cc b/third_party/blink/renderer/core/html/forms/html_output_element_test.cc
index fdb5cbe5..92ab80a 100644
--- a/third_party/blink/renderer/core/html/forms/html_output_element_test.cc
+++ b/third_party/blink/renderer/core/html/forms/html_output_element_test.cc
@@ -15,9 +15,9 @@
      setHTMLForProperty_updatesForAttribute) {
   Document* document = Document::CreateForTest();
   HTMLOutputElement* element = HTMLOutputElement::Create(*document);
-  EXPECT_EQ(g_null_atom, element->getAttribute(HTMLNames::forAttr));
+  EXPECT_EQ(g_null_atom, element->getAttribute(html_names::kForAttr));
   element->htmlFor()->setValue("  strawberry ");
-  EXPECT_EQ("  strawberry ", element->getAttribute(HTMLNames::forAttr));
+  EXPECT_EQ("  strawberry ", element->getAttribute(html_names::kForAttr));
 }
 
 TEST(HTMLOutputElementTest, setForAttribute_updatesHTMLForPropertyValue) {
@@ -25,7 +25,7 @@
   HTMLOutputElement* element = HTMLOutputElement::Create(*document);
   DOMTokenList* for_tokens = element->htmlFor();
   EXPECT_EQ(g_null_atom, for_tokens->value());
-  element->setAttribute(HTMLNames::forAttr, "orange grape");
+  element->setAttribute(html_names::kForAttr, "orange grape");
   EXPECT_EQ("orange grape", for_tokens->value());
 }
 
diff --git a/third_party/blink/renderer/core/html/forms/html_select_element.cc b/third_party/blink/renderer/core/html/forms/html_select_element.cc
index 30424f3..f41473c 100644
--- a/third_party/blink/renderer/core/html/forms/html_select_element.cc
+++ b/third_party/blink/renderer/core/html/forms/html_select_element.cc
@@ -77,7 +77,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 // Upper limit of list_items_. According to the HTML standard, options larger
 // than this limit doesn't work well because |selectedIndex| IDL attribute is
@@ -85,7 +85,7 @@
 static const unsigned kMaxListItems = INT_MAX;
 
 HTMLSelectElement::HTMLSelectElement(Document& document)
-    : HTMLFormControlElementWithState(selectTag, document),
+    : HTMLFormControlElementWithState(kSelectTag, document),
       type_ahead_(this),
       size_(0),
       last_on_change_option_(nullptr),
@@ -108,8 +108,8 @@
 
 // static
 bool HTMLSelectElement::CanAssignToSelectSlot(const Node& node) {
-  return node.HasTagName(optionTag) || node.HasTagName(optgroupTag) ||
-         node.HasTagName(hrTag);
+  return node.HasTagName(kOptionTag) || node.HasTagName(kOptgroupTag) ||
+         node.HasTagName(kHrTag);
 }
 
 const AtomicString& HTMLSelectElement::FormControlType() const {
@@ -290,7 +290,7 @@
 
 bool HTMLSelectElement::IsPresentationAttribute(
     const QualifiedName& name) const {
-  if (name == alignAttr) {
+  if (name == kAlignAttr) {
     // Don't map 'align' attribute. This matches what Firefox, Opera and IE do.
     // See http://bugs.webkit.org/show_bug.cgi?id=12072
     return false;
@@ -301,7 +301,7 @@
 
 void HTMLSelectElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == sizeAttr) {
+  if (params.name == kSizeAttr) {
     unsigned old_size = size_;
     if (!ParseHTMLNonNegativeInteger(params.new_value, size_))
       size_ = 0;
@@ -313,9 +313,9 @@
       if (!UsesMenuList())
         SaveListboxActiveSelection();
     }
-  } else if (params.name == multipleAttr) {
+  } else if (params.name == kMultipleAttr) {
     ParseMultipleAttribute(params.new_value);
-  } else if (params.name == accesskeyAttr) {
+  } else if (params.name == kAccesskeyAttr) {
     // FIXME: ignore for the moment.
     //
   } else {
@@ -1241,7 +1241,7 @@
 
 void HTMLSelectElement::ResetImpl() {
   for (auto* const option : GetOptionList()) {
-    option->SetSelectedState(option->FastHasAttribute(selectedAttr));
+    option->SetSelectedState(option->FastHasAttribute(kSelectedAttr));
     option->SetDirty(false);
   }
   ResetToDefaultSelection();
diff --git a/third_party/blink/renderer/core/html/forms/html_select_element_test.cc b/third_party/blink/renderer/core/html/forms/html_select_element_test.cc
index ba3bf95..b6ffdc48 100644
--- a/third_party/blink/renderer/core/html/forms/html_select_element_test.cc
+++ b/third_party/blink/renderer/core/html/forms/html_select_element_test.cc
@@ -158,7 +158,7 @@
     HTMLSelectElement* select =
         ToHTMLSelectElement(GetDocument().body()->firstChild());
     EXPECT_EQ("o1", select->FirstSelectableOption()->FastGetAttribute(
-                        HTMLNames::idAttr));
+                        html_names::kIdAttr));
   }
   {
     SetHtmlInnerHTML(
@@ -167,7 +167,7 @@
     HTMLSelectElement* select =
         ToHTMLSelectElement(GetDocument().body()->firstChild());
     EXPECT_EQ("o2", select->FirstSelectableOption()->FastGetAttribute(
-                        HTMLNames::idAttr));
+                        html_names::kIdAttr));
   }
   {
     SetHtmlInnerHTML(
@@ -176,7 +176,7 @@
     HTMLSelectElement* select =
         ToHTMLSelectElement(GetDocument().body()->firstChild());
     EXPECT_EQ("o2", select->FirstSelectableOption()->FastGetAttribute(
-                        HTMLNames::idAttr));
+                        html_names::kIdAttr));
   }
   {
     SetHtmlInnerHTML(
@@ -185,7 +185,7 @@
     HTMLSelectElement* select =
         ToHTMLSelectElement(GetDocument().body()->firstChild());
     EXPECT_EQ("o1", select->FirstSelectableOption()->FastGetAttribute(
-                        HTMLNames::idAttr));
+                        html_names::kIdAttr));
   }
 }
 
@@ -202,7 +202,7 @@
     HTMLSelectElement* select =
         ToHTMLSelectElement(GetDocument().body()->firstChild());
     EXPECT_EQ("o2", select->LastSelectableOption()->FastGetAttribute(
-                        HTMLNames::idAttr));
+                        html_names::kIdAttr));
   }
   {
     SetHtmlInnerHTML(
@@ -211,7 +211,7 @@
     HTMLSelectElement* select =
         ToHTMLSelectElement(GetDocument().body()->firstChild());
     EXPECT_EQ("o1", select->LastSelectableOption()->FastGetAttribute(
-                        HTMLNames::idAttr));
+                        html_names::kIdAttr));
   }
   {
     SetHtmlInnerHTML(
@@ -220,7 +220,7 @@
     HTMLSelectElement* select =
         ToHTMLSelectElement(GetDocument().body()->firstChild());
     EXPECT_EQ("o1", select->LastSelectableOption()->FastGetAttribute(
-                        HTMLNames::idAttr));
+                        html_names::kIdAttr));
   }
   {
     SetHtmlInnerHTML(
@@ -229,7 +229,7 @@
     HTMLSelectElement* select =
         ToHTMLSelectElement(GetDocument().body()->firstChild());
     EXPECT_EQ("o2", select->LastSelectableOption()->FastGetAttribute(
-                        HTMLNames::idAttr));
+                        html_names::kIdAttr));
   }
 }
 
@@ -246,7 +246,7 @@
     HTMLSelectElement* select =
         ToHTMLSelectElement(GetDocument().body()->firstChild());
     EXPECT_EQ("o1", select->NextSelectableOption(nullptr)->FastGetAttribute(
-                        HTMLNames::idAttr));
+                        html_names::kIdAttr));
   }
   {
     SetHtmlInnerHTML(
@@ -255,7 +255,7 @@
     HTMLSelectElement* select =
         ToHTMLSelectElement(GetDocument().body()->firstChild());
     EXPECT_EQ("o2", select->NextSelectableOption(nullptr)->FastGetAttribute(
-                        HTMLNames::idAttr));
+                        html_names::kIdAttr));
   }
   {
     SetHtmlInnerHTML(
@@ -264,7 +264,7 @@
     HTMLSelectElement* select =
         ToHTMLSelectElement(GetDocument().body()->firstChild());
     EXPECT_EQ("o2", select->NextSelectableOption(nullptr)->FastGetAttribute(
-                        HTMLNames::idAttr));
+                        html_names::kIdAttr));
   }
   {
     SetHtmlInnerHTML(
@@ -273,7 +273,7 @@
     HTMLSelectElement* select =
         ToHTMLSelectElement(GetDocument().body()->firstChild());
     EXPECT_EQ("o1", select->NextSelectableOption(nullptr)->FastGetAttribute(
-                        HTMLNames::idAttr));
+                        html_names::kIdAttr));
   }
   {
     SetHtmlInnerHTML(
@@ -282,7 +282,7 @@
         ToHTMLSelectElement(GetDocument().body()->firstChild());
     HTMLOptionElement* option = ToHTMLOptionElement(GetElementById("o1"));
     EXPECT_EQ("o2", select->NextSelectableOption(option)->FastGetAttribute(
-                        HTMLNames::idAttr));
+                        html_names::kIdAttr));
 
     EXPECT_EQ(nullptr, select->NextSelectableOption(
                            ToHTMLOptionElement(GetElementById("o2"))));
@@ -295,7 +295,7 @@
         ToHTMLSelectElement(GetDocument().body()->firstChild());
     HTMLOptionElement* option = ToHTMLOptionElement(GetElementById("o1"));
     EXPECT_EQ("o2", select->NextSelectableOption(option)->FastGetAttribute(
-                        HTMLNames::idAttr));
+                        html_names::kIdAttr));
   }
 }
 
@@ -312,7 +312,7 @@
     HTMLSelectElement* select =
         ToHTMLSelectElement(GetDocument().body()->firstChild());
     EXPECT_EQ("o2", select->PreviousSelectableOption(nullptr)->FastGetAttribute(
-                        HTMLNames::idAttr));
+                        html_names::kIdAttr));
   }
   {
     SetHtmlInnerHTML(
@@ -321,7 +321,7 @@
     HTMLSelectElement* select =
         ToHTMLSelectElement(GetDocument().body()->firstChild());
     EXPECT_EQ("o1", select->PreviousSelectableOption(nullptr)->FastGetAttribute(
-                        HTMLNames::idAttr));
+                        html_names::kIdAttr));
   }
   {
     SetHtmlInnerHTML(
@@ -330,7 +330,7 @@
     HTMLSelectElement* select =
         ToHTMLSelectElement(GetDocument().body()->firstChild());
     EXPECT_EQ("o1", select->PreviousSelectableOption(nullptr)->FastGetAttribute(
-                        HTMLNames::idAttr));
+                        html_names::kIdAttr));
   }
   {
     SetHtmlInnerHTML(
@@ -339,7 +339,7 @@
     HTMLSelectElement* select =
         ToHTMLSelectElement(GetDocument().body()->firstChild());
     EXPECT_EQ("o2", select->PreviousSelectableOption(nullptr)->FastGetAttribute(
-                        HTMLNames::idAttr));
+                        html_names::kIdAttr));
   }
   {
     SetHtmlInnerHTML(
@@ -348,7 +348,7 @@
         ToHTMLSelectElement(GetDocument().body()->firstChild());
     HTMLOptionElement* option = ToHTMLOptionElement(GetElementById("o2"));
     EXPECT_EQ("o1", select->PreviousSelectableOption(option)->FastGetAttribute(
-                        HTMLNames::idAttr));
+                        html_names::kIdAttr));
 
     EXPECT_EQ(nullptr, select->PreviousSelectableOption(
                            ToHTMLOptionElement(GetElementById("o1"))));
@@ -361,7 +361,7 @@
         ToHTMLSelectElement(GetDocument().body()->firstChild());
     HTMLOptionElement* option = ToHTMLOptionElement(GetElementById("o2"));
     EXPECT_EQ("o1", select->PreviousSelectableOption(option)->FastGetAttribute(
-                        HTMLNames::idAttr));
+                        html_names::kIdAttr));
   }
 }
 
@@ -394,7 +394,7 @@
   EXPECT_EQ(select->DefaultToolTip(), option->DefaultToolTip());
   EXPECT_EQ(select->DefaultToolTip(), optgroup->DefaultToolTip());
 
-  select->SetBooleanAttribute(HTMLNames::requiredAttr, true);
+  select->SetBooleanAttribute(html_names::kRequiredAttr, true);
   EXPECT_EQ("<<ValidationValueMissingForSelect>>", select->DefaultToolTip())
       << "defaultToolTip for SELECT without FORM and with required attribute "
          "should return a valueMissing message.";
@@ -410,7 +410,7 @@
   EXPECT_EQ(select->DefaultToolTip(), option->DefaultToolTip());
   EXPECT_EQ(select->DefaultToolTip(), optgroup->DefaultToolTip());
 
-  form->SetBooleanAttribute(HTMLNames::novalidateAttr, true);
+  form->SetBooleanAttribute(html_names::kNovalidateAttr, true);
   EXPECT_EQ(String(), select->DefaultToolTip())
       << "defaultToolTip for SELECT with FORM[novalidate] and required "
          "attribute should return null string.";
diff --git a/third_party/blink/renderer/core/html/forms/html_text_area_element.cc b/third_party/blink/renderer/core/html/forms/html_text_area_element.cc
index 9c1006c..5db6d8ec 100644
--- a/third_party/blink/renderer/core/html/forms/html_text_area_element.cc
+++ b/third_party/blink/renderer/core/html/forms/html_text_area_element.cc
@@ -53,7 +53,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 static const unsigned kDefaultRows = 2;
 static const unsigned kDefaultCols = 20;
@@ -69,7 +69,7 @@
 }
 
 HTMLTextAreaElement::HTMLTextAreaElement(Document& document)
-    : TextControlElement(textareaTag, document),
+    : TextControlElement(kTextareaTag, document),
       rows_(kDefaultRows),
       cols_(kDefaultCols),
       wrap_(kSoftWrap),
@@ -111,13 +111,13 @@
 
 bool HTMLTextAreaElement::IsPresentationAttribute(
     const QualifiedName& name) const {
-  if (name == alignAttr) {
+  if (name == kAlignAttr) {
     // Don't map 'align' attribute.  This matches what Firefox, Opera and IE do.
     // See http://bugs.webkit.org/show_bug.cgi?id=7075
     return false;
   }
 
-  if (name == wrapAttr)
+  if (name == kWrapAttr)
     return true;
   return TextControlElement::IsPresentationAttribute(name);
 }
@@ -126,7 +126,7 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == wrapAttr) {
+  if (name == kWrapAttr) {
     if (ShouldWrapText()) {
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyWhiteSpace,
                                               CSSValuePreWrap);
@@ -148,7 +148,7 @@
     const AttributeModificationParams& params) {
   const QualifiedName& name = params.name;
   const AtomicString& value = params.new_value;
-  if (name == rowsAttr) {
+  if (name == kRowsAttr) {
     unsigned rows = 0;
     if (value.IsEmpty() || !ParseHTMLNonNegativeInteger(value, rows) ||
         rows <= 0 || rows > 0x7fffffffu)
@@ -161,7 +161,7 @@
                 LayoutInvalidationReason::kAttributeChanged);
       }
     }
-  } else if (name == colsAttr) {
+  } else if (name == kColsAttr) {
     unsigned cols = 0;
     if (value.IsEmpty() || !ParseHTMLNonNegativeInteger(value, cols) ||
         cols <= 0 || cols > 0x7fffffffu)
@@ -174,7 +174,7 @@
                 LayoutInvalidationReason::kAttributeChanged);
       }
     }
-  } else if (name == wrapAttr) {
+  } else if (name == kWrapAttr) {
     // The virtual/physical values were a Netscape extension of HTML 3.0, now
     // deprecated.  The soft/hard /off values are a recommendation for HTML 4
     // extension by IE and NS 4.
@@ -195,12 +195,12 @@
                 LayoutInvalidationReason::kAttributeChanged);
       }
     }
-  } else if (name == accesskeyAttr) {
+  } else if (name == kAccesskeyAttr) {
     // ignore for the moment
-  } else if (name == maxlengthAttr) {
+  } else if (name == kMaxlengthAttr) {
     UseCounter::Count(GetDocument(), WebFeature::kTextAreaMaxLength);
     SetNeedsValidityCheck();
-  } else if (name == minlengthAttr) {
+  } else if (name == kMinlengthAttr) {
     UseCounter::Count(GetDocument(), WebFeature::kTextAreaMinLength);
     SetNeedsValidityCheck();
   } else {
@@ -222,7 +222,7 @@
       (wrap_ == kHardWrap) ? ValueWithHardLineBreaks() : value();
   form_data.AppendFromElement(GetName(), text);
 
-  const AtomicString& dirname_attr_value = FastGetAttribute(dirnameAttr);
+  const AtomicString& dirname_attr_value = FastGetAttribute(kDirnameAttr);
   if (!dirname_attr_value.IsNull())
     form_data.AppendFromElement(dirname_attr_value, DirectionForFormData());
 }
@@ -569,12 +569,12 @@
 }
 
 void HTMLTextAreaElement::setCols(unsigned cols) {
-  SetUnsignedIntegralAttribute(colsAttr, cols ? cols : kDefaultCols,
+  SetUnsignedIntegralAttribute(kColsAttr, cols ? cols : kDefaultCols,
                                kDefaultCols);
 }
 
 void HTMLTextAreaElement::setRows(unsigned rows) {
-  SetUnsignedIntegralAttribute(rowsAttr, rows ? rows : kDefaultRows,
+  SetUnsignedIntegralAttribute(kRowsAttr, rows ? rows : kDefaultRows,
                                kDefaultRows);
 }
 
@@ -602,7 +602,7 @@
     HTMLDivElement* new_element = HTMLDivElement::Create(GetDocument());
     placeholder = new_element;
     placeholder->SetShadowPseudoId(AtomicString("-webkit-input-placeholder"));
-    placeholder->setAttribute(idAttr, ShadowElementNames::Placeholder());
+    placeholder->setAttribute(kIdAttr, ShadowElementNames::Placeholder());
     placeholder->SetInlineStyleProperty(
         CSSPropertyDisplay,
         IsPlaceholderVisible() ? CSSValueBlock : CSSValueNone, true);
@@ -613,7 +613,7 @@
 
 String HTMLTextAreaElement::GetPlaceholderValue() const {
   return !SuggestedValue().IsEmpty() ? SuggestedValue()
-                                     : FastGetAttribute(placeholderAttr);
+                                     : FastGetAttribute(kPlaceholderAttr);
 }
 
 bool HTMLTextAreaElement::IsInteractiveContent() const {
diff --git a/third_party/blink/renderer/core/html/forms/image_input_type.cc b/third_party/blink/renderer/core/html/forms/image_input_type.cc
index 7a92a205..9d29c70d 100644
--- a/third_party/blink/renderer/core/html/forms/image_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/image_input_type.cc
@@ -41,7 +41,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline ImageInputType::ImageInputType(HTMLInputElement& element)
     : BaseButtonInputType(element), use_fallback_content_(false) {}
@@ -51,7 +51,7 @@
 }
 
 const AtomicString& ImageInputType::FormControlType() const {
-  return InputTypeNames::image;
+  return input_type_names::kImage;
 }
 
 bool ImageInputType::IsFormDataAppendable() const {
@@ -175,7 +175,7 @@
   if (!GetElement().GetLayoutObject()) {
     // Check the attribute first for an explicit pixel value.
     unsigned height;
-    if (ParseHTMLNonNegativeInteger(GetElement().FastGetAttribute(heightAttr),
+    if (ParseHTMLNonNegativeInteger(GetElement().FastGetAttribute(kHeightAttr),
                                     height))
       return height;
 
@@ -200,7 +200,7 @@
   if (!GetElement().GetLayoutObject()) {
     // Check the attribute first for an explicit pixel value.
     unsigned width;
-    if (ParseHTMLNonNegativeInteger(GetElement().FastGetAttribute(widthAttr),
+    if (ParseHTMLNonNegativeInteger(GetElement().FastGetAttribute(kWidthAttr),
                                     width))
       return width;
 
@@ -222,11 +222,11 @@
 }
 
 bool ImageInputType::HasLegalLinkAttribute(const QualifiedName& name) const {
-  return name == srcAttr || BaseButtonInputType::HasLegalLinkAttribute(name);
+  return name == kSrcAttr || BaseButtonInputType::HasLegalLinkAttribute(name);
 }
 
 const QualifiedName& ImageInputType::SubResourceAttributeName() const {
-  return srcAttr;
+  return kSrcAttr;
 }
 
 void ImageInputType::EnsureFallbackContent() {
diff --git a/third_party/blink/renderer/core/html/forms/input_type.cc b/third_party/blink/renderer/core/html/forms/input_type.cc
index a2771e45..c294915 100644
--- a/third_party/blink/renderer/core/html/forms/input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/input_type.cc
@@ -76,7 +76,7 @@
 namespace blink {
 
 using blink::WebLocalizedString;
-using namespace HTMLNames;
+using namespace html_names;
 
 using InputTypeFactoryFunction = InputType* (*)(HTMLInputElement&);
 using InputTypeFactoryMap = HashMap<AtomicString, InputTypeFactoryFunction>;
@@ -84,27 +84,27 @@
 static std::unique_ptr<InputTypeFactoryMap> CreateInputTypeFactoryMap() {
   std::unique_ptr<InputTypeFactoryMap> map =
       std::make_unique<InputTypeFactoryMap>();
-  map->insert(InputTypeNames::button, ButtonInputType::Create);
-  map->insert(InputTypeNames::checkbox, CheckboxInputType::Create);
-  map->insert(InputTypeNames::color, ColorInputType::Create);
-  map->insert(InputTypeNames::date, DateInputType::Create);
-  map->insert(InputTypeNames::datetime_local, DateTimeLocalInputType::Create);
-  map->insert(InputTypeNames::email, EmailInputType::Create);
-  map->insert(InputTypeNames::file, FileInputType::Create);
-  map->insert(InputTypeNames::hidden, HiddenInputType::Create);
-  map->insert(InputTypeNames::image, ImageInputType::Create);
-  map->insert(InputTypeNames::month, MonthInputType::Create);
-  map->insert(InputTypeNames::number, NumberInputType::Create);
-  map->insert(InputTypeNames::password, PasswordInputType::Create);
-  map->insert(InputTypeNames::radio, RadioInputType::Create);
-  map->insert(InputTypeNames::range, RangeInputType::Create);
-  map->insert(InputTypeNames::reset, ResetInputType::Create);
-  map->insert(InputTypeNames::search, SearchInputType::Create);
-  map->insert(InputTypeNames::submit, SubmitInputType::Create);
-  map->insert(InputTypeNames::tel, TelephoneInputType::Create);
-  map->insert(InputTypeNames::time, TimeInputType::Create);
-  map->insert(InputTypeNames::url, URLInputType::Create);
-  map->insert(InputTypeNames::week, WeekInputType::Create);
+  map->insert(input_type_names::kButton, ButtonInputType::Create);
+  map->insert(input_type_names::kCheckbox, CheckboxInputType::Create);
+  map->insert(input_type_names::kColor, ColorInputType::Create);
+  map->insert(input_type_names::kDate, DateInputType::Create);
+  map->insert(input_type_names::kDatetimeLocal, DateTimeLocalInputType::Create);
+  map->insert(input_type_names::kEmail, EmailInputType::Create);
+  map->insert(input_type_names::kFile, FileInputType::Create);
+  map->insert(input_type_names::kHidden, HiddenInputType::Create);
+  map->insert(input_type_names::kImage, ImageInputType::Create);
+  map->insert(input_type_names::kMonth, MonthInputType::Create);
+  map->insert(input_type_names::kNumber, NumberInputType::Create);
+  map->insert(input_type_names::kPassword, PasswordInputType::Create);
+  map->insert(input_type_names::kRadio, RadioInputType::Create);
+  map->insert(input_type_names::kRange, RangeInputType::Create);
+  map->insert(input_type_names::kReset, ResetInputType::Create);
+  map->insert(input_type_names::kSearch, SearchInputType::Create);
+  map->insert(input_type_names::kSubmit, SubmitInputType::Create);
+  map->insert(input_type_names::kTel, TelephoneInputType::Create);
+  map->insert(input_type_names::kTime, TimeInputType::Create);
+  map->insert(input_type_names::kUrl, URLInputType::Create);
+  map->insert(input_type_names::kWeek, WeekInputType::Create);
   // No need to register "text" because it is the default type.
   return map;
 }
@@ -131,10 +131,10 @@
 const AtomicString& InputType::NormalizeTypeName(
     const AtomicString& type_name) {
   if (type_name.IsEmpty())
-    return InputTypeNames::text;
+    return input_type_names::kText;
   InputTypeFactoryMap::const_iterator it =
       FactoryMap()->find(type_name.LowerASCII());
-  return it == FactoryMap()->end() ? InputTypeNames::text : it->key;
+  return it == FactoryMap()->end() ? input_type_names::kText : it->key;
 }
 
 InputType::~InputType() = default;
@@ -161,7 +161,7 @@
 }
 
 String InputType::ResultForDialogSubmit() const {
-  return GetElement().FastGetAttribute(valueAttr);
+  return GetElement().FastGetAttribute(kValueAttr);
 }
 
 double InputType::ValueAsDate() const {
@@ -361,7 +361,7 @@
     //   is present, when informing the user that the pattern is not matched
     return std::make_pair(
         GetLocale().QueryString(WebLocalizedString::kValidationPatternMismatch),
-        GetElement().FastGetAttribute(titleAttr).GetString());
+        GetElement().FastGetAttribute(kTitleAttr).GetString());
   }
 
   if (GetElement().TooLong()) {
@@ -702,7 +702,7 @@
   Decimal step = step_range.Step();
   EventQueueScope scope;
   Decimal new_value = current;
-  const AtomicString& step_string = GetElement().FastGetAttribute(stepAttr);
+  const AtomicString& step_string = GetElement().FastGetAttribute(kStepAttr);
   if (!DeprecatedEqualIgnoringCase(step_string, "any") &&
       step_range.StepMismatch(current)) {
     // Snap-to-step / clamping steps
@@ -867,10 +867,11 @@
 
 Decimal InputType::FindStepBase(const Decimal& default_value) const {
   Decimal step_base =
-      ParseToNumber(GetElement().FastGetAttribute(minAttr), Decimal::Nan());
-  if (!step_base.IsFinite())
+      ParseToNumber(GetElement().FastGetAttribute(kMinAttr), Decimal::Nan());
+  if (!step_base.IsFinite()) {
     step_base =
-        ParseToNumber(GetElement().FastGetAttribute(valueAttr), default_value);
+        ParseToNumber(GetElement().FastGetAttribute(kValueAttr), default_value);
+  }
   return step_base;
 }
 
@@ -882,19 +883,19 @@
     const StepRange::StepDescription& step_description) const {
   bool has_range_limitations = false;
   const Decimal step_base = FindStepBase(step_base_default);
-  Decimal minimum = ParseToNumberOrNaN(GetElement().FastGetAttribute(minAttr));
+  Decimal minimum = ParseToNumberOrNaN(GetElement().FastGetAttribute(kMinAttr));
   if (minimum.IsFinite())
     has_range_limitations = true;
   else
     minimum = minimum_default;
-  Decimal maximum = ParseToNumberOrNaN(GetElement().FastGetAttribute(maxAttr));
+  Decimal maximum = ParseToNumberOrNaN(GetElement().FastGetAttribute(kMaxAttr));
   if (maximum.IsFinite())
     has_range_limitations = true;
   else
     maximum = maximum_default;
   const Decimal step =
       StepRange::ParseStep(any_step_handling, step_description,
-                           GetElement().FastGetAttribute(stepAttr));
+                           GetElement().FastGetAttribute(kStepAttr));
   return StepRange(step_base, minimum, maximum, has_range_limitations, step,
                    step_description);
 }
diff --git a/third_party/blink/renderer/core/html/forms/input_type_names.json5 b/third_party/blink/renderer/core/html/forms/input_type_names.json5
index 73487a14..8485988 100644
--- a/third_party/blink/renderer/core/html/forms/input_type_names.json5
+++ b/third_party/blink/renderer/core/html/forms/input_type_names.json5
@@ -1,6 +1,6 @@
 {
   metadata: {
-    namespace: "InputType",
+    namespace: "input_type_names",
     export: "CORE_EXPORT",
   },
 
diff --git a/third_party/blink/renderer/core/html/forms/internal_popup_menu.cc b/third_party/blink/renderer/core/html/forms/internal_popup_menu.cc
index 4576ecd1..0d71278 100644
--- a/third_party/blink/renderer/core/html/forms/internal_popup_menu.cc
+++ b/third_party/blink/renderer/core/html/forms/internal_popup_menu.cc
@@ -376,7 +376,7 @@
   if (!element.title().IsEmpty())
     AddProperty("title", element.title(), data);
   const AtomicString& aria_label =
-      element.FastGetAttribute(HTMLNames::aria_labelAttr);
+      element.FastGetAttribute(html_names::kAriaLabelAttr);
   if (!aria_label.IsEmpty())
     AddProperty("ariaLabel", aria_label, data);
   if (element.IsDisabledFormControl())
@@ -392,7 +392,7 @@
   PagePopupClient::AddString("type: \"optgroup\",\n", data);
   AddProperty("label", element.GroupLabelText(), data);
   AddProperty("title", element.title(), data);
-  AddProperty("ariaLabel", element.FastGetAttribute(HTMLNames::aria_labelAttr),
+  AddProperty("ariaLabel", element.FastGetAttribute(html_names::kAriaLabelAttr),
               data);
   AddProperty("disabled", element.IsDisabledFormControl(), data);
   AddElementStyle(context, element);
@@ -406,7 +406,7 @@
   PagePopupClient::AddString("{\n", data);
   PagePopupClient::AddString("type: \"separator\",\n", data);
   AddProperty("title", element.title(), data);
-  AddProperty("ariaLabel", element.FastGetAttribute(HTMLNames::aria_labelAttr),
+  AddProperty("ariaLabel", element.FastGetAttribute(html_names::kAriaLabelAttr),
               data);
   AddProperty("disabled", element.IsDisabledFormControl(), data);
   AddElementStyle(context, element);
diff --git a/third_party/blink/renderer/core/html/forms/keyboard_clickable_input_type_view.cc b/third_party/blink/renderer/core/html/forms/keyboard_clickable_input_type_view.cc
index 31ddcf49..ba8e4bb1 100644
--- a/third_party/blink/renderer/core/html/forms/keyboard_clickable_input_type_view.cc
+++ b/third_party/blink/renderer/core/html/forms/keyboard_clickable_input_type_view.cc
@@ -36,8 +36,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 void KeyboardClickableInputTypeView::HandleKeydownEvent(KeyboardEvent& event) {
   if (event.key() == " ") {
     GetElement().SetActive(true);
diff --git a/third_party/blink/renderer/core/html/forms/labels_node_list.cc b/third_party/blink/renderer/core/html/forms/labels_node_list.cc
index e2ff16dd..e7d1538a 100644
--- a/third_party/blink/renderer/core/html/forms/labels_node_list.cc
+++ b/third_party/blink/renderer/core/html/forms/labels_node_list.cc
@@ -31,8 +31,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 LabelsNodeList::LabelsNodeList(ContainerNode& owner_node)
     : LiveNodeList(owner_node,
                    kLabelsNodeListType,
diff --git a/third_party/blink/renderer/core/html/forms/listed_element.cc b/third_party/blink/renderer/core/html/forms/listed_element.cc
index ff7a94f..12e1d4c7 100644
--- a/third_party/blink/renderer/core/html/forms/listed_element.cc
+++ b/third_party/blink/renderer/core/html/forms/listed_element.cc
@@ -34,7 +34,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 class FormAttributeTargetObserver : public IdTargetObserver {
  public:
@@ -70,7 +70,7 @@
 
 void ListedElement::DidMoveToNewDocument(Document& old_document) {
   HTMLElement* element = ToHTMLElement(this);
-  if (element->FastHasAttribute(formAttr))
+  if (element->FastHasAttribute(kFormAttr))
     SetFormAttributeTargetObserver(nullptr);
 }
 
@@ -84,13 +84,13 @@
     return;
 
   HTMLElement* element = ToHTMLElement(this);
-  if (element->FastHasAttribute(formAttr))
+  if (element->FastHasAttribute(kFormAttr))
     ResetFormAttributeTargetObserver();
 }
 
 void ListedElement::RemovedFrom(ContainerNode& insertion_point) {
   HTMLElement* element = ToHTMLElement(this);
-  if (insertion_point.isConnected() && element->FastHasAttribute(formAttr)) {
+  if (insertion_point.isConnected() && element->FastHasAttribute(kFormAttr)) {
     SetFormAttributeTargetObserver(nullptr);
     ResetFormOwner();
     return;
@@ -167,7 +167,7 @@
 void ListedElement::ResetFormOwner() {
   form_was_set_by_parser_ = false;
   HTMLElement* element = ToHTMLElement(this);
-  const AtomicString& form_id(element->FastGetAttribute(formAttr));
+  const AtomicString& form_id(element->FastGetAttribute(kFormAttr));
   HTMLFormElement* nearest_form = element->FindFormAncestor();
   // 1. If the element's form owner is not null, and either the element is not
   // reassociateable or its form content attribute is not present, and the
@@ -258,7 +258,7 @@
 
 void ListedElement::ResetFormAttributeTargetObserver() {
   HTMLElement* element = ToHTMLElement(this);
-  const AtomicString& form_id(element->FastGetAttribute(formAttr));
+  const AtomicString& form_id(element->FastGetAttribute(kFormAttr));
   if (!form_id.IsNull() && element->isConnected()) {
     SetFormAttributeTargetObserver(
         FormAttributeTargetObserver::Create(form_id, this));
diff --git a/third_party/blink/renderer/core/html/forms/month_input_type.cc b/third_party/blink/renderer/core/html/forms/month_input_type.cc
index d36dfd4..a100764 100644
--- a/third_party/blink/renderer/core/html/forms/month_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/month_input_type.cc
@@ -44,7 +44,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 static const int kMonthDefaultStep = 1;
 static const int kMonthDefaultStepBase = 0;
@@ -59,7 +59,7 @@
 }
 
 const AtomicString& MonthInputType::FormControlType() const {
-  return InputTypeNames::month;
+  return input_type_names::kMonth;
 }
 
 double MonthInputType::ValueAsDate() const {
@@ -149,10 +149,10 @@
     const DateComponents& date) const {
   layout_parameters.date_time_format = layout_parameters.locale.MonthFormat();
   layout_parameters.fallback_date_time_format = "yyyy-MM";
-  if (!ParseToDateComponents(GetElement().FastGetAttribute(minAttr),
+  if (!ParseToDateComponents(GetElement().FastGetAttribute(kMinAttr),
                              &layout_parameters.minimum))
     layout_parameters.minimum = DateComponents();
-  if (!ParseToDateComponents(GetElement().FastGetAttribute(maxAttr),
+  if (!ParseToDateComponents(GetElement().FastGetAttribute(kMaxAttr),
                              &layout_parameters.maximum))
     layout_parameters.maximum = DateComponents();
   layout_parameters.placeholder_for_month = "--";
diff --git a/third_party/blink/renderer/core/html/forms/multiple_fields_temporal_input_type_view.cc b/third_party/blink/renderer/core/html/forms/multiple_fields_temporal_input_type_view.cc
index 3870bbe0..87613bf 100644
--- a/third_party/blink/renderer/core/html/forms/multiple_fields_temporal_input_type_view.cc
+++ b/third_party/blink/renderer/core/html/forms/multiple_fields_temporal_input_type_view.cc
@@ -549,7 +549,7 @@
   edit->setAttribute(datetimeformat_attr,
                      AtomicString(layout_parameters.date_time_format),
                      ASSERT_NO_EXCEPTION);
-  const AtomicString pattern = edit->FastGetAttribute(HTMLNames::patternAttr);
+  const AtomicString pattern = edit->FastGetAttribute(html_names::kPatternAttr);
   if (!pattern.IsEmpty())
     layout_parameters.date_time_format = pattern;
 
diff --git a/third_party/blink/renderer/core/html/forms/number_input_type.cc b/third_party/blink/renderer/core/html/forms/number_input_type.cc
index d3a9680a..66aec30e 100644
--- a/third_party/blink/renderer/core/html/forms/number_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/number_input_type.cc
@@ -49,7 +49,7 @@
 namespace blink {
 
 using blink::WebLocalizedString;
-using namespace HTMLNames;
+using namespace html_names;
 
 static const int kNumberDefaultStep = 1;
 static const int kNumberDefaultStepBase = 0;
@@ -103,7 +103,7 @@
 }
 
 const AtomicString& NumberInputType::FormControlType() const {
-  return InputTypeNames::number;
+  return input_type_names::kNumber;
 }
 
 void NumberInputType::SetValue(const String& sanitized_value,
@@ -157,17 +157,17 @@
                                                   int& preferred_size) const {
   preferred_size = default_size;
 
-  const String step_string = GetElement().FastGetAttribute(stepAttr);
+  const String step_string = GetElement().FastGetAttribute(kStepAttr);
   if (DeprecatedEqualIgnoringCase(step_string, "any"))
     return false;
 
   const Decimal minimum =
-      ParseToDecimalForNumberType(GetElement().FastGetAttribute(minAttr));
+      ParseToDecimalForNumberType(GetElement().FastGetAttribute(kMinAttr));
   if (!minimum.IsFinite())
     return false;
 
   const Decimal maximum =
-      ParseToDecimalForNumberType(GetElement().FastGetAttribute(maxAttr));
+      ParseToDecimalForNumberType(GetElement().FastGetAttribute(kMaxAttr));
   if (!maximum.IsFinite())
     return false;
 
diff --git a/third_party/blink/renderer/core/html/forms/option_list_test.cc b/third_party/blink/renderer/core/html/forms/option_list_test.cc
index f10e65be..714bbc38 100644
--- a/third_party/blink/renderer/core/html/forms/option_list_test.cc
+++ b/third_party/blink/renderer/core/html/forms/option_list_test.cc
@@ -14,7 +14,7 @@
 namespace {
 
 AtomicString Id(const HTMLOptionElement* option) {
-  return option->FastGetAttribute(HTMLNames::idAttr);
+  return option->FastGetAttribute(html_names::kIdAttr);
 }
 
 }  // namespace
@@ -43,8 +43,8 @@
   Select().SetInnerHTMLFromString(
       "text<input><option id=o1></option><input><option "
       "id=o2></option><input>");
-  auto* div =
-      ToHTMLElement(Select().GetDocument().CreateRawElement(HTMLNames::divTag));
+  auto* div = ToHTMLElement(
+      Select().GetDocument().CreateRawElement(html_names::kDivTag));
   div->SetInnerHTMLFromString("<option id=o3></option>");
   Select().AppendChild(div);
   OptionList list = Select().GetOptionList();
diff --git a/third_party/blink/renderer/core/html/forms/password_input_type.cc b/third_party/blink/renderer/core/html/forms/password_input_type.cc
index 82bcbf6..b6f8b91e 100644
--- a/third_party/blink/renderer/core/html/forms/password_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/password_input_type.cc
@@ -50,12 +50,12 @@
 
 void PasswordInputType::CountUsage() {
   CountUsageIfVisible(WebFeature::kInputTypePassword);
-  if (GetElement().FastHasAttribute(HTMLNames::maxlengthAttr))
+  if (GetElement().FastHasAttribute(html_names::kMaxlengthAttr))
     CountUsageIfVisible(WebFeature::kInputTypePasswordMaxLength);
 }
 
 const AtomicString& PasswordInputType::FormControlType() const {
-  return InputTypeNames::password;
+  return input_type_names::kPassword;
 }
 
 bool PasswordInputType::ShouldSaveAndRestoreFormControlState() const {
diff --git a/third_party/blink/renderer/core/html/forms/picker_indicator_element.cc b/third_party/blink/renderer/core/html/forms/picker_indicator_element.cc
index 266a2f32..b1ee26d6 100644
--- a/third_party/blink/renderer/core/html/forms/picker_indicator_element.cc
+++ b/third_party/blink/renderer/core/html/forms/picker_indicator_element.cc
@@ -42,7 +42,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline PickerIndicatorElement::PickerIndicatorElement(
     Document& document,
@@ -56,7 +56,7 @@
   PickerIndicatorElement* element =
       new PickerIndicatorElement(document, picker_indicator_owner);
   element->SetShadowPseudoId(AtomicString("-webkit-calendar-picker-indicator"));
-  element->setAttribute(idAttr, ShadowElementNames::PickerIndicator());
+  element->setAttribute(kIdAttr, ShadowElementNames::PickerIndicator());
   return element;
 }
 
@@ -166,10 +166,10 @@
   // FIXME: We should have a way to disable accessibility in layout tests.
   if (LayoutTestSupport::IsRunningLayoutTest())
     return;
-  setAttribute(tabindexAttr, "0");
-  setAttribute(aria_haspopupAttr, "menu");
-  setAttribute(roleAttr, "button");
-  setAttribute(aria_labelAttr,
+  setAttribute(kTabindexAttr, "0");
+  setAttribute(kAriaHaspopupAttr, "menu");
+  setAttribute(kRoleAttr, "button");
+  setAttribute(kAriaLabelAttr,
                AtomicString(GetLocale().QueryString(
                    WebLocalizedString::kAXCalendarShowDatePicker)));
 }
diff --git a/third_party/blink/renderer/core/html/forms/radio_button_group_scope.cc b/third_party/blink/renderer/core/html/forms/radio_button_group_scope.cc
index 52fa2712..55825268 100644
--- a/third_party/blink/renderer/core/html/forms/radio_button_group_scope.cc
+++ b/third_party/blink/renderer/core/html/forms/radio_button_group_scope.cc
@@ -95,7 +95,7 @@
 }
 
 void RadioButtonGroup::Add(HTMLInputElement* button) {
-  DCHECK_EQ(button->type(), InputTypeNames::radio);
+  DCHECK_EQ(button->type(), input_type_names::kRadio);
   auto add_result = members_.insert(button, false);
   if (!add_result.is_new_entry)
     return;
@@ -115,7 +115,7 @@
 }
 
 void RadioButtonGroup::UpdateCheckedState(HTMLInputElement* button) {
-  DCHECK_EQ(button->type(), InputTypeNames::radio);
+  DCHECK_EQ(button->type(), input_type_names::kRadio);
   DCHECK(members_.Contains(button));
   bool was_valid = IsValid();
   if (button->checked()) {
@@ -133,7 +133,7 @@
 }
 
 void RadioButtonGroup::RequiredAttributeChanged(HTMLInputElement* button) {
-  DCHECK_EQ(button->type(), InputTypeNames::radio);
+  DCHECK_EQ(button->type(), input_type_names::kRadio);
   auto it = members_.find(button);
   DCHECK_NE(it, members_.end());
   bool was_valid = IsValid();
@@ -145,7 +145,7 @@
 }
 
 void RadioButtonGroup::Remove(HTMLInputElement* button) {
-  DCHECK_EQ(button->type(), InputTypeNames::radio);
+  DCHECK_EQ(button->type(), input_type_names::kRadio);
   auto it = members_.find(button);
   if (it == members_.end())
     return;
@@ -180,7 +180,7 @@
 void RadioButtonGroup::SetNeedsValidityCheckForAllButtons() {
   for (auto& element : members_) {
     HTMLInputElement* const button = element.key;
-    DCHECK_EQ(button->type(), InputTypeNames::radio);
+    DCHECK_EQ(button->type(), input_type_names::kRadio);
     button->SetNeedsValidityCheck();
   }
 }
@@ -208,7 +208,7 @@
 RadioButtonGroupScope::~RadioButtonGroupScope() = default;
 
 void RadioButtonGroupScope::AddButton(HTMLInputElement* element) {
-  DCHECK_EQ(element->type(), InputTypeNames::radio);
+  DCHECK_EQ(element->type(), input_type_names::kRadio);
   if (element->GetName().IsEmpty())
     return;
 
@@ -223,7 +223,7 @@
 }
 
 void RadioButtonGroupScope::UpdateCheckedState(HTMLInputElement* element) {
-  DCHECK_EQ(element->type(), InputTypeNames::radio);
+  DCHECK_EQ(element->type(), input_type_names::kRadio);
   if (element->GetName().IsEmpty())
     return;
   DCHECK(name_to_group_map_);
@@ -236,7 +236,7 @@
 
 void RadioButtonGroupScope::RequiredAttributeChanged(
     HTMLInputElement* element) {
-  DCHECK_EQ(element->type(), InputTypeNames::radio);
+  DCHECK_EQ(element->type(), input_type_names::kRadio);
   if (element->GetName().IsEmpty())
     return;
   DCHECK(name_to_group_map_);
@@ -256,7 +256,7 @@
 }
 
 bool RadioButtonGroupScope::IsInRequiredGroup(HTMLInputElement* element) const {
-  DCHECK_EQ(element->type(), InputTypeNames::radio);
+  DCHECK_EQ(element->type(), input_type_names::kRadio);
   if (element->GetName().IsEmpty())
     return false;
   if (!name_to_group_map_)
@@ -277,7 +277,7 @@
 }
 
 void RadioButtonGroupScope::RemoveButton(HTMLInputElement* element) {
-  DCHECK_EQ(element->type(), InputTypeNames::radio);
+  DCHECK_EQ(element->type(), input_type_names::kRadio);
   if (element->GetName().IsEmpty())
     return;
   if (!name_to_group_map_)
diff --git a/third_party/blink/renderer/core/html/forms/radio_input_type.cc b/third_party/blink/renderer/core/html/forms/radio_input_type.cc
index b505905..fefdaac 100644
--- a/third_party/blink/renderer/core/html/forms/radio_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/radio_input_type.cc
@@ -45,14 +45,12 @@
 
 }  // namespace
 
-using namespace HTMLNames;
-
 InputType* RadioInputType::Create(HTMLInputElement& element) {
   return new RadioInputType(element);
 }
 
 const AtomicString& RadioInputType::FormControlType() const {
-  return InputTypeNames::radio;
+  return input_type_names::kRadio;
 }
 
 bool RadioInputType::ValueMissing(const String&) const {
@@ -162,7 +160,7 @@
   Element* current_focused_element =
       GetElement().GetDocument().FocusedElement();
   if (auto* focused_input = ToHTMLInputElementOrNull(current_focused_element)) {
-    if (focused_input->type() == InputTypeNames::radio &&
+    if (focused_input->type() == input_type_names::kRadio &&
         focused_input->Form() == GetElement().Form() &&
         focused_input->GetName() == GetElement().GetName())
       return false;
@@ -207,7 +205,7 @@
     HTMLInputElement* checked_radio_button = state.checked_radio_button.Get();
     if (!checked_radio_button)
       GetElement().setChecked(false);
-    else if (checked_radio_button->type() == InputTypeNames::radio &&
+    else if (checked_radio_button->type() == input_type_names::kRadio &&
              checked_radio_button->Form() == GetElement().Form() &&
              checked_radio_button->GetName() == GetElement().GetName())
       checked_radio_button->setChecked(true);
@@ -235,7 +233,7 @@
        input_element; input_element = NextInputElement(
                           *input_element, current->Form(), forward)) {
     if (current->Form() == input_element->Form() &&
-        input_element->type() == InputTypeNames::radio &&
+        input_element->type() == input_type_names::kRadio &&
         input_element->GetName() == current->GetName())
       return input_element;
   }
diff --git a/third_party/blink/renderer/core/html/forms/radio_node_list.cc b/third_party/blink/renderer/core/html/forms/radio_node_list.cc
index 7170f0e..fa732daa 100644
--- a/third_party/blink/renderer/core/html/forms/radio_node_list.cc
+++ b/third_party/blink/renderer/core/html/forms/radio_node_list.cc
@@ -36,8 +36,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 RadioNodeList::RadioNodeList(ContainerNode& root_node,
                              const AtomicString& name,
                              CollectionType type)
@@ -55,7 +53,7 @@
   if (!IsHTMLInputElement(element))
     return nullptr;
   HTMLInputElement& input_element = ToHTMLInputElement(element);
-  if (input_element.type() != InputTypeNames::radio ||
+  if (input_element.type() != input_type_names::kRadio ||
       input_element.value().IsEmpty())
     return nullptr;
   return &input_element;
@@ -121,7 +119,7 @@
     return false;
 
   if (IsHTMLInputElement(element) &&
-      ToHTMLInputElement(element).type() == InputTypeNames::image)
+      ToHTMLInputElement(element).type() == input_type_names::kImage)
     return false;
 
   return CheckElementMatchesRadioNodeListFilter(element);
diff --git a/third_party/blink/renderer/core/html/forms/range_input_type.cc b/third_party/blink/renderer/core/html/forms/range_input_type.cc
index ed0fcbe..13059c4 100644
--- a/third_party/blink/renderer/core/html/forms/range_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/range_input_type.cc
@@ -57,7 +57,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 static const int kRangeDefaultMinimum = 0;
 static const int kRangeDefaultMaximum = 100;
@@ -103,7 +103,7 @@
 }
 
 const AtomicString& RangeInputType::FormControlType() const {
-  return InputTypeNames::range;
+  return input_type_names::kRange;
 }
 
 double RangeInputType::ValueAsDouble() const {
@@ -132,16 +132,16 @@
       (kRangeDefaultStep, kRangeDefaultStepBase, kRangeStepScaleFactor));
 
   const Decimal step_base = FindStepBase(kRangeDefaultStepBase);
-  const Decimal minimum = ParseToNumber(GetElement().FastGetAttribute(minAttr),
+  const Decimal minimum = ParseToNumber(GetElement().FastGetAttribute(kMinAttr),
                                         kRangeDefaultMinimum);
   const Decimal maximum =
-      EnsureMaximum(ParseToNumber(GetElement().FastGetAttribute(maxAttr),
+      EnsureMaximum(ParseToNumber(GetElement().FastGetAttribute(kMaxAttr),
                                   kRangeDefaultMaximum),
                     minimum);
 
   const Decimal step =
       StepRange::ParseStep(any_step_handling, step_description,
-                           GetElement().FastGetAttribute(stepAttr));
+                           GetElement().FastGetAttribute(kStepAttr));
   // Range type always has range limitations because it has default
   // minimum/maximum.
   // https://html.spec.whatwg.org/multipage/forms.html#range-state-(type=range):concept-input-min-default
@@ -187,7 +187,7 @@
   // FIXME: We can't use stepUp() for the step value "any". So, we increase
   // or decrease the value by 1/100 of the value range. Is it reasonable?
   const Decimal step = DeprecatedEqualIgnoringCase(
-                           GetElement().FastGetAttribute(stepAttr), "any")
+                           GetElement().FastGetAttribute(kStepAttr), "any")
                            ? (step_range.Maximum() - step_range.Minimum()) / 100
                            : step_range.Step();
   const Decimal big_step =
@@ -245,7 +245,7 @@
   Document& document = GetElement().GetDocument();
   HTMLDivElement* track = HTMLDivElement::Create(document);
   track->SetShadowPseudoId(AtomicString("-webkit-slider-runnable-track"));
-  track->setAttribute(idAttr, ShadowElementNames::SliderTrack());
+  track->setAttribute(kIdAttr, ShadowElementNames::SliderTrack());
   track->AppendChild(SliderThumbElement::Create(document));
   HTMLElement* container = SliderContainerElement::Create(document);
   container->AppendChild(track);
diff --git a/third_party/blink/renderer/core/html/forms/reset_input_type.cc b/third_party/blink/renderer/core/html/forms/reset_input_type.cc
index 98ddebf..e521ea8 100644
--- a/third_party/blink/renderer/core/html/forms/reset_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/reset_input_type.cc
@@ -44,7 +44,7 @@
 }
 
 const AtomicString& ResetInputType::FormControlType() const {
-  return InputTypeNames::reset;
+  return input_type_names::kReset;
 }
 
 bool ResetInputType::SupportsValidation() const {
diff --git a/third_party/blink/renderer/core/html/forms/search_input_type.cc b/third_party/blink/renderer/core/html/forms/search_input_type.cc
index 82c28f6..8248fd8 100644
--- a/third_party/blink/renderer/core/html/forms/search_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/search_input_type.cc
@@ -44,7 +44,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline SearchInputType::SearchInputType(HTMLInputElement& element)
     : BaseTextInputType(element),
@@ -66,7 +66,7 @@
 }
 
 const AtomicString& SearchInputType::FormControlType() const {
-  return InputTypeNames::search;
+  return input_type_names::kSearch;
 }
 
 bool SearchInputType::NeedsContainer() const {
@@ -131,7 +131,7 @@
 }
 
 bool SearchInputType::SearchEventsShouldBeDispatched() const {
-  return GetElement().hasAttribute(incrementalAttr);
+  return GetElement().hasAttribute(kIncrementalAttr);
 }
 
 void SearchInputType::DidSetValueByUserEdit() {
diff --git a/third_party/blink/renderer/core/html/forms/slider_thumb_element.cc b/third_party/blink/renderer/core/html/forms/slider_thumb_element.cc
index 42355024..de20253 100644
--- a/third_party/blink/renderer/core/html/forms/slider_thumb_element.cc
+++ b/third_party/blink/renderer/core/html/forms/slider_thumb_element.cc
@@ -50,7 +50,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline static bool HasVerticalAppearance(HTMLInputElement* input) {
   return input->ComputedStyleRef().Appearance() == kSliderVerticalPart;
@@ -63,7 +63,7 @@
 
 SliderThumbElement* SliderThumbElement::Create(Document& document) {
   SliderThumbElement* element = new SliderThumbElement(document);
-  element->setAttribute(idAttr, ShadowElementNames::SliderThumb());
+  element->setAttribute(kIdAttr, ShadowElementNames::SliderThumb());
   return element;
 }
 
diff --git a/third_party/blink/renderer/core/html/forms/spin_button_element.cc b/third_party/blink/renderer/core/html/forms/spin_button_element.cc
index 9aa7296..1c8d30c 100644
--- a/third_party/blink/renderer/core/html/forms/spin_button_element.cc
+++ b/third_party/blink/renderer/core/html/forms/spin_button_element.cc
@@ -41,7 +41,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline SpinButtonElement::SpinButtonElement(Document& document,
                                             SpinButtonOwner& spin_button_owner)
@@ -60,7 +60,7 @@
   SpinButtonElement* element =
       new SpinButtonElement(document, spin_button_owner);
   element->SetShadowPseudoId(AtomicString("-webkit-inner-spin-button"));
-  element->setAttribute(idAttr, ShadowElementNames::SpinButton());
+  element->setAttribute(kIdAttr, ShadowElementNames::SpinButton());
   return element;
 }
 
diff --git a/third_party/blink/renderer/core/html/forms/step_range.cc b/third_party/blink/renderer/core/html/forms/step_range.cc
index 3507a85..d8ea6ddb 100644
--- a/third_party/blink/renderer/core/html/forms/step_range.cc
+++ b/third_party/blink/renderer/core/html/forms/step_range.cc
@@ -28,8 +28,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 StepRange::StepRange()
     : maximum_(100),
       minimum_(0),
diff --git a/third_party/blink/renderer/core/html/forms/submit_input_type.cc b/third_party/blink/renderer/core/html/forms/submit_input_type.cc
index b722264..11ac17b 100644
--- a/third_party/blink/renderer/core/html/forms/submit_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/submit_input_type.cc
@@ -47,7 +47,7 @@
 }
 
 const AtomicString& SubmitInputType::FormControlType() const {
-  return InputTypeNames::submit;
+  return input_type_names::kSubmit;
 }
 
 void SubmitInputType::AppendToFormData(FormData& form_data) const {
diff --git a/third_party/blink/renderer/core/html/forms/telephone_input_type.cc b/third_party/blink/renderer/core/html/forms/telephone_input_type.cc
index 75bf3b1..f01c924f 100644
--- a/third_party/blink/renderer/core/html/forms/telephone_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/telephone_input_type.cc
@@ -44,7 +44,7 @@
 }
 
 const AtomicString& TelephoneInputType::FormControlType() const {
-  return InputTypeNames::tel;
+  return input_type_names::kTel;
 }
 
 }  // namespace blink
diff --git a/third_party/blink/renderer/core/html/forms/text_control_element.cc b/third_party/blink/renderer/core/html/forms/text_control_element.cc
index 5d42f101..35525705 100644
--- a/third_party/blink/renderer/core/html/forms/text_control_element.cc
+++ b/third_party/blink/renderer/core/html/forms/text_control_element.cc
@@ -62,7 +62,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 TextControlElement::TextControlElement(const QualifiedName& tag_name,
                                        Document& doc)
@@ -137,7 +137,7 @@
 String TextControlElement::StrippedPlaceholder() const {
   // According to the HTML5 specification, we need to remove CR and LF from
   // the attribute value.
-  const AtomicString& attribute_value = FastGetAttribute(placeholderAttr);
+  const AtomicString& attribute_value = FastGetAttribute(kPlaceholderAttr);
   if (!attribute_value.Contains(kNewlineCharacter) &&
       !attribute_value.Contains(kCarriageReturnCharacter))
     return attribute_value;
@@ -159,7 +159,7 @@
 }
 
 bool TextControlElement::IsPlaceholderEmpty() const {
-  const AtomicString& attribute_value = FastGetAttribute(placeholderAttr);
+  const AtomicString& attribute_value = FastGetAttribute(kPlaceholderAttr);
   return attribute_value.GetString().Find(IsNotLineBreak) == kNotFound;
 }
 
@@ -356,7 +356,7 @@
   unsigned remaining_characters_to_move_forward = index;
   Node* last_br_or_text = inner_editor;
   for (Node& node : NodeTraversal::DescendantsOf(*inner_editor)) {
-    if (node.HasTagName(brTag)) {
+    if (node.HasTagName(kBrTag)) {
       if (remaining_characters_to_move_forward == 0)
         return Position::BeforeNode(node);
       --remaining_characters_to_move_forward;
@@ -405,7 +405,7 @@
         index += std::min(length, passed_position.OffsetInContainerNode());
       else
         index += length;
-    } else if (node->HasTagName(brTag)) {
+    } else if (node->HasTagName(kBrTag)) {
       ++index;
     }
   }
@@ -662,14 +662,14 @@
 
 int TextControlElement::maxLength() const {
   int value;
-  if (!ParseHTMLInteger(FastGetAttribute(maxlengthAttr), value))
+  if (!ParseHTMLInteger(FastGetAttribute(kMaxlengthAttr), value))
     return -1;
   return value >= 0 ? value : -1;
 }
 
 int TextControlElement::minLength() const {
   int value;
-  if (!ParseHTMLInteger(FastGetAttribute(minlengthAttr), value))
+  if (!ParseHTMLInteger(FastGetAttribute(kMinlengthAttr), value))
     return -1;
   return value >= 0 ? value : -1;
 }
@@ -688,7 +688,7 @@
         ExceptionMessages::IndexExceedsMinimumBound("maxLength", new_value,
                                                     min));
   } else {
-    SetIntegralAttribute(maxlengthAttr, new_value);
+    SetIntegralAttribute(kMaxlengthAttr, new_value);
   }
 }
 
@@ -706,7 +706,7 @@
         ExceptionMessages::IndexExceedsMaximumBound("minLength", new_value,
                                                     max));
   } else {
-    SetIntegralAttribute(minlengthAttr, new_value);
+    SetIntegralAttribute(kMinlengthAttr, new_value);
   }
 }
 
@@ -743,7 +743,7 @@
 
 void TextControlElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == placeholderAttr) {
+  if (params.name == kPlaceholderAttr) {
     UpdatePlaceholderText();
     UpdatePlaceholderVisibility();
     UseCounter::Count(GetDocument(), WebFeature::kPlaceholderAttribute);
@@ -929,7 +929,7 @@
   for (const HTMLElement* element = this; element;
        element = Traversal<HTMLElement>::FirstAncestor(*element)) {
     const AtomicString& dir_attribute_value =
-        element->FastGetAttribute(dirAttr);
+        element->FastGetAttribute(kDirAttr);
     if (dir_attribute_value.IsNull())
       continue;
 
diff --git a/third_party/blink/renderer/core/html/forms/text_control_element_test.cc b/third_party/blink/renderer/core/html/forms/text_control_element_test.cc
index 6f52800..a690cb73 100644
--- a/third_party/blink/renderer/core/html/forms/text_control_element_test.cc
+++ b/third_party/blink/renderer/core/html/forms/text_control_element_test.cc
@@ -88,26 +88,26 @@
 }
 
 TEST_F(TextControlElementTest, ReadOnlyAttributeChangeEditability) {
-  Input().setAttribute(HTMLNames::styleAttr, "all:initial");
-  Input().setAttribute(HTMLNames::readonlyAttr, "");
+  Input().setAttribute(html_names::kStyleAttr, "all:initial");
+  Input().setAttribute(html_names::kReadonlyAttr, "");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(EUserModify::kReadOnly,
             Input().InnerEditorElement()->GetComputedStyle()->UserModify());
 
-  Input().removeAttribute(HTMLNames::readonlyAttr);
+  Input().removeAttribute(html_names::kReadonlyAttr);
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(EUserModify::kReadWritePlaintextOnly,
             Input().InnerEditorElement()->GetComputedStyle()->UserModify());
 }
 
 TEST_F(TextControlElementTest, DisabledAttributeChangeEditability) {
-  Input().setAttribute(HTMLNames::styleAttr, "all:initial");
-  Input().setAttribute(HTMLNames::disabledAttr, "");
+  Input().setAttribute(html_names::kStyleAttr, "all:initial");
+  Input().setAttribute(html_names::kDisabledAttr, "");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(EUserModify::kReadOnly,
             Input().InnerEditorElement()->GetComputedStyle()->UserModify());
 
-  Input().removeAttribute(HTMLNames::disabledAttr);
+  Input().removeAttribute(html_names::kDisabledAttr);
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(EUserModify::kReadWritePlaintextOnly,
             Input().InnerEditorElement()->GetComputedStyle()->UserModify());
diff --git a/third_party/blink/renderer/core/html/forms/text_control_inner_elements.cc b/third_party/blink/renderer/core/html/forms/text_control_inner_elements.cc
index ba2974ca..9e8d05ec 100644
--- a/third_party/blink/renderer/core/html/forms/text_control_inner_elements.cc
+++ b/third_party/blink/renderer/core/html/forms/text_control_inner_elements.cc
@@ -43,7 +43,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 TextControlInnerContainer::TextControlInnerContainer(Document& document)
     : HTMLDivElement(document) {}
@@ -51,7 +51,7 @@
 TextControlInnerContainer* TextControlInnerContainer::Create(
     Document& document) {
   TextControlInnerContainer* element = new TextControlInnerContainer(document);
-  element->setAttribute(idAttr, ShadowElementNames::TextFieldContainer());
+  element->setAttribute(kIdAttr, ShadowElementNames::TextFieldContainer());
   return element;
 }
 
@@ -69,7 +69,7 @@
 
 EditingViewPortElement* EditingViewPortElement::Create(Document& document) {
   EditingViewPortElement* element = new EditingViewPortElement(document);
-  element->setAttribute(idAttr, ShadowElementNames::EditingViewPort());
+  element->setAttribute(kIdAttr, ShadowElementNames::EditingViewPort());
   return element;
 }
 
@@ -224,7 +224,7 @@
   SearchFieldCancelButtonElement* element =
       new SearchFieldCancelButtonElement(document);
   element->SetShadowPseudoId(AtomicString("-webkit-search-cancel-button"));
-  element->setAttribute(idAttr, ShadowElementNames::SearchClearButton());
+  element->setAttribute(kIdAttr, ShadowElementNames::SearchClearButton());
   return element;
 }
 
diff --git a/third_party/blink/renderer/core/html/forms/text_field_input_type.cc b/third_party/blink/renderer/core/html/forms/text_field_input_type.cc
index 5e2265d..6f44808 100644
--- a/third_party/blink/renderer/core/html/forms/text_field_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/text_field_input_type.cc
@@ -56,7 +56,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 class DataListIndicatorElement final : public HTMLDivElement {
  private:
@@ -101,7 +101,7 @@
     DataListIndicatorElement* element = new DataListIndicatorElement(document);
     element->SetShadowPseudoId(
         AtomicString("-webkit-calendar-picker-indicator"));
-    element->setAttribute(idAttr, ShadowElementNames::PickerIndicator());
+    element->setAttribute(kIdAttr, ShadowElementNames::PickerIndicator());
     return element;
   }
 };
@@ -377,11 +377,11 @@
 }
 
 void TextFieldInputType::DisabledAttributeChanged() {
-  DisabledOrReadonlyAttributeChanged(disabledAttr);
+  DisabledOrReadonlyAttributeChanged(kDisabledAttr);
 }
 
 void TextFieldInputType::ReadonlyAttributeChanged() {
-  DisabledOrReadonlyAttributeChanged(readonlyAttr);
+  DisabledOrReadonlyAttributeChanged(kReadonlyAttr);
 }
 
 bool TextFieldInputType::SupportsReadOnly() const {
@@ -482,7 +482,7 @@
         CSSPropertyDisplay,
         GetElement().IsPlaceholderVisible() ? CSSValueBlock : CSSValueNone,
         true);
-    placeholder->setAttribute(idAttr, ShadowElementNames::Placeholder());
+    placeholder->setAttribute(kIdAttr, ShadowElementNames::Placeholder());
     Element* container = ContainerElement();
     Node* previous = container ? container : GetElement().InnerEditorElement();
     previous->parentNode()->InsertBefore(placeholder, previous);
@@ -494,7 +494,7 @@
 void TextFieldInputType::AppendToFormData(FormData& form_data) const {
   InputType::AppendToFormData(form_data);
   const AtomicString& dirname_attr_value =
-      GetElement().FastGetAttribute(dirnameAttr);
+      GetElement().FastGetAttribute(kDirnameAttr);
   if (!dirname_attr_value.IsNull()) {
     form_data.AppendFromElement(dirname_attr_value,
                                 GetElement().DirectionForFormData());
diff --git a/third_party/blink/renderer/core/html/forms/text_input_type.cc b/third_party/blink/renderer/core/html/forms/text_input_type.cc
index 29847ac..a97f32d 100644
--- a/third_party/blink/renderer/core/html/forms/text_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/text_input_type.cc
@@ -36,7 +36,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 InputType* TextInputType::Create(HTMLInputElement& element) {
   return new TextInputType(element);
@@ -44,17 +44,17 @@
 
 void TextInputType::CountUsage() {
   CountUsageIfVisible(WebFeature::kInputTypeText);
-  if (GetElement().FastHasAttribute(maxlengthAttr))
+  if (GetElement().FastHasAttribute(kMaxlengthAttr))
     CountUsageIfVisible(WebFeature::kInputTypeTextMaxLength);
-  const AtomicString& type = GetElement().FastGetAttribute(typeAttr);
-  if (DeprecatedEqualIgnoringCase(type, InputTypeNames::datetime))
+  const AtomicString& type = GetElement().FastGetAttribute(kTypeAttr);
+  if (DeprecatedEqualIgnoringCase(type, input_type_names::kDatetime))
     CountUsageIfVisible(WebFeature::kInputTypeDateTimeFallback);
-  else if (DeprecatedEqualIgnoringCase(type, InputTypeNames::week))
+  else if (DeprecatedEqualIgnoringCase(type, input_type_names::kWeek))
     CountUsageIfVisible(WebFeature::kInputTypeWeekFallback);
 }
 
 const AtomicString& TextInputType::FormControlType() const {
-  return InputTypeNames::text;
+  return input_type_names::kText;
 }
 
 bool TextInputType::SupportsInputModeAttribute() const {
diff --git a/third_party/blink/renderer/core/html/forms/time_input_type.cc b/third_party/blink/renderer/core/html/forms/time_input_type.cc
index a3a7c97..612ad52 100644
--- a/third_party/blink/renderer/core/html/forms/time_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/time_input_type.cc
@@ -46,7 +46,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 static const int kTimeDefaultStep = 60;
 static const int kTimeDefaultStepBase = 0;
@@ -64,7 +64,7 @@
 }
 
 const AtomicString& TimeInputType::FormControlType() const {
-  return InputTypeNames::time;
+  return input_type_names::kTime;
 }
 
 Decimal TimeInputType::DefaultValueForStepUp() const {
@@ -158,10 +158,10 @@
         layout_parameters.locale.ShortTimeFormat();
     layout_parameters.fallback_date_time_format = "HH:mm";
   }
-  if (!ParseToDateComponents(GetElement().FastGetAttribute(minAttr),
+  if (!ParseToDateComponents(GetElement().FastGetAttribute(kMinAttr),
                              &layout_parameters.minimum))
     layout_parameters.minimum = DateComponents();
-  if (!ParseToDateComponents(GetElement().FastGetAttribute(maxAttr),
+  if (!ParseToDateComponents(GetElement().FastGetAttribute(kMaxAttr),
                              &layout_parameters.maximum))
     layout_parameters.maximum = DateComponents();
 }
diff --git a/third_party/blink/renderer/core/html/forms/url_input_type.cc b/third_party/blink/renderer/core/html/forms/url_input_type.cc
index 6cc7a57..d91e9f6 100644
--- a/third_party/blink/renderer/core/html/forms/url_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/url_input_type.cc
@@ -47,7 +47,7 @@
 }
 
 const AtomicString& URLInputType::FormControlType() const {
-  return InputTypeNames::url;
+  return input_type_names::kUrl;
 }
 
 bool URLInputType::TypeMismatchFor(const String& value) const {
diff --git a/third_party/blink/renderer/core/html/forms/week_input_type.cc b/third_party/blink/renderer/core/html/forms/week_input_type.cc
index 1dcd8d01..351e9ad 100644
--- a/third_party/blink/renderer/core/html/forms/week_input_type.cc
+++ b/third_party/blink/renderer/core/html/forms/week_input_type.cc
@@ -41,7 +41,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 static const int kWeekDefaultStepBase =
     -259200000;  // The first day of 1970-W01.
@@ -57,7 +57,7 @@
 }
 
 const AtomicString& WeekInputType::FormControlType() const {
-  return InputTypeNames::week;
+  return input_type_names::kWeek;
 }
 
 StepRange WeekInputType::CreateStepRange(
@@ -109,10 +109,10 @@
     const DateComponents&) const {
   layout_parameters.date_time_format = GetLocale().WeekFormatInLDML();
   layout_parameters.fallback_date_time_format = "yyyy-'W'ww";
-  if (!ParseToDateComponents(GetElement().FastGetAttribute(minAttr),
+  if (!ParseToDateComponents(GetElement().FastGetAttribute(kMinAttr),
                              &layout_parameters.minimum))
     layout_parameters.minimum = DateComponents();
-  if (!ParseToDateComponents(GetElement().FastGetAttribute(maxAttr),
+  if (!ParseToDateComponents(GetElement().FastGetAttribute(kMaxAttr),
                              &layout_parameters.maximum))
     layout_parameters.maximum = DateComponents();
   layout_parameters.placeholder_for_year = "----";
diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third_party/blink/renderer/core/html/html_anchor_element.cc
index 02e4301..30915df5 100644
--- a/third_party/blink/renderer/core/html/html_anchor_element.cc
+++ b/third_party/blink/renderer/core/html/html_anchor_element.cc
@@ -76,7 +76,7 @@
 
 }  // namespace
 
-using namespace HTMLNames;
+using namespace html_names;
 
 HTMLAnchorElement::HTMLAnchorElement(const QualifiedName& tag_name,
                                      Document& document)
@@ -86,7 +86,7 @@
       rel_list_(RelList::Create(this)) {}
 
 HTMLAnchorElement* HTMLAnchorElement::Create(Document& document) {
-  return new HTMLAnchorElement(aTag, document);
+  return new HTMLAnchorElement(kATag, document);
 }
 
 HTMLAnchorElement::~HTMLAnchorElement() = default;
@@ -207,7 +207,7 @@
   HTMLElement::AttributeChanged(params);
   if (params.reason != AttributeModificationReason::kDirectly)
     return;
-  if (params.name != hrefAttr)
+  if (params.name != kHrefAttr)
     return;
   if (!IsLink() && AdjustedFocusedElementInTreeScope() == this)
     blur();
@@ -215,7 +215,7 @@
 
 void HTMLAnchorElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == hrefAttr) {
+  if (params.name == kHrefAttr) {
     bool was_link = IsLink();
     SetIsLink(!params.new_value.IsNull());
     if (was_link || IsLink()) {
@@ -234,9 +234,9 @@
     }
     InvalidateCachedVisitedLinkHash();
     LogUpdateAttributeIfIsolatedWorldAndInDocument("a", params);
-  } else if (params.name == nameAttr || params.name == titleAttr) {
+  } else if (params.name == kNameAttr || params.name == kTitleAttr) {
     // Do nothing.
-  } else if (params.name == relAttr) {
+  } else if (params.name == kRelAttr) {
     SetRel(params.new_value);
     rel_list_->DidUpdateAttributeValue(params.old_value, params.new_value);
   } else {
@@ -250,12 +250,12 @@
 }
 
 bool HTMLAnchorElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName().LocalName() == hrefAttr ||
+  return attribute.GetName().LocalName() == kHrefAttr ||
          HTMLElement::IsURLAttribute(attribute);
 }
 
 bool HTMLAnchorElement::HasLegalLinkAttribute(const QualifiedName& name) const {
-  return name == hrefAttr || HTMLElement::HasLegalLinkAttribute(name);
+  return name == kHrefAttr || HTMLElement::HasLegalLinkAttribute(name);
 }
 
 bool HTMLAnchorElement::CanStartSelection() const {
@@ -266,26 +266,26 @@
 
 bool HTMLAnchorElement::draggable() const {
   // Should be draggable if we have an href attribute.
-  const AtomicString& value = getAttribute(draggableAttr);
+  const AtomicString& value = getAttribute(kDraggableAttr);
   if (DeprecatedEqualIgnoringCase(value, "true"))
     return true;
   if (DeprecatedEqualIgnoringCase(value, "false"))
     return false;
-  return hasAttribute(hrefAttr);
+  return hasAttribute(kHrefAttr);
 }
 
 KURL HTMLAnchorElement::Href() const {
   return GetDocument().CompleteURL(
-      StripLeadingAndTrailingHTMLSpaces(getAttribute(hrefAttr)));
+      StripLeadingAndTrailingHTMLSpaces(getAttribute(kHrefAttr)));
 }
 
 void HTMLAnchorElement::SetHref(const AtomicString& value) {
-  setAttribute(hrefAttr, value);
+  setAttribute(kHrefAttr, value);
 }
 
 void HTMLAnchorElement::setHref(const USVStringOrTrustedURL& stringOrTrustedURL,
                                 ExceptionState& exception_state) {
-  setAttribute(hrefAttr, stringOrTrustedURL, exception_state);
+  setAttribute(kHrefAttr, stringOrTrustedURL, exception_state);
 }
 
 KURL HTMLAnchorElement::Url() const {
@@ -297,7 +297,7 @@
 }
 
 String HTMLAnchorElement::Input() const {
-  return getAttribute(hrefAttr);
+  return getAttribute(kHrefAttr);
 }
 
 void HTMLAnchorElement::SetInput(const String& value) {
@@ -332,7 +332,7 @@
 }
 
 void HTMLAnchorElement::SendPings(const KURL& destination_url) const {
-  const AtomicString& ping_value = getAttribute(pingAttr);
+  const AtomicString& ping_value = getAttribute(kPingAttr);
   if (ping_value.IsNull() || !GetDocument().GetSettings() ||
       !GetDocument().GetSettings()->GetHyperlinkAuditingEnabled()) {
     return;
@@ -375,7 +375,7 @@
   AnchorElementMetrics::MaybeReportClickedMetricsOnClick(this);
 
   StringBuilder url;
-  url.Append(StripLeadingAndTrailingHTMLSpaces(FastGetAttribute(hrefAttr)));
+  url.Append(StripLeadingAndTrailingHTMLSpaces(FastGetAttribute(kHrefAttr)));
   AppendServerMapMousePosition(url, &event);
   KURL completed_url = GetDocument().CompleteURL(url.ToString());
 
@@ -386,9 +386,9 @@
   ResourceRequest request(completed_url);
 
   ReferrerPolicy policy;
-  if (hasAttribute(referrerpolicyAttr) &&
+  if (hasAttribute(kReferrerpolicyAttr) &&
       SecurityPolicy::ReferrerPolicyFromString(
-          FastGetAttribute(referrerpolicyAttr),
+          FastGetAttribute(kReferrerpolicyAttr),
           kSupportReferrerPolicyLegacyKeywords, &policy) &&
       !HasRel(kRelationNoReferrer)) {
     UseCounter::Count(GetDocument(),
@@ -396,7 +396,7 @@
     request.SetReferrerPolicy(policy);
   }
 
-  if (hasAttribute(downloadAttr)) {
+  if (hasAttribute(kDownloadAttr)) {
     if (GetDocument().IsSandboxed(kSandboxDownloads)) {
       // TODO(jochen): Also measure navigations resulting in downloads.
       UseCounter::Count(
@@ -412,7 +412,7 @@
         GetDocument().GetSecurityOrigin()->CanReadContent(completed_url)) {
       RecordDownloadMetrics(frame);
       request.SetSuggestedFilename(
-          static_cast<String>(FastGetAttribute(downloadAttr)));
+          static_cast<String>(FastGetAttribute(kDownloadAttr)));
       request.SetRequestContext(mojom::RequestContextType::DOWNLOAD);
       request.SetRequestorOrigin(SecurityOrigin::Create(GetDocument().Url()));
       frame->Client()->DownloadURL(request,
@@ -422,14 +422,14 @@
   }
   request.SetRequestContext(mojom::RequestContextType::HYPERLINK);
   FrameLoadRequest frame_request(&GetDocument(), request,
-                                 getAttribute(targetAttr));
+                                 getAttribute(kTargetAttr));
   if (HasRel(kRelationNoReferrer)) {
     frame_request.SetShouldSendReferrer(kNeverSendReferrer);
     frame_request.SetShouldSetOpener(kNeverSetOpener);
   }
   if (HasRel(kRelationNoOpener))
     frame_request.SetShouldSetOpener(kNeverSetOpener);
-  frame_request.SetHrefTranslate(FastGetAttribute(hreftranslateAttr));
+  frame_request.SetHrefTranslate(FastGetAttribute(kHreftranslateAttr));
   frame_request.SetTriggeringEventInfo(
       event.isTrusted() ? WebTriggeringEventInfo::kFromTrustedEvent
                         : WebTriggeringEventInfo::kFromUntrustedEvent);
@@ -470,7 +470,7 @@
     ContainerNode& insertion_point) {
   InsertionNotificationRequest request =
       HTMLElement::InsertedInto(insertion_point);
-  LogAddElementIfIsolatedWorldAndInDocument("a", hrefAttr);
+  LogAddElementIfIsolatedWorldAndInDocument("a", kHrefAttr);
 
   Document& top_document = GetDocument().TopDocument();
   if (AnchorElementMetricsSender::HasAnchorElementMetricsSender(top_document))
diff --git a/third_party/blink/renderer/core/html/html_anchor_element.h b/third_party/blink/renderer/core/html/html_anchor_element.h
index 9b771fa..59ff4ce 100644
--- a/third_party/blink/renderer/core/html/html_anchor_element.h
+++ b/third_party/blink/renderer/core/html/html_anchor_element.h
@@ -132,9 +132,10 @@
 };
 
 inline LinkHash HTMLAnchorElement::VisitedLinkHash() const {
-  if (!cached_visited_link_hash_)
+  if (!cached_visited_link_hash_) {
     cached_visited_link_hash_ = blink::VisitedLinkHash(
-        GetDocument().BaseURL(), FastGetAttribute(HTMLNames::hrefAttr));
+        GetDocument().BaseURL(), FastGetAttribute(html_names::kHrefAttr));
+  }
   return cached_visited_link_hash_;
 }
 
diff --git a/third_party/blink/renderer/core/html/html_area_element.cc b/third_party/blink/renderer/core/html/html_area_element.cc
index e7f42538..ccea42f 100644
--- a/third_party/blink/renderer/core/html/html_area_element.cc
+++ b/third_party/blink/renderer/core/html/html_area_element.cc
@@ -42,10 +42,10 @@
 }
 }
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLAreaElement::HTMLAreaElement(Document& document)
-    : HTMLAnchorElement(areaTag, document), shape_(kRect) {}
+    : HTMLAnchorElement(kAreaTag, document), shape_(kRect) {}
 
 // An explicit empty destructor should be in html_area_element.cc, because
 // if an implicit destructor is used or an empty destructor is defined in
@@ -59,7 +59,7 @@
 void HTMLAreaElement::ParseAttribute(
     const AttributeModificationParams& params) {
   const AtomicString& value = params.new_value;
-  if (params.name == shapeAttr) {
+  if (params.name == kShapeAttr) {
     if (EqualIgnoringASCIICase(value, "default")) {
       shape_ = kDefault;
     } else if (EqualIgnoringASCIICase(value, "circle") ||
@@ -74,10 +74,10 @@
       shape_ = kRect;
     }
     InvalidateCachedPath();
-  } else if (params.name == coordsAttr) {
+  } else if (params.name == kCoordsAttr) {
     coords_ = ParseHTMLListOfFloatingPointNumbers(value.GetString());
     InvalidateCachedPath();
-  } else if (params.name == altAttr || params.name == accesskeyAttr) {
+  } else if (params.name == kAltAttr || params.name == kAccesskeyAttr) {
     // Do nothing.
   } else {
     HTMLAnchorElement::ParseAttribute(params);
diff --git a/third_party/blink/renderer/core/html/html_base_element.cc b/third_party/blink/renderer/core/html/html_base_element.cc
index 4553ea5..c72c4f9 100644
--- a/third_party/blink/renderer/core/html/html_base_element.cc
+++ b/third_party/blink/renderer/core/html/html_base_element.cc
@@ -32,10 +32,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLBaseElement::HTMLBaseElement(Document& document)
-    : HTMLElement(baseTag, document) {}
+    : HTMLElement(kBaseTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLBaseElement)
 
@@ -46,7 +46,7 @@
 
 void HTMLBaseElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == hrefAttr || params.name == targetAttr)
+  if (params.name == kHrefAttr || params.name == kTargetAttr)
     GetDocument().ProcessBaseElement();
   else
     HTMLElement::ParseAttribute(params);
@@ -67,7 +67,7 @@
 }
 
 bool HTMLBaseElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName().LocalName() == hrefAttr ||
+  return attribute.GetName().LocalName() == kHrefAttr ||
          HTMLElement::IsURLAttribute(attribute);
 }
 
@@ -82,7 +82,7 @@
   // document's fallback base URL and ignore the base URL.
   // https://html.spec.whatwg.org/multipage/semantics.html#dom-base-href
 
-  const AtomicString& attribute_value = FastGetAttribute(hrefAttr);
+  const AtomicString& attribute_value = FastGetAttribute(kHrefAttr);
   if (attribute_value.IsNull())
     return GetDocument().Url();
 
@@ -101,7 +101,7 @@
 
 void HTMLBaseElement::setHref(const USVStringOrTrustedURL& stringOrUrl,
                               ExceptionState& exception_state) {
-  setAttribute(hrefAttr, stringOrUrl, exception_state);
+  setAttribute(kHrefAttr, stringOrUrl, exception_state);
 }
 
 }  // namespace blink
diff --git a/third_party/blink/renderer/core/html/html_bdi_element.h b/third_party/blink/renderer/core/html/html_bdi_element.h
index a015a8e..2e5a947 100644
--- a/third_party/blink/renderer/core/html/html_bdi_element.h
+++ b/third_party/blink/renderer/core/html/html_bdi_element.h
@@ -31,7 +31,7 @@
 
  private:
   inline explicit HTMLBDIElement(Document& document)
-      : HTMLElement(HTMLNames::bdiTag, document) {}
+      : HTMLElement(html_names::kBdiTag, document) {}
 };
 
 DEFINE_NODE_FACTORY(HTMLBDIElement)
diff --git a/third_party/blink/renderer/core/html/html_body_element.cc b/third_party/blink/renderer/core/html/html_body_element.cc
index 9c8730f..e07a17a6 100644
--- a/third_party/blink/renderer/core/html/html_body_element.cc
+++ b/third_party/blink/renderer/core/html/html_body_element.cc
@@ -40,19 +40,19 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLBodyElement::HTMLBodyElement(Document& document)
-    : HTMLElement(bodyTag, document) {}
+    : HTMLElement(kBodyTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLBodyElement)
 
 HTMLBodyElement::~HTMLBodyElement() = default;
 
 bool HTMLBodyElement::IsPresentationAttribute(const QualifiedName& name) const {
-  if (name == backgroundAttr || name == marginwidthAttr ||
-      name == leftmarginAttr || name == marginheightAttr ||
-      name == topmarginAttr || name == bgcolorAttr || name == textAttr)
+  if (name == kBackgroundAttr || name == kMarginwidthAttr ||
+      name == kLeftmarginAttr || name == kMarginheightAttr ||
+      name == kTopmarginAttr || name == kBgcolorAttr || name == kTextAttr)
     return true;
   return HTMLElement::IsPresentationAttribute(name);
 }
@@ -61,7 +61,7 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == backgroundAttr) {
+  if (name == kBackgroundAttr) {
     String url = StripLeadingAndTrailingHTMLSpaces(value);
     if (!url.IsEmpty()) {
       CSSImageValue* image_value =
@@ -72,15 +72,15 @@
       style->SetProperty(
           CSSPropertyValue(GetCSSPropertyBackgroundImage(), *image_value));
     }
-  } else if (name == marginwidthAttr || name == leftmarginAttr) {
+  } else if (name == kMarginwidthAttr || name == kLeftmarginAttr) {
     AddHTMLLengthToStyle(style, CSSPropertyMarginRight, value);
     AddHTMLLengthToStyle(style, CSSPropertyMarginLeft, value);
-  } else if (name == marginheightAttr || name == topmarginAttr) {
+  } else if (name == kMarginheightAttr || name == kTopmarginAttr) {
     AddHTMLLengthToStyle(style, CSSPropertyMarginBottom, value);
     AddHTMLLengthToStyle(style, CSSPropertyMarginTop, value);
-  } else if (name == bgcolorAttr) {
+  } else if (name == kBgcolorAttr) {
     AddHTMLColorToStyle(style, CSSPropertyBackgroundColor, value);
-  } else if (name == textAttr) {
+  } else if (name == kTextAttr) {
     AddHTMLColorToStyle(style, CSSPropertyColor, value);
   } else {
     HTMLElement::CollectStyleForPresentationAttribute(name, value, style);
@@ -91,11 +91,11 @@
     const AttributeModificationParams& params) {
   const QualifiedName& name = params.name;
   const AtomicString& value = params.new_value;
-  if (name == vlinkAttr || name == alinkAttr || name == linkAttr) {
+  if (name == kVlinkAttr || name == kAlinkAttr || name == kLinkAttr) {
     if (value.IsNull()) {
-      if (name == linkAttr)
+      if (name == kLinkAttr)
         GetDocument().GetTextLinkColors().ResetLinkColor();
-      else if (name == vlinkAttr)
+      else if (name == kVlinkAttr)
         GetDocument().GetTextLinkColors().ResetVisitedLinkColor();
       else
         GetDocument().GetTextLinkColors().ResetActiveLinkColor();
@@ -105,9 +105,9 @@
       if (!HTMLElement::ParseColorWithLegacyRules(string_value, color))
         return;
 
-      if (name == linkAttr)
+      if (name == kLinkAttr)
         GetDocument().GetTextLinkColors().SetLinkColor(color);
-      else if (name == vlinkAttr)
+      else if (name == kVlinkAttr)
         GetDocument().GetTextLinkColors().SetVisitedLinkColor(color);
       else
         GetDocument().GetTextLinkColors().SetActiveLinkColor(color);
@@ -116,98 +116,98 @@
     SetNeedsStyleRecalc(kSubtreeStyleChange,
                         StyleChangeReasonForTracing::Create(
                             style_change_reason::kLinkColorChange));
-  } else if (name == onafterprintAttr) {
+  } else if (name == kOnafterprintAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::afterprint,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onbeforeprintAttr) {
+  } else if (name == kOnbeforeprintAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::beforeprint,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onloadAttr) {
+  } else if (name == kOnloadAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::load,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onbeforeunloadAttr) {
+  } else if (name == kOnbeforeunloadAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::beforeunload,
         CreateAttributeEventListener(
             GetDocument().GetFrame(), name, value,
             JSEventHandler::HandlerType::kOnBeforeUnloadEventHandler));
-  } else if (name == onunloadAttr) {
+  } else if (name == kOnunloadAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::unload,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onpagehideAttr) {
+  } else if (name == kOnpagehideAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::pagehide,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onpageshowAttr) {
+  } else if (name == kOnpageshowAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::pageshow,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onpopstateAttr) {
+  } else if (name == kOnpopstateAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::popstate,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onblurAttr) {
+  } else if (name == kOnblurAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::blur,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onerrorAttr) {
+  } else if (name == kOnerrorAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::error,
         CreateAttributeEventListener(
             GetDocument().GetFrame(), name, value,
             JSEventHandler::HandlerType::kOnErrorEventHandler));
-  } else if (name == onfocusAttr) {
+  } else if (name == kOnfocusAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::focus,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
   } else if (RuntimeEnabledFeatures::OrientationEventEnabled() &&
-             name == onorientationchangeAttr) {
+             name == kOnorientationchangeAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::orientationchange,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onhashchangeAttr) {
+  } else if (name == kOnhashchangeAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::hashchange,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onmessageAttr) {
+  } else if (name == kOnmessageAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::message,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onmessageerrorAttr) {
+  } else if (name == kOnmessageerrorAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::messageerror,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onresizeAttr) {
+  } else if (name == kOnresizeAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::resize,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onscrollAttr) {
+  } else if (name == kOnscrollAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::scroll,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onselectionchangeAttr) {
+  } else if (name == kOnselectionchangeAttr) {
     UseCounter::Count(GetDocument(),
                       WebFeature::kHTMLBodyElementOnSelectionChangeAttribute);
     GetDocument().SetAttributeEventListener(
         EventTypeNames::selectionchange,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onstorageAttr) {
+  } else if (name == kOnstorageAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::storage,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == ononlineAttr) {
+  } else if (name == kOnonlineAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::online,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onofflineAttr) {
+  } else if (name == kOnofflineAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::offline,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onlanguagechangeAttr) {
+  } else if (name == kOnlanguagechangeAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::languagechange,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
@@ -230,23 +230,23 @@
     int margin_width = GetDocument().GetFrame()->Owner()->MarginWidth();
     int margin_height = GetDocument().GetFrame()->Owner()->MarginHeight();
     if (margin_width != -1)
-      SetIntegralAttribute(marginwidthAttr, margin_width);
+      SetIntegralAttribute(kMarginwidthAttr, margin_width);
     if (margin_height != -1)
-      SetIntegralAttribute(marginheightAttr, margin_height);
+      SetIntegralAttribute(kMarginheightAttr, margin_height);
   }
 }
 
 bool HTMLBodyElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName() == backgroundAttr ||
+  return attribute.GetName() == kBackgroundAttr ||
          HTMLElement::IsURLAttribute(attribute);
 }
 
 bool HTMLBodyElement::HasLegalLinkAttribute(const QualifiedName& name) const {
-  return name == backgroundAttr || HTMLElement::HasLegalLinkAttribute(name);
+  return name == kBackgroundAttr || HTMLElement::HasLegalLinkAttribute(name);
 }
 
 const QualifiedName& HTMLBodyElement::SubResourceAttributeName() const {
-  return backgroundAttr;
+  return kBackgroundAttr;
 }
 
 bool HTMLBodyElement::SupportsFocus() const {
diff --git a/third_party/blink/renderer/core/html/html_br_element.cc b/third_party/blink/renderer/core/html/html_br_element.cc
index 0a552d0..3473faf 100644
--- a/third_party/blink/renderer/core/html/html_br_element.cc
+++ b/third_party/blink/renderer/core/html/html_br_element.cc
@@ -29,15 +29,15 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLBRElement::HTMLBRElement(Document& document)
-    : HTMLElement(brTag, document) {}
+    : HTMLElement(kBrTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLBRElement)
 
 bool HTMLBRElement::IsPresentationAttribute(const QualifiedName& name) const {
-  if (name == clearAttr)
+  if (name == kClearAttr)
     return true;
   return HTMLElement::IsPresentationAttribute(name);
 }
@@ -46,7 +46,7 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == clearAttr) {
+  if (name == kClearAttr) {
     // If the string is empty, then don't add the clear property.
     // <br clear> and <br clear=""> are just treated like <br> by Gecko, Mac IE,
     // etc. -dwh
diff --git a/third_party/blink/renderer/core/html/html_collection.cc b/third_party/blink/renderer/core/html/html_collection.cc
index 91f3891..5b1a40e 100644
--- a/third_party/blink/renderer/core/html/html_collection.cc
+++ b/third_party/blink/renderer/core/html/html_collection.cc
@@ -42,7 +42,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 static bool ShouldTypeOnlyIncludeDirectChildren(CollectionType type) {
   switch (type) {
@@ -220,22 +220,22 @@
                                          const HTMLElement& element) {
   switch (html_collection.GetType()) {
     case kDocImages:
-      return element.HasTagName(imgTag);
+      return element.HasTagName(kImgTag);
     case kDocScripts:
-      return element.HasTagName(scriptTag);
+      return element.HasTagName(kScriptTag);
     case kDocForms:
-      return element.HasTagName(formTag);
+      return element.HasTagName(kFormTag);
     case kDocumentNamedItems:
       return ToDocumentNameCollection(html_collection).ElementMatches(element);
     case kDocumentAllNamedItems:
       return ToDocumentAllNameCollection(html_collection)
           .ElementMatches(element);
     case kTableTBodies:
-      return element.HasTagName(tbodyTag);
+      return element.HasTagName(kTbodyTag);
     case kTRCells:
-      return element.HasTagName(tdTag) || element.HasTagName(thTag);
+      return element.HasTagName(kTdTag) || element.HasTagName(kThTag);
     case kTSectionRows:
-      return element.HasTagName(trTag);
+      return element.HasTagName(kTrTag);
     case kSelectOptions:
       return ToHTMLOptionsCollection(html_collection).ElementMatches(element);
     case kSelectedOptions:
@@ -245,17 +245,17 @@
       return ToHTMLDataListOptionsCollection(html_collection)
           .ElementMatches(element);
     case kMapAreas:
-      return element.HasTagName(areaTag);
+      return element.HasTagName(kAreaTag);
     case kDocApplets:
       return IsHTMLObjectElement(element) &&
              ToHTMLObjectElement(element).ContainsJavaApplet();
     case kDocEmbeds:
-      return element.HasTagName(embedTag);
+      return element.HasTagName(kEmbedTag);
     case kDocLinks:
-      return (element.HasTagName(aTag) || element.HasTagName(areaTag)) &&
-             element.FastHasAttribute(hrefAttr);
+      return (element.HasTagName(kATag) || element.HasTagName(kAreaTag)) &&
+             element.FastHasAttribute(kHrefAttr);
     case kDocAnchors:
-      return element.HasTagName(aTag) && element.FastHasAttribute(nameAttr);
+      return element.HasTagName(kATag) && element.FastHasAttribute(kNameAttr);
     case kFormControls:
       DCHECK(IsHTMLFieldSetElement(html_collection.ownerNode()));
       return IsHTMLObjectElement(element) || IsHTMLFormControlElement(element);
@@ -338,13 +338,13 @@
 // although it returns any type of element by id.
 static inline bool NameShouldBeVisibleInDocumentAll(
     const HTMLElement& element) {
-  return element.HasTagName(aTag) || element.HasTagName(buttonTag) ||
-         element.HasTagName(embedTag) || element.HasTagName(formTag) ||
-         element.HasTagName(frameTag) || element.HasTagName(framesetTag) ||
-         element.HasTagName(iframeTag) || element.HasTagName(imgTag) ||
-         element.HasTagName(inputTag) || element.HasTagName(mapTag) ||
-         element.HasTagName(metaTag) || element.HasTagName(objectTag) ||
-         element.HasTagName(selectTag) || element.HasTagName(textareaTag);
+  return element.HasTagName(kATag) || element.HasTagName(kButtonTag) ||
+         element.HasTagName(kEmbedTag) || element.HasTagName(kFormTag) ||
+         element.HasTagName(kFrameTag) || element.HasTagName(kFramesetTag) ||
+         element.HasTagName(kIFrameTag) || element.HasTagName(kImgTag) ||
+         element.HasTagName(kInputTag) || element.HasTagName(kMapTag) ||
+         element.HasTagName(kMetaTag) || element.HasTagName(kObjectTag) ||
+         element.HasTagName(kSelectTag) || element.HasTagName(kTextareaTag);
 }
 
 Element* HTMLCollection::TraverseToFirst() const {
diff --git a/third_party/blink/renderer/core/html/html_collection.h b/third_party/blink/renderer/core/html/html_collection.h
index 986ff15..1932b794 100644
--- a/third_party/blink/renderer/core/html/html_collection.h
+++ b/third_party/blink/renderer/core/html/html_collection.h
@@ -225,7 +225,8 @@
   if (!attr_name ||
       ShouldInvalidateTypeOnAttributeChange(InvalidationType(), *attr_name))
     InvalidateCache();
-  else if (*attr_name == HTMLNames::idAttr || *attr_name == HTMLNames::nameAttr)
+  else if (*attr_name == html_names::kIdAttr ||
+           *attr_name == html_names::kNameAttr)
     InvalidateIdNameCacheMaps();
 }
 
diff --git a/third_party/blink/renderer/core/html/html_content_element.cc b/third_party/blink/renderer/core/html/html_content_element.cc
index 2432601c..0080099 100644
--- a/third_party/blink/renderer/core/html/html_content_element.cc
+++ b/third_party/blink/renderer/core/html/html_content_element.cc
@@ -36,12 +36,12 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 DEFINE_NODE_FACTORY(HTMLContentElement);
 
 inline HTMLContentElement::HTMLContentElement(Document& document)
-    : V0InsertionPoint(contentTag, document),
+    : V0InsertionPoint(kContentTag, document),
       should_parse_select_(false),
       is_valid_selector_(true) {
   UseCounter::Count(document, WebFeature::kHTMLContentElement);
@@ -66,7 +66,7 @@
 
 void HTMLContentElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == selectAttr) {
+  if (params.name == kSelectAttr) {
     if (ShadowRoot* root = ContainingShadowRoot()) {
       if (!root->IsV1())
         root->V0().WillAffectSelector();
diff --git a/third_party/blink/renderer/core/html/html_content_element_test.cc b/third_party/blink/renderer/core/html/html_content_element_test.cc
index 0fbc4ee2..09d8a0c 100644
--- a/third_party/blink/renderer/core/html/html_content_element_test.cc
+++ b/third_party/blink/renderer/core/html/html_content_element_test.cc
@@ -32,8 +32,8 @@
   ShadowRoot& root = host->CreateV0ShadowRootForTesting();
   GetDocument().View()->UpdateAllLifecyclePhases();
 
-  auto* content = GetDocument().CreateRawElement(HTMLNames::contentTag);
-  auto* fallback = GetDocument().CreateRawElement(HTMLNames::spanTag);
+  auto* content = GetDocument().CreateRawElement(html_names::kContentTag);
+  auto* fallback = GetDocument().CreateRawElement(html_names::kSpanTag);
   content->AppendChild(fallback);
   root.AppendChild(content);
 
diff --git a/third_party/blink/renderer/core/html/html_data_element.cc b/third_party/blink/renderer/core/html/html_data_element.cc
index 56732f5..00376b5 100644
--- a/third_party/blink/renderer/core/html/html_data_element.cc
+++ b/third_party/blink/renderer/core/html/html_data_element.cc
@@ -9,7 +9,7 @@
 namespace blink {
 
 HTMLDataElement::HTMLDataElement(Document& document)
-    : HTMLElement(HTMLNames::dataTag, document) {
+    : HTMLElement(html_names::kDataTag, document) {
   UseCounter::Count(document, WebFeature::kDataElement);
 }
 
diff --git a/third_party/blink/renderer/core/html/html_details_element.cc b/third_party/blink/renderer/core/html/html_details_element.cc
index 3873d06..acfdbee 100644
--- a/third_party/blink/renderer/core/html/html_details_element.cc
+++ b/third_party/blink/renderer/core/html/html_details_element.cc
@@ -41,7 +41,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 HTMLDetailsElement* HTMLDetailsElement::Create(Document& document) {
   HTMLDetailsElement* details = new HTMLDetailsElement(document);
@@ -50,7 +50,7 @@
 }
 
 HTMLDetailsElement::HTMLDetailsElement(Document& document)
-    : HTMLElement(detailsTag, document), is_open_(false) {
+    : HTMLElement(kDetailsTag, document), is_open_(false) {
   UseCounter::Count(document, WebFeature::kDetailsElement);
 }
 
@@ -110,7 +110,7 @@
 
 void HTMLDetailsElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == openAttr) {
+  if (params.name == kOpenAttr) {
     bool old_value = is_open_;
     is_open_ = !params.new_value.IsNull();
     if (is_open_ == old_value)
@@ -145,7 +145,7 @@
 }
 
 void HTMLDetailsElement::ToggleOpen() {
-  setAttribute(openAttr, is_open_ ? g_null_atom : g_empty_atom);
+  setAttribute(kOpenAttr, is_open_ ? g_null_atom : g_empty_atom);
 }
 
 bool HTMLDetailsElement::IsInteractiveContent() const {
diff --git a/third_party/blink/renderer/core/html/html_dialog_element.cc b/third_party/blink/renderer/core/html/html_dialog_element.cc
index d1912c66..e871168 100644
--- a/third_party/blink/renderer/core/html/html_dialog_element.cc
+++ b/third_party/blink/renderer/core/html/html_dialog_element.cc
@@ -38,7 +38,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 // This function chooses the focused element when show() or showModal() is
 // invoked, as described in their spec.
@@ -96,7 +96,7 @@
 }
 
 inline HTMLDialogElement::HTMLDialogElement(Document& document)
-    : HTMLElement(dialogTag, document),
+    : HTMLElement(kDialogTag, document),
       centering_mode_(kNotCentered),
       centered_position_(0),
       return_value_("") {
@@ -108,9 +108,9 @@
 void HTMLDialogElement::close(const String& return_value) {
   // https://html.spec.whatwg.org/#close-the-dialog
 
-  if (!FastHasAttribute(openAttr))
+  if (!FastHasAttribute(kOpenAttr))
     return;
-  SetBooleanAttribute(openAttr, false);
+  SetBooleanAttribute(kOpenAttr, false);
 
   HTMLDialogElement* active_modal_dialog = GetDocument().ActiveModalDialog();
   GetDocument().RemoveFromTopLayer(this);
@@ -137,9 +137,9 @@
 }
 
 void HTMLDialogElement::show() {
-  if (FastHasAttribute(openAttr))
+  if (FastHasAttribute(kOpenAttr))
     return;
-  SetBooleanAttribute(openAttr, true);
+  SetBooleanAttribute(kOpenAttr, true);
 
   // The layout must be updated here because setFocusForDialog calls
   // Element::isFocusable, which requires an up-to-date layout.
@@ -149,7 +149,7 @@
 }
 
 void HTMLDialogElement::showModal(ExceptionState& exception_state) {
-  if (FastHasAttribute(openAttr)) {
+  if (FastHasAttribute(kOpenAttr)) {
     exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError,
                                       "The element already has an 'open' "
                                       "attribute, and therefore cannot be "
@@ -169,7 +169,7 @@
   }
 
   GetDocument().AddToTopLayer(this);
-  SetBooleanAttribute(openAttr, true);
+  SetBooleanAttribute(kOpenAttr, true);
 
   ForceLayoutForCentering();
 
@@ -202,7 +202,7 @@
   // FIXME: Workaround for <https://bugs.webkit.org/show_bug.cgi?id=91058>:
   // modifying an attribute for which there is an attribute selector in html.css
   // sometimes does not trigger a style recalc.
-  if (name == openAttr)
+  if (name == kOpenAttr)
     return true;
 
   return HTMLElement::IsPresentationAttribute(name);
diff --git a/third_party/blink/renderer/core/html/html_directory_element.cc b/third_party/blink/renderer/core/html/html_directory_element.cc
index 54f976c2..35f7b1a 100644
--- a/third_party/blink/renderer/core/html/html_directory_element.cc
+++ b/third_party/blink/renderer/core/html/html_directory_element.cc
@@ -26,10 +26,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLDirectoryElement::HTMLDirectoryElement(Document& document)
-    : HTMLElement(dirTag, document) {}
+    : HTMLElement(kDirTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLDirectoryElement)
 
diff --git a/third_party/blink/renderer/core/html/html_div_element.cc b/third_party/blink/renderer/core/html/html_div_element.cc
index ae78e79..1545f09 100644
--- a/third_party/blink/renderer/core/html/html_div_element.cc
+++ b/third_party/blink/renderer/core/html/html_div_element.cc
@@ -28,10 +28,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 HTMLDivElement::HTMLDivElement(Document& document)
-    : HTMLElement(divTag, document) {}
+    : HTMLElement(kDivTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLDivElement)
 
@@ -39,7 +39,7 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == alignAttr) {
+  if (name == kAlignAttr) {
     if (DeprecatedEqualIgnoringCase(value, "middle") ||
         DeprecatedEqualIgnoringCase(value, "center"))
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyTextAlign,
diff --git a/third_party/blink/renderer/core/html/html_dlist_element.cc b/third_party/blink/renderer/core/html/html_dlist_element.cc
index 42ad4663..1dc74690 100644
--- a/third_party/blink/renderer/core/html/html_dlist_element.cc
+++ b/third_party/blink/renderer/core/html/html_dlist_element.cc
@@ -26,10 +26,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLDListElement::HTMLDListElement(Document& document)
-    : HTMLElement(dlTag, document) {}
+    : HTMLElement(kDlTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLDListElement)
 
diff --git a/third_party/blink/renderer/core/html/html_document.cc b/third_party/blink/renderer/core/html/html_document.cc
index ab5c2a6..ff2e39f 100644
--- a/third_party/blink/renderer/core/html/html_document.cc
+++ b/third_party/blink/renderer/core/html/html_document.cc
@@ -61,7 +61,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 HTMLDocument::HTMLDocument(const DocumentInit& initializer,
                            DocumentClassFlags extended_document_classes)
@@ -123,18 +123,18 @@
   HashSet<StringImpl*>* attr_set = new HashSet<StringImpl*>;
 
   const QualifiedName* case_insensitive_attributes[] = {
-      &accept_charsetAttr, &acceptAttr,     &alignAttr,    &alinkAttr,
-      &axisAttr,           &bgcolorAttr,    &charsetAttr,  &checkedAttr,
-      &clearAttr,          &codetypeAttr,   &colorAttr,    &compactAttr,
-      &declareAttr,        &deferAttr,      &dirAttr,      &directionAttr,
-      &disabledAttr,       &enctypeAttr,    &faceAttr,     &frameAttr,
-      &hreflangAttr,       &http_equivAttr, &langAttr,     &languageAttr,
-      &linkAttr,           &mediaAttr,      &methodAttr,   &multipleAttr,
-      &nohrefAttr,         &noresizeAttr,   &noshadeAttr,  &nowrapAttr,
-      &readonlyAttr,       &relAttr,        &revAttr,      &rulesAttr,
-      &scopeAttr,          &scrollingAttr,  &selectedAttr, &shapeAttr,
-      &targetAttr,         &textAttr,       &typeAttr,     &valignAttr,
-      &valuetypeAttr,      &vlinkAttr};
+      &kAcceptCharsetAttr, &kAcceptAttr,    &kAlignAttr,    &kAlinkAttr,
+      &kAxisAttr,          &kBgcolorAttr,   &kCharsetAttr,  &kCheckedAttr,
+      &kClearAttr,         &kCodetypeAttr,  &kColorAttr,    &kCompactAttr,
+      &kDeclareAttr,       &kDeferAttr,     &kDirAttr,      &kDirectionAttr,
+      &kDisabledAttr,      &kEnctypeAttr,   &kFaceAttr,     &kFrameAttr,
+      &kHreflangAttr,      &kHttpEquivAttr, &kLangAttr,     &kLanguageAttr,
+      &kLinkAttr,          &kMediaAttr,     &kMethodAttr,   &kMultipleAttr,
+      &kNohrefAttr,        &kNoresizeAttr,  &kNoshadeAttr,  &kNowrapAttr,
+      &kReadonlyAttr,      &kRelAttr,       &kRevAttr,      &kRulesAttr,
+      &kScopeAttr,         &kScrollingAttr, &kSelectedAttr, &kShapeAttr,
+      &kTargetAttr,        &kTextAttr,      &kTypeAttr,     &kValignAttr,
+      &kValuetypeAttr,     &kVlinkAttr};
 
   attr_set->ReserveCapacityForSize(arraysize(case_insensitive_attributes));
   for (const QualifiedName* attr : case_insensitive_attributes)
diff --git a/third_party/blink/renderer/core/html/html_element.cc b/third_party/blink/renderer/core/html/html_element.cc
index 7c10e84..6c7a492e 100644
--- a/third_party/blink/renderer/core/html/html_element.cc
+++ b/third_party/blink/renderer/core/html/html_element.cc
@@ -76,7 +76,7 @@
 namespace blink {
 
 using namespace cssvalue;
-using namespace HTMLNames;
+using namespace html_names;
 
 using AttributeChangedFunction =
     void (HTMLElement::*)(const Element::AttributeModificationParams& params);
@@ -153,18 +153,19 @@
 
 bool HTMLElement::ShouldSerializeEndTag() const {
   // See https://www.w3.org/TR/DOM-Parsing/
-  if (HasTagName(areaTag) || HasTagName(baseTag) || HasTagName(basefontTag) ||
-      HasTagName(bgsoundTag) || HasTagName(brTag) || HasTagName(colTag) ||
-      HasTagName(embedTag) || HasTagName(frameTag) || HasTagName(hrTag) ||
-      HasTagName(imgTag) || HasTagName(inputTag) || HasTagName(keygenTag) ||
-      HasTagName(linkTag) || HasTagName(metaTag) || HasTagName(paramTag) ||
-      HasTagName(sourceTag) || HasTagName(trackTag) || HasTagName(wbrTag))
+  if (HasTagName(kAreaTag) || HasTagName(kBaseTag) ||
+      HasTagName(kBasefontTag) || HasTagName(kBgsoundTag) ||
+      HasTagName(kBrTag) || HasTagName(kColTag) || HasTagName(kEmbedTag) ||
+      HasTagName(kFrameTag) || HasTagName(kHrTag) || HasTagName(kImgTag) ||
+      HasTagName(kInputTag) || HasTagName(kKeygenTag) || HasTagName(kLinkTag) ||
+      HasTagName(kMetaTag) || HasTagName(kParamTag) || HasTagName(kSourceTag) ||
+      HasTagName(kTrackTag) || HasTagName(kWbrTag))
     return false;
   return true;
 }
 
 static inline CSSValueID UnicodeBidiAttributeForDirAuto(HTMLElement* element) {
-  if (element->HasTagName(preTag) || element->HasTagName(textareaTag))
+  if (element->HasTagName(kPreTag) || element->HasTagName(kTextareaTag))
     return CSSValueWebkitPlaintext;
   // FIXME: For bdo element, dir="auto" should result in "bidi-override isolate"
   // but we don't support having multiple values in unicode-bidi yet.
@@ -176,7 +177,7 @@
     const AtomicString& value) const {
   unsigned border_width = 0;
   if (value.IsEmpty() || !ParseHTMLNonNegativeInteger(value, border_width)) {
-    if (HasTagName(tableTag) && !value.IsNull())
+    if (HasTagName(kTableTag) && !value.IsNull())
       return 1;
   }
   return border_width;
@@ -231,9 +232,10 @@
 }
 
 bool HTMLElement::IsPresentationAttribute(const QualifiedName& name) const {
-  if (name == alignAttr || name == contenteditableAttr || name == hiddenAttr ||
-      name == langAttr || name.Matches(xml_names::kLangAttr) ||
-      name == draggableAttr || name == dirAttr)
+  if (name == kAlignAttr || name == kContenteditableAttr ||
+      name == kHiddenAttr || name == kLangAttr ||
+      name.Matches(xml_names::kLangAttr) || name == kDraggableAttr ||
+      name == kDirAttr)
     return true;
   return Element::IsPresentationAttribute(name);
 }
@@ -248,14 +250,14 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == alignAttr) {
+  if (name == kAlignAttr) {
     if (DeprecatedEqualIgnoringCase(value, "middle"))
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyTextAlign,
                                               CSSValueCenter);
     else
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyTextAlign,
                                               value);
-  } else if (name == contenteditableAttr) {
+  } else if (name == kContenteditableAttr) {
     if (value.IsEmpty() || DeprecatedEqualIgnoringCase(value, "true")) {
       AddPropertyToPresentationAttributeStyle(
           style, CSSPropertyWebkitUserModify, CSSValueReadWrite);
@@ -264,7 +266,7 @@
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyWebkitLineBreak,
                                               CSSValueAfterWhiteSpace);
       UseCounter::Count(GetDocument(), WebFeature::kContentEditableTrue);
-      if (HasTagName(htmlTag)) {
+      if (HasTagName(kHTMLTag)) {
         UseCounter::Count(GetDocument(),
                           WebFeature::kContentEditableTrueOnHTML);
       }
@@ -281,10 +283,10 @@
       AddPropertyToPresentationAttributeStyle(
           style, CSSPropertyWebkitUserModify, CSSValueReadOnly);
     }
-  } else if (name == hiddenAttr) {
+  } else if (name == kHiddenAttr) {
     AddPropertyToPresentationAttributeStyle(style, CSSPropertyDisplay,
                                             CSSValueNone);
-  } else if (name == draggableAttr) {
+  } else if (name == kDraggableAttr) {
     UseCounter::Count(GetDocument(), WebFeature::kDraggableAttribute);
     if (DeprecatedEqualIgnoringCase(value, "true")) {
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyWebkitUserDrag,
@@ -295,7 +297,7 @@
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyWebkitUserDrag,
                                               CSSValueNone);
     }
-  } else if (name == dirAttr) {
+  } else if (name == kDirAttr) {
     if (DeprecatedEqualIgnoringCase(value, "auto")) {
       AddPropertyToPresentationAttributeStyle(
           style, CSSPropertyUnicodeBidi, UnicodeBidiAttributeForDirAuto(this));
@@ -306,13 +308,14 @@
       else if (IsHTMLBodyElement(*this))
         AddPropertyToPresentationAttributeStyle(style, CSSPropertyDirection,
                                                 "ltr");
-      if (!HasTagName(bdiTag) && !HasTagName(bdoTag) && !HasTagName(outputTag))
+      if (!HasTagName(kBdiTag) && !HasTagName(kBdoTag) &&
+          !HasTagName(kOutputTag))
         AddPropertyToPresentationAttributeStyle(style, CSSPropertyUnicodeBidi,
                                                 CSSValueIsolate);
     }
   } else if (name.Matches(xml_names::kLangAttr)) {
     MapLanguageAttributeToLocale(value, style);
-  } else if (name == langAttr) {
+  } else if (name == kLangAttr) {
     // xml:lang has a higher priority than lang.
     if (!FastHasAttribute(xml_names::kLangAttr))
       MapLanguageAttributeToLocale(value, style);
@@ -326,215 +329,215 @@
     const QualifiedName& attr_name) {
   const AtomicString& kNoEvent = g_null_atom;
   static AttributeTriggers attribute_triggers[] = {
-      {dirAttr, kNoWebFeature, kNoEvent, &HTMLElement::OnDirAttrChanged},
-      {inertAttr, WebFeature::kInertAttribute, kNoEvent,
+      {kDirAttr, kNoWebFeature, kNoEvent, &HTMLElement::OnDirAttrChanged},
+      {kInertAttr, WebFeature::kInertAttribute, kNoEvent,
        &HTMLElement::OnInertAttrChanged},
-      {langAttr, kNoWebFeature, kNoEvent, &HTMLElement::OnLangAttrChanged},
-      {nonceAttr, kNoWebFeature, kNoEvent, &HTMLElement::OnNonceAttrChanged},
-      {tabindexAttr, kNoWebFeature, kNoEvent,
+      {kLangAttr, kNoWebFeature, kNoEvent, &HTMLElement::OnLangAttrChanged},
+      {kNonceAttr, kNoWebFeature, kNoEvent, &HTMLElement::OnNonceAttrChanged},
+      {kTabindexAttr, kNoWebFeature, kNoEvent,
        &HTMLElement::OnTabIndexAttrChanged},
       {xml_names::kLangAttr, kNoWebFeature, kNoEvent,
        &HTMLElement::OnXMLLangAttrChanged},
 
-      {onabortAttr, kNoWebFeature, EventTypeNames::abort, nullptr},
-      {onactivateinvisibleAttr, kNoWebFeature,
+      {kOnabortAttr, kNoWebFeature, EventTypeNames::abort, nullptr},
+      {kOnactivateinvisibleAttr, kNoWebFeature,
        EventTypeNames::activateinvisible, nullptr},
-      {onanimationendAttr, kNoWebFeature, EventTypeNames::animationend,
+      {kOnanimationendAttr, kNoWebFeature, EventTypeNames::animationend,
        nullptr},
-      {onanimationiterationAttr, kNoWebFeature,
+      {kOnanimationiterationAttr, kNoWebFeature,
        EventTypeNames::animationiteration, nullptr},
-      {onanimationstartAttr, kNoWebFeature, EventTypeNames::animationstart,
+      {kOnanimationstartAttr, kNoWebFeature, EventTypeNames::animationstart,
        nullptr},
-      {onauxclickAttr, kNoWebFeature, EventTypeNames::auxclick, nullptr},
-      {onbeforecopyAttr, kNoWebFeature, EventTypeNames::beforecopy, nullptr},
-      {onbeforecutAttr, kNoWebFeature, EventTypeNames::beforecut, nullptr},
-      {onbeforepasteAttr, kNoWebFeature, EventTypeNames::beforepaste, nullptr},
-      {onblurAttr, kNoWebFeature, EventTypeNames::blur, nullptr},
-      {oncancelAttr, kNoWebFeature, EventTypeNames::cancel, nullptr},
-      {oncanplayAttr, kNoWebFeature, EventTypeNames::canplay, nullptr},
-      {oncanplaythroughAttr, kNoWebFeature, EventTypeNames::canplaythrough,
+      {kOnauxclickAttr, kNoWebFeature, EventTypeNames::auxclick, nullptr},
+      {kOnbeforecopyAttr, kNoWebFeature, EventTypeNames::beforecopy, nullptr},
+      {kOnbeforecutAttr, kNoWebFeature, EventTypeNames::beforecut, nullptr},
+      {kOnbeforepasteAttr, kNoWebFeature, EventTypeNames::beforepaste, nullptr},
+      {kOnblurAttr, kNoWebFeature, EventTypeNames::blur, nullptr},
+      {kOncancelAttr, kNoWebFeature, EventTypeNames::cancel, nullptr},
+      {kOncanplayAttr, kNoWebFeature, EventTypeNames::canplay, nullptr},
+      {kOncanplaythroughAttr, kNoWebFeature, EventTypeNames::canplaythrough,
        nullptr},
-      {onchangeAttr, kNoWebFeature, EventTypeNames::change, nullptr},
-      {onclickAttr, kNoWebFeature, EventTypeNames::click, nullptr},
-      {oncloseAttr, kNoWebFeature, EventTypeNames::close, nullptr},
-      {oncontextmenuAttr, kNoWebFeature, EventTypeNames::contextmenu, nullptr},
-      {oncopyAttr, kNoWebFeature, EventTypeNames::copy, nullptr},
-      {oncuechangeAttr, kNoWebFeature, EventTypeNames::cuechange, nullptr},
-      {oncutAttr, kNoWebFeature, EventTypeNames::cut, nullptr},
-      {ondblclickAttr, kNoWebFeature, EventTypeNames::dblclick, nullptr},
-      {ondragAttr, kNoWebFeature, EventTypeNames::drag, nullptr},
-      {ondragendAttr, kNoWebFeature, EventTypeNames::dragend, nullptr},
-      {ondragenterAttr, kNoWebFeature, EventTypeNames::dragenter, nullptr},
-      {ondragleaveAttr, kNoWebFeature, EventTypeNames::dragleave, nullptr},
-      {ondragoverAttr, kNoWebFeature, EventTypeNames::dragover, nullptr},
-      {ondragstartAttr, kNoWebFeature, EventTypeNames::dragstart, nullptr},
-      {ondropAttr, kNoWebFeature, EventTypeNames::drop, nullptr},
-      {ondurationchangeAttr, kNoWebFeature, EventTypeNames::durationchange,
+      {kOnchangeAttr, kNoWebFeature, EventTypeNames::change, nullptr},
+      {kOnclickAttr, kNoWebFeature, EventTypeNames::click, nullptr},
+      {kOncloseAttr, kNoWebFeature, EventTypeNames::close, nullptr},
+      {kOncontextmenuAttr, kNoWebFeature, EventTypeNames::contextmenu, nullptr},
+      {kOncopyAttr, kNoWebFeature, EventTypeNames::copy, nullptr},
+      {kOncuechangeAttr, kNoWebFeature, EventTypeNames::cuechange, nullptr},
+      {kOncutAttr, kNoWebFeature, EventTypeNames::cut, nullptr},
+      {kOndblclickAttr, kNoWebFeature, EventTypeNames::dblclick, nullptr},
+      {kOndragAttr, kNoWebFeature, EventTypeNames::drag, nullptr},
+      {kOndragendAttr, kNoWebFeature, EventTypeNames::dragend, nullptr},
+      {kOndragenterAttr, kNoWebFeature, EventTypeNames::dragenter, nullptr},
+      {kOndragleaveAttr, kNoWebFeature, EventTypeNames::dragleave, nullptr},
+      {kOndragoverAttr, kNoWebFeature, EventTypeNames::dragover, nullptr},
+      {kOndragstartAttr, kNoWebFeature, EventTypeNames::dragstart, nullptr},
+      {kOndropAttr, kNoWebFeature, EventTypeNames::drop, nullptr},
+      {kOndurationchangeAttr, kNoWebFeature, EventTypeNames::durationchange,
        nullptr},
-      {onemptiedAttr, kNoWebFeature, EventTypeNames::emptied, nullptr},
-      {onendedAttr, kNoWebFeature, EventTypeNames::ended, nullptr},
-      {onerrorAttr, kNoWebFeature, EventTypeNames::error, nullptr},
-      {onfocusAttr, kNoWebFeature, EventTypeNames::focus, nullptr},
-      {onfocusinAttr, kNoWebFeature, EventTypeNames::focusin, nullptr},
-      {onfocusoutAttr, kNoWebFeature, EventTypeNames::focusout, nullptr},
-      {onformdataAttr, kNoWebFeature, EventTypeNames::formdata, nullptr},
-      {ongotpointercaptureAttr, kNoWebFeature,
+      {kOnemptiedAttr, kNoWebFeature, EventTypeNames::emptied, nullptr},
+      {kOnendedAttr, kNoWebFeature, EventTypeNames::ended, nullptr},
+      {kOnerrorAttr, kNoWebFeature, EventTypeNames::error, nullptr},
+      {kOnfocusAttr, kNoWebFeature, EventTypeNames::focus, nullptr},
+      {kOnfocusinAttr, kNoWebFeature, EventTypeNames::focusin, nullptr},
+      {kOnfocusoutAttr, kNoWebFeature, EventTypeNames::focusout, nullptr},
+      {kOnformdataAttr, kNoWebFeature, EventTypeNames::formdata, nullptr},
+      {kOngotpointercaptureAttr, kNoWebFeature,
        EventTypeNames::gotpointercapture, nullptr},
-      {oninputAttr, kNoWebFeature, EventTypeNames::input, nullptr},
-      {oninvalidAttr, kNoWebFeature, EventTypeNames::invalid, nullptr},
-      {onkeydownAttr, kNoWebFeature, EventTypeNames::keydown, nullptr},
-      {onkeypressAttr, kNoWebFeature, EventTypeNames::keypress, nullptr},
-      {onkeyupAttr, kNoWebFeature, EventTypeNames::keyup, nullptr},
-      {onloadAttr, kNoWebFeature, EventTypeNames::load, nullptr},
-      {onloadeddataAttr, kNoWebFeature, EventTypeNames::loadeddata, nullptr},
-      {onloadedmetadataAttr, kNoWebFeature, EventTypeNames::loadedmetadata,
+      {kOninputAttr, kNoWebFeature, EventTypeNames::input, nullptr},
+      {kOninvalidAttr, kNoWebFeature, EventTypeNames::invalid, nullptr},
+      {kOnkeydownAttr, kNoWebFeature, EventTypeNames::keydown, nullptr},
+      {kOnkeypressAttr, kNoWebFeature, EventTypeNames::keypress, nullptr},
+      {kOnkeyupAttr, kNoWebFeature, EventTypeNames::keyup, nullptr},
+      {kOnloadAttr, kNoWebFeature, EventTypeNames::load, nullptr},
+      {kOnloadeddataAttr, kNoWebFeature, EventTypeNames::loadeddata, nullptr},
+      {kOnloadedmetadataAttr, kNoWebFeature, EventTypeNames::loadedmetadata,
        nullptr},
-      {onloadstartAttr, kNoWebFeature, EventTypeNames::loadstart, nullptr},
-      {onlostpointercaptureAttr, kNoWebFeature,
+      {kOnloadstartAttr, kNoWebFeature, EventTypeNames::loadstart, nullptr},
+      {kOnlostpointercaptureAttr, kNoWebFeature,
        EventTypeNames::lostpointercapture, nullptr},
-      {onmousedownAttr, kNoWebFeature, EventTypeNames::mousedown, nullptr},
-      {onmouseenterAttr, kNoWebFeature, EventTypeNames::mouseenter, nullptr},
-      {onmouseleaveAttr, kNoWebFeature, EventTypeNames::mouseleave, nullptr},
-      {onmousemoveAttr, kNoWebFeature, EventTypeNames::mousemove, nullptr},
-      {onmouseoutAttr, kNoWebFeature, EventTypeNames::mouseout, nullptr},
-      {onmouseoverAttr, kNoWebFeature, EventTypeNames::mouseover, nullptr},
-      {onmouseupAttr, kNoWebFeature, EventTypeNames::mouseup, nullptr},
-      {onmousewheelAttr, kNoWebFeature, EventTypeNames::mousewheel, nullptr},
-      {onpasteAttr, kNoWebFeature, EventTypeNames::paste, nullptr},
-      {onpauseAttr, kNoWebFeature, EventTypeNames::pause, nullptr},
-      {onplayAttr, kNoWebFeature, EventTypeNames::play, nullptr},
-      {onplayingAttr, kNoWebFeature, EventTypeNames::playing, nullptr},
-      {onpointercancelAttr, kNoWebFeature, EventTypeNames::pointercancel,
+      {kOnmousedownAttr, kNoWebFeature, EventTypeNames::mousedown, nullptr},
+      {kOnmouseenterAttr, kNoWebFeature, EventTypeNames::mouseenter, nullptr},
+      {kOnmouseleaveAttr, kNoWebFeature, EventTypeNames::mouseleave, nullptr},
+      {kOnmousemoveAttr, kNoWebFeature, EventTypeNames::mousemove, nullptr},
+      {kOnmouseoutAttr, kNoWebFeature, EventTypeNames::mouseout, nullptr},
+      {kOnmouseoverAttr, kNoWebFeature, EventTypeNames::mouseover, nullptr},
+      {kOnmouseupAttr, kNoWebFeature, EventTypeNames::mouseup, nullptr},
+      {kOnmousewheelAttr, kNoWebFeature, EventTypeNames::mousewheel, nullptr},
+      {kOnpasteAttr, kNoWebFeature, EventTypeNames::paste, nullptr},
+      {kOnpauseAttr, kNoWebFeature, EventTypeNames::pause, nullptr},
+      {kOnplayAttr, kNoWebFeature, EventTypeNames::play, nullptr},
+      {kOnplayingAttr, kNoWebFeature, EventTypeNames::playing, nullptr},
+      {kOnpointercancelAttr, kNoWebFeature, EventTypeNames::pointercancel,
        nullptr},
-      {onpointerdownAttr, kNoWebFeature, EventTypeNames::pointerdown, nullptr},
-      {onpointerenterAttr, kNoWebFeature, EventTypeNames::pointerenter,
+      {kOnpointerdownAttr, kNoWebFeature, EventTypeNames::pointerdown, nullptr},
+      {kOnpointerenterAttr, kNoWebFeature, EventTypeNames::pointerenter,
        nullptr},
-      {onpointerleaveAttr, kNoWebFeature, EventTypeNames::pointerleave,
+      {kOnpointerleaveAttr, kNoWebFeature, EventTypeNames::pointerleave,
        nullptr},
-      {onpointermoveAttr, kNoWebFeature, EventTypeNames::pointermove, nullptr},
-      {onpointeroutAttr, kNoWebFeature, EventTypeNames::pointerout, nullptr},
-      {onpointeroverAttr, kNoWebFeature, EventTypeNames::pointerover, nullptr},
-      {onpointerrawmoveAttr, kNoWebFeature, EventTypeNames::pointerrawmove,
+      {kOnpointermoveAttr, kNoWebFeature, EventTypeNames::pointermove, nullptr},
+      {kOnpointeroutAttr, kNoWebFeature, EventTypeNames::pointerout, nullptr},
+      {kOnpointeroverAttr, kNoWebFeature, EventTypeNames::pointerover, nullptr},
+      {kOnpointerrawmoveAttr, kNoWebFeature, EventTypeNames::pointerrawmove,
        nullptr},
-      {onpointerupAttr, kNoWebFeature, EventTypeNames::pointerup, nullptr},
-      {onprogressAttr, kNoWebFeature, EventTypeNames::progress, nullptr},
-      {onratechangeAttr, kNoWebFeature, EventTypeNames::ratechange, nullptr},
-      {onresetAttr, kNoWebFeature, EventTypeNames::reset, nullptr},
-      {onresizeAttr, kNoWebFeature, EventTypeNames::resize, nullptr},
-      {onscrollAttr, kNoWebFeature, EventTypeNames::scroll, nullptr},
-      {onseekedAttr, kNoWebFeature, EventTypeNames::seeked, nullptr},
-      {onseekingAttr, kNoWebFeature, EventTypeNames::seeking, nullptr},
-      {onselectAttr, kNoWebFeature, EventTypeNames::select, nullptr},
-      {onselectstartAttr, kNoWebFeature, EventTypeNames::selectstart, nullptr},
-      {onstalledAttr, kNoWebFeature, EventTypeNames::stalled, nullptr},
-      {onsubmitAttr, kNoWebFeature, EventTypeNames::submit, nullptr},
-      {onsuspendAttr, kNoWebFeature, EventTypeNames::suspend, nullptr},
-      {ontimeupdateAttr, kNoWebFeature, EventTypeNames::timeupdate, nullptr},
-      {ontoggleAttr, kNoWebFeature, EventTypeNames::toggle, nullptr},
-      {ontouchcancelAttr, kNoWebFeature, EventTypeNames::touchcancel, nullptr},
-      {ontouchendAttr, kNoWebFeature, EventTypeNames::touchend, nullptr},
-      {ontouchmoveAttr, kNoWebFeature, EventTypeNames::touchmove, nullptr},
-      {ontouchstartAttr, kNoWebFeature, EventTypeNames::touchstart, nullptr},
-      {ontransitionendAttr, kNoWebFeature, EventTypeNames::webkitTransitionEnd,
+      {kOnpointerupAttr, kNoWebFeature, EventTypeNames::pointerup, nullptr},
+      {kOnprogressAttr, kNoWebFeature, EventTypeNames::progress, nullptr},
+      {kOnratechangeAttr, kNoWebFeature, EventTypeNames::ratechange, nullptr},
+      {kOnresetAttr, kNoWebFeature, EventTypeNames::reset, nullptr},
+      {kOnresizeAttr, kNoWebFeature, EventTypeNames::resize, nullptr},
+      {kOnscrollAttr, kNoWebFeature, EventTypeNames::scroll, nullptr},
+      {kOnseekedAttr, kNoWebFeature, EventTypeNames::seeked, nullptr},
+      {kOnseekingAttr, kNoWebFeature, EventTypeNames::seeking, nullptr},
+      {kOnselectAttr, kNoWebFeature, EventTypeNames::select, nullptr},
+      {kOnselectstartAttr, kNoWebFeature, EventTypeNames::selectstart, nullptr},
+      {kOnstalledAttr, kNoWebFeature, EventTypeNames::stalled, nullptr},
+      {kOnsubmitAttr, kNoWebFeature, EventTypeNames::submit, nullptr},
+      {kOnsuspendAttr, kNoWebFeature, EventTypeNames::suspend, nullptr},
+      {kOntimeupdateAttr, kNoWebFeature, EventTypeNames::timeupdate, nullptr},
+      {kOntoggleAttr, kNoWebFeature, EventTypeNames::toggle, nullptr},
+      {kOntouchcancelAttr, kNoWebFeature, EventTypeNames::touchcancel, nullptr},
+      {kOntouchendAttr, kNoWebFeature, EventTypeNames::touchend, nullptr},
+      {kOntouchmoveAttr, kNoWebFeature, EventTypeNames::touchmove, nullptr},
+      {kOntouchstartAttr, kNoWebFeature, EventTypeNames::touchstart, nullptr},
+      {kOntransitionendAttr, kNoWebFeature, EventTypeNames::webkitTransitionEnd,
        nullptr},
-      {onvolumechangeAttr, kNoWebFeature, EventTypeNames::volumechange,
+      {kOnvolumechangeAttr, kNoWebFeature, EventTypeNames::volumechange,
        nullptr},
-      {onwaitingAttr, kNoWebFeature, EventTypeNames::waiting, nullptr},
-      {onwebkitanimationendAttr, kNoWebFeature,
+      {kOnwaitingAttr, kNoWebFeature, EventTypeNames::waiting, nullptr},
+      {kOnwebkitanimationendAttr, kNoWebFeature,
        EventTypeNames::webkitAnimationEnd, nullptr},
-      {onwebkitanimationiterationAttr, kNoWebFeature,
+      {kOnwebkitanimationiterationAttr, kNoWebFeature,
        EventTypeNames::webkitAnimationIteration, nullptr},
-      {onwebkitanimationstartAttr, kNoWebFeature,
+      {kOnwebkitanimationstartAttr, kNoWebFeature,
        EventTypeNames::webkitAnimationStart, nullptr},
-      {onwebkitfullscreenchangeAttr, kNoWebFeature,
+      {kOnwebkitfullscreenchangeAttr, kNoWebFeature,
        EventTypeNames::webkitfullscreenchange, nullptr},
-      {onwebkitfullscreenerrorAttr, kNoWebFeature,
+      {kOnwebkitfullscreenerrorAttr, kNoWebFeature,
        EventTypeNames::webkitfullscreenerror, nullptr},
-      {onwebkittransitionendAttr, kNoWebFeature,
+      {kOnwebkittransitionendAttr, kNoWebFeature,
        EventTypeNames::webkitTransitionEnd, nullptr},
-      {onwheelAttr, kNoWebFeature, EventTypeNames::wheel, nullptr},
+      {kOnwheelAttr, kNoWebFeature, EventTypeNames::wheel, nullptr},
 
-      {aria_activedescendantAttr, WebFeature::kARIAActiveDescendantAttribute,
+      {kAriaActivedescendantAttr, WebFeature::kARIAActiveDescendantAttribute,
        kNoEvent, nullptr},
-      {aria_atomicAttr, WebFeature::kARIAAtomicAttribute, kNoEvent, nullptr},
-      {aria_autocompleteAttr, WebFeature::kARIAAutocompleteAttribute, kNoEvent,
+      {kAriaAtomicAttr, WebFeature::kARIAAtomicAttribute, kNoEvent, nullptr},
+      {kAriaAutocompleteAttr, WebFeature::kARIAAutocompleteAttribute, kNoEvent,
        nullptr},
-      {aria_busyAttr, WebFeature::kARIABusyAttribute, kNoEvent, nullptr},
-      {aria_checkedAttr, WebFeature::kARIACheckedAttribute, kNoEvent, nullptr},
-      {aria_colcountAttr, WebFeature::kARIAColCountAttribute, kNoEvent,
+      {kAriaBusyAttr, WebFeature::kARIABusyAttribute, kNoEvent, nullptr},
+      {kAriaCheckedAttr, WebFeature::kARIACheckedAttribute, kNoEvent, nullptr},
+      {kAriaColcountAttr, WebFeature::kARIAColCountAttribute, kNoEvent,
        nullptr},
-      {aria_colindexAttr, WebFeature::kARIAColIndexAttribute, kNoEvent,
+      {kAriaColindexAttr, WebFeature::kARIAColIndexAttribute, kNoEvent,
        nullptr},
-      {aria_colspanAttr, WebFeature::kARIAColSpanAttribute, kNoEvent, nullptr},
-      {aria_controlsAttr, WebFeature::kARIAControlsAttribute, kNoEvent,
+      {kAriaColspanAttr, WebFeature::kARIAColSpanAttribute, kNoEvent, nullptr},
+      {kAriaControlsAttr, WebFeature::kARIAControlsAttribute, kNoEvent,
        nullptr},
-      {aria_currentAttr, WebFeature::kARIACurrentAttribute, kNoEvent, nullptr},
-      {aria_describedbyAttr, WebFeature::kARIADescribedByAttribute, kNoEvent,
+      {kAriaCurrentAttr, WebFeature::kARIACurrentAttribute, kNoEvent, nullptr},
+      {kAriaDescribedbyAttr, WebFeature::kARIADescribedByAttribute, kNoEvent,
        nullptr},
-      {aria_detailsAttr, WebFeature::kARIADetailsAttribute, kNoEvent, nullptr},
-      {aria_disabledAttr, WebFeature::kARIADisabledAttribute, kNoEvent,
+      {kAriaDetailsAttr, WebFeature::kARIADetailsAttribute, kNoEvent, nullptr},
+      {kAriaDisabledAttr, WebFeature::kARIADisabledAttribute, kNoEvent,
        nullptr},
-      {aria_dropeffectAttr, WebFeature::kARIADropEffectAttribute, kNoEvent,
+      {kAriaDropeffectAttr, WebFeature::kARIADropEffectAttribute, kNoEvent,
        nullptr},
-      {aria_errormessageAttr, WebFeature::kARIAErrorMessageAttribute, kNoEvent,
+      {kAriaErrormessageAttr, WebFeature::kARIAErrorMessageAttribute, kNoEvent,
        nullptr},
-      {aria_expandedAttr, WebFeature::kARIAExpandedAttribute, kNoEvent,
+      {kAriaExpandedAttr, WebFeature::kARIAExpandedAttribute, kNoEvent,
        nullptr},
-      {aria_flowtoAttr, WebFeature::kARIAFlowToAttribute, kNoEvent, nullptr},
-      {aria_grabbedAttr, WebFeature::kARIAGrabbedAttribute, kNoEvent, nullptr},
-      {aria_haspopupAttr, WebFeature::kARIAHasPopupAttribute, kNoEvent,
+      {kAriaFlowtoAttr, WebFeature::kARIAFlowToAttribute, kNoEvent, nullptr},
+      {kAriaGrabbedAttr, WebFeature::kARIAGrabbedAttribute, kNoEvent, nullptr},
+      {kAriaHaspopupAttr, WebFeature::kARIAHasPopupAttribute, kNoEvent,
        nullptr},
-      {aria_helpAttr, WebFeature::kARIAHelpAttribute, kNoEvent, nullptr},
-      {aria_hiddenAttr, WebFeature::kARIAHiddenAttribute, kNoEvent, nullptr},
-      {aria_invalidAttr, WebFeature::kARIAInvalidAttribute, kNoEvent, nullptr},
-      {aria_keyshortcutsAttr, WebFeature::kARIAKeyShortcutsAttribute, kNoEvent,
+      {kAriaHelpAttr, WebFeature::kARIAHelpAttribute, kNoEvent, nullptr},
+      {kAriaHiddenAttr, WebFeature::kARIAHiddenAttribute, kNoEvent, nullptr},
+      {kAriaInvalidAttr, WebFeature::kARIAInvalidAttribute, kNoEvent, nullptr},
+      {kAriaKeyshortcutsAttr, WebFeature::kARIAKeyShortcutsAttribute, kNoEvent,
        nullptr},
-      {aria_labelAttr, WebFeature::kARIALabelAttribute, kNoEvent, nullptr},
-      {aria_labeledbyAttr, WebFeature::kARIALabeledByAttribute, kNoEvent,
+      {kAriaLabelAttr, WebFeature::kARIALabelAttribute, kNoEvent, nullptr},
+      {kAriaLabeledbyAttr, WebFeature::kARIALabeledByAttribute, kNoEvent,
        nullptr},
-      {aria_labelledbyAttr, WebFeature::kARIALabelledByAttribute, kNoEvent,
+      {kAriaLabelledbyAttr, WebFeature::kARIALabelledByAttribute, kNoEvent,
        nullptr},
-      {aria_levelAttr, WebFeature::kARIALevelAttribute, kNoEvent, nullptr},
-      {aria_liveAttr, WebFeature::kARIALiveAttribute, kNoEvent, nullptr},
-      {aria_modalAttr, WebFeature::kARIAModalAttribute, kNoEvent, nullptr},
-      {aria_multilineAttr, WebFeature::kARIAMultilineAttribute, kNoEvent,
+      {kAriaLevelAttr, WebFeature::kARIALevelAttribute, kNoEvent, nullptr},
+      {kAriaLiveAttr, WebFeature::kARIALiveAttribute, kNoEvent, nullptr},
+      {kAriaModalAttr, WebFeature::kARIAModalAttribute, kNoEvent, nullptr},
+      {kAriaMultilineAttr, WebFeature::kARIAMultilineAttribute, kNoEvent,
        nullptr},
-      {aria_multiselectableAttr, WebFeature::kARIAMultiselectableAttribute,
+      {kAriaMultiselectableAttr, WebFeature::kARIAMultiselectableAttribute,
        kNoEvent, nullptr},
-      {aria_orientationAttr, WebFeature::kARIAOrientationAttribute, kNoEvent,
+      {kAriaOrientationAttr, WebFeature::kARIAOrientationAttribute, kNoEvent,
        nullptr},
-      {aria_ownsAttr, WebFeature::kARIAOwnsAttribute, kNoEvent, nullptr},
-      {aria_placeholderAttr, WebFeature::kARIAPlaceholderAttribute, kNoEvent,
+      {kAriaOwnsAttr, WebFeature::kARIAOwnsAttribute, kNoEvent, nullptr},
+      {kAriaPlaceholderAttr, WebFeature::kARIAPlaceholderAttribute, kNoEvent,
        nullptr},
-      {aria_posinsetAttr, WebFeature::kARIAPosInSetAttribute, kNoEvent,
+      {kAriaPosinsetAttr, WebFeature::kARIAPosInSetAttribute, kNoEvent,
        nullptr},
-      {aria_pressedAttr, WebFeature::kARIAPressedAttribute, kNoEvent, nullptr},
-      {aria_readonlyAttr, WebFeature::kARIAReadOnlyAttribute, kNoEvent,
+      {kAriaPressedAttr, WebFeature::kARIAPressedAttribute, kNoEvent, nullptr},
+      {kAriaReadonlyAttr, WebFeature::kARIAReadOnlyAttribute, kNoEvent,
        nullptr},
-      {aria_relevantAttr, WebFeature::kARIARelevantAttribute, kNoEvent,
+      {kAriaRelevantAttr, WebFeature::kARIARelevantAttribute, kNoEvent,
        nullptr},
-      {aria_requiredAttr, WebFeature::kARIARequiredAttribute, kNoEvent,
+      {kAriaRequiredAttr, WebFeature::kARIARequiredAttribute, kNoEvent,
        nullptr},
-      {aria_roledescriptionAttr, WebFeature::kARIARoleDescriptionAttribute,
+      {kAriaRoledescriptionAttr, WebFeature::kARIARoleDescriptionAttribute,
        kNoEvent, nullptr},
-      {aria_rowcountAttr, WebFeature::kARIARowCountAttribute, kNoEvent,
+      {kAriaRowcountAttr, WebFeature::kARIARowCountAttribute, kNoEvent,
        nullptr},
-      {aria_rowindexAttr, WebFeature::kARIARowIndexAttribute, kNoEvent,
+      {kAriaRowindexAttr, WebFeature::kARIARowIndexAttribute, kNoEvent,
        nullptr},
-      {aria_rowspanAttr, WebFeature::kARIARowSpanAttribute, kNoEvent, nullptr},
-      {aria_selectedAttr, WebFeature::kARIASelectedAttribute, kNoEvent,
+      {kAriaRowspanAttr, WebFeature::kARIARowSpanAttribute, kNoEvent, nullptr},
+      {kAriaSelectedAttr, WebFeature::kARIASelectedAttribute, kNoEvent,
        nullptr},
-      {aria_setsizeAttr, WebFeature::kARIASetSizeAttribute, kNoEvent, nullptr},
-      {aria_sortAttr, WebFeature::kARIASortAttribute, kNoEvent, nullptr},
-      {aria_valuemaxAttr, WebFeature::kARIAValueMaxAttribute, kNoEvent,
+      {kAriaSetsizeAttr, WebFeature::kARIASetSizeAttribute, kNoEvent, nullptr},
+      {kAriaSortAttr, WebFeature::kARIASortAttribute, kNoEvent, nullptr},
+      {kAriaValuemaxAttr, WebFeature::kARIAValueMaxAttribute, kNoEvent,
        nullptr},
-      {aria_valueminAttr, WebFeature::kARIAValueMinAttribute, kNoEvent,
+      {kAriaValueminAttr, WebFeature::kARIAValueMinAttribute, kNoEvent,
        nullptr},
-      {aria_valuenowAttr, WebFeature::kARIAValueNowAttribute, kNoEvent,
+      {kAriaValuenowAttr, WebFeature::kARIAValueNowAttribute, kNoEvent,
        nullptr},
-      {aria_valuetextAttr, WebFeature::kARIAValueTextAttribute, kNoEvent,
+      {kAriaValuetextAttr, WebFeature::kARIAValueTextAttribute, kNoEvent,
        nullptr},
-      {autocapitalizeAttr, WebFeature::kAutocapitalizeAttribute, kNoEvent,
+      {kAutocapitalizeAttr, WebFeature::kAutocapitalizeAttribute, kNoEvent,
        nullptr},
   };
 
@@ -567,10 +570,10 @@
     return;
   // adjustedFocusedElementInTreeScope() is not trivial. We should check
   // attribute names, then call adjustedFocusedElementInTreeScope().
-  if (params.name == hiddenAttr && !params.new_value.IsNull()) {
+  if (params.name == kHiddenAttr && !params.new_value.IsNull()) {
     if (AdjustedFocusedElementInTreeScope() == this)
       blur();
-  } else if (params.name == contenteditableAttr) {
+  } else if (params.name == kContenteditableAttr) {
     if (GetDocument().GetFrame()) {
       GetDocument()
           .GetFrame()
@@ -754,7 +757,7 @@
 }
 
 String HTMLElement::contentEditable() const {
-  const AtomicString& value = FastGetAttribute(contenteditableAttr);
+  const AtomicString& value = FastGetAttribute(kContenteditableAttr);
 
   if (value.IsNull())
     return "inherit";
@@ -771,13 +774,13 @@
 void HTMLElement::setContentEditable(const String& enabled,
                                      ExceptionState& exception_state) {
   if (DeprecatedEqualIgnoringCase(enabled, "true"))
-    setAttribute(contenteditableAttr, "true");
+    setAttribute(kContenteditableAttr, "true");
   else if (DeprecatedEqualIgnoringCase(enabled, "false"))
-    setAttribute(contenteditableAttr, "false");
+    setAttribute(kContenteditableAttr, "false");
   else if (DeprecatedEqualIgnoringCase(enabled, "plaintext-only"))
-    setAttribute(contenteditableAttr, "plaintext-only");
+    setAttribute(kContenteditableAttr, "plaintext-only");
   else if (DeprecatedEqualIgnoringCase(enabled, "inherit"))
-    removeAttribute(contenteditableAttr);
+    removeAttribute(kContenteditableAttr);
   else
     exception_state.ThrowDOMException(DOMExceptionCode::kSyntaxError,
                                       "The value provided ('" + enabled +
@@ -792,7 +795,7 @@
   DEFINE_STATIC_LOCAL(const AtomicString, kWords, ("words"));
   DEFINE_STATIC_LOCAL(const AtomicString, kSentences, ("sentences"));
 
-  const AtomicString& value = FastGetAttribute(autocapitalizeAttr);
+  const AtomicString& value = FastGetAttribute(kAutocapitalizeAttr);
   if (value.IsEmpty())
     return g_empty_atom;
 
@@ -808,7 +811,7 @@
 }
 
 void HTMLElement::setAutocapitalize(const AtomicString& value) {
-  setAttribute(autocapitalizeAttr, value);
+  setAttribute(kAutocapitalizeAttr, value);
 }
 
 bool HTMLElement::isContentEditableForBinding() const {
@@ -816,11 +819,11 @@
 }
 
 bool HTMLElement::draggable() const {
-  return DeprecatedEqualIgnoringCase(getAttribute(draggableAttr), "true");
+  return DeprecatedEqualIgnoringCase(getAttribute(kDraggableAttr), "true");
 }
 
 void HTMLElement::setDraggable(bool value) {
-  setAttribute(draggableAttr, value ? "true" : "false");
+  setAttribute(kDraggableAttr, value ? "true" : "false");
 }
 
 bool HTMLElement::spellcheck() const {
@@ -828,7 +831,7 @@
 }
 
 void HTMLElement::setSpellcheck(bool enable) {
-  setAttribute(spellcheckAttr, enable ? "true" : "false");
+  setAttribute(kSpellcheckAttr, enable ? "true" : "false");
 }
 
 void HTMLElement::click() {
@@ -842,7 +845,7 @@
 }
 
 String HTMLElement::title() const {
-  return FastGetAttribute(titleAttr);
+  return FastGetAttribute(kTitleAttr);
 }
 
 int HTMLElement::tabIndex() const {
@@ -852,7 +855,7 @@
 }
 
 TranslateAttributeMode HTMLElement::GetTranslateAttributeMode() const {
-  const AtomicString& value = getAttribute(translateAttr);
+  const AtomicString& value = getAttribute(kTranslateAttr);
 
   if (value == g_null_atom)
     return kTranslateAttributeInherit;
@@ -880,7 +883,7 @@
 }
 
 void HTMLElement::setTranslate(bool enable) {
-  setAttribute(translateAttr, enable ? "yes" : "no");
+  setAttribute(kTranslateAttr, enable ? "yes" : "no");
 }
 
 // Returns the conforming 'dir' value associated with the state the attribute is
@@ -904,11 +907,11 @@
 }
 
 const AtomicString& HTMLElement::dir() {
-  return ToValidDirValue(FastGetAttribute(dirAttr));
+  return ToValidDirValue(FastGetAttribute(kDirAttr));
 }
 
 void HTMLElement::setDir(const AtomicString& value) {
-  setAttribute(dirAttr, value);
+  setAttribute(kDirAttr, value);
 }
 
 HTMLFormElement* HTMLElement::FindFormAncestor() const {
@@ -917,7 +920,7 @@
 
 static inline bool ElementAffectsDirectionality(const Node* node) {
   return node->IsHTMLElement() && (IsHTMLBDIElement(ToHTMLElement(*node)) ||
-                                   ToHTMLElement(*node).hasAttribute(dirAttr));
+                                   ToHTMLElement(*node).hasAttribute(kDirAttr));
 }
 
 void HTMLElement::ChildrenChanged(const ChildrenChange& change) {
@@ -928,7 +931,7 @@
 bool HTMLElement::HasDirectionAuto() const {
   // <bdi> defaults to dir="auto"
   // https://html.spec.whatwg.org/multipage/semantics.html#the-bdi-element
-  const AtomicString& direction = FastGetAttribute(dirAttr);
+  const AtomicString& direction = FastGetAttribute(kDirAttr);
   return (IsHTMLBDIElement(*this) && direction == g_null_atom) ||
          DeprecatedEqualIgnoringCase(direction, "auto");
 }
@@ -971,7 +974,7 @@
     // Skip elements with valid dir attribute
     if (node->IsElementNode()) {
       AtomicString dir_attribute_value =
-          ToElement(node)->FastGetAttribute(dirAttr);
+          ToElement(node)->FastGetAttribute(kDirAttr);
       if (IsValidDirAttribute(dir_attribute_value)) {
         node = FlatTreeTraversal::NextSkippingChildren(*node, this);
         continue;
@@ -1056,8 +1059,8 @@
   Element::InsertedInto(insertion_point);
 
   if (GetDocument().GetContentSecurityPolicy()->HasHeaderDeliveredPolicy() &&
-      InActiveDocument() && FastHasAttribute(nonceAttr)) {
-    setAttribute(nonceAttr, g_empty_atom);
+      InActiveDocument() && FastHasAttribute(kNonceAttr)) {
+    setAttribute(kNonceAttr, g_empty_atom);
   }
 
   return kInsertionDone;
@@ -1216,8 +1219,8 @@
 }
 
 bool HTMLElement::MatchesReadWritePseudoClass() const {
-  if (FastHasAttribute(contenteditableAttr)) {
-    const AtomicString& value = FastGetAttribute(contenteditableAttr);
+  if (FastHasAttribute(kContenteditableAttr)) {
+    const AtomicString& value = FastGetAttribute(kContenteditableAttr);
 
     if (value.IsEmpty() || DeprecatedEqualIgnoringCase(value, "true") ||
         DeprecatedEqualIgnoringCase(value, "plaintext-only"))
diff --git a/third_party/blink/renderer/core/html/html_embed_element.cc b/third_party/blink/renderer/core/html/html_embed_element.cc
index 99907cd..718ec8f 100644
--- a/third_party/blink/renderer/core/html/html_embed_element.cc
+++ b/third_party/blink/renderer/core/html/html_embed_element.cc
@@ -39,11 +39,11 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLEmbedElement::HTMLEmbedElement(Document& document,
                                           const CreateElementFlags flags)
-    : HTMLPlugInElement(embedTag,
+    : HTMLPlugInElement(kEmbedTag,
                         document,
                         flags,
                         kShouldPreferPlugInsForImages) {}
@@ -78,7 +78,7 @@
 
 bool HTMLEmbedElement::IsPresentationAttribute(
     const QualifiedName& name) const {
-  if (name == hiddenAttr)
+  if (name == kHiddenAttr)
     return true;
   return HTMLPlugInElement::IsPresentationAttribute(name);
 }
@@ -87,7 +87,7 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == hiddenAttr) {
+  if (name == kHiddenAttr) {
     if (DeprecatedEqualIgnoringCase(value, "yes") ||
         DeprecatedEqualIgnoringCase(value, "true")) {
       AddPropertyToPresentationAttributeStyle(
@@ -102,7 +102,7 @@
 
 void HTMLEmbedElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == typeAttr) {
+  if (params.name == kTypeAttr) {
     SetServiceType(params.new_value.LowerASCII());
     wtf_size_t pos = service_type_.Find(";");
     if (pos != kNotFound)
@@ -112,11 +112,11 @@
       GetLayoutObject()->SetNeedsLayoutAndFullPaintInvalidation(
           "Embed type changed");
     }
-  } else if (params.name == codeAttr) {
+  } else if (params.name == kCodeAttr) {
     // TODO(schenney): Remove this branch? It's not in the spec and we're not in
     // the HTMLAppletElement hierarchy.
     SetUrl(StripLeadingAndTrailingHTMLSpaces(params.new_value));
-  } else if (params.name == srcAttr) {
+  } else if (params.name == kSrcAttr) {
     SetUrl(StripLeadingAndTrailingHTMLSpaces(params.new_value));
     if (GetLayoutObject() && IsImageType()) {
       if (!image_loader_)
@@ -124,7 +124,7 @@
       image_loader_->UpdateFromElement(ImageLoader::kUpdateIgnorePreviousError);
     } else if (GetLayoutObject()) {
       // Check if this Embed can transition from potentially-active to active
-      if (FastHasAttribute(typeAttr)) {
+      if (FastHasAttribute(kTypeAttr)) {
         SetNeedsPluginUpdate(true);
         LazyReattachIfNeeded();
       }
@@ -185,7 +185,7 @@
   // represents nothing:
 
   // * The element has neither a src attribute nor a type attribute.
-  if (!FastHasAttribute(srcAttr) && !FastHasAttribute(typeAttr))
+  if (!FastHasAttribute(kSrcAttr) && !FastHasAttribute(kTypeAttr))
     return false;
 
   // * The element has a media element ancestor.
@@ -204,12 +204,12 @@
 }
 
 bool HTMLEmbedElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName() == srcAttr ||
+  return attribute.GetName() == kSrcAttr ||
          HTMLPlugInElement::IsURLAttribute(attribute);
 }
 
 const QualifiedName& HTMLEmbedElement::SubResourceAttributeName() const {
-  return srcAttr;
+  return kSrcAttr;
 }
 
 bool HTMLEmbedElement::IsInteractiveContent() const {
diff --git a/third_party/blink/renderer/core/html/html_font_element.cc b/third_party/blink/renderer/core/html/html_font_element.cc
index 68ac9290..c5e2614d 100644
--- a/third_party/blink/renderer/core/html/html_font_element.cc
+++ b/third_party/blink/renderer/core/html/html_font_element.cc
@@ -37,10 +37,10 @@
 namespace blink {
 
 using namespace cssvalue;
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLFontElement::HTMLFontElement(Document& document)
-    : HTMLElement(fontTag, document) {}
+    : HTMLElement(kFontTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLFontElement)
 
@@ -170,7 +170,7 @@
 }
 
 bool HTMLFontElement::IsPresentationAttribute(const QualifiedName& name) const {
-  if (name == sizeAttr || name == colorAttr || name == faceAttr)
+  if (name == kSizeAttr || name == kColorAttr || name == kFaceAttr)
     return true;
   return HTMLElement::IsPresentationAttribute(name);
 }
@@ -179,13 +179,13 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == sizeAttr) {
+  if (name == kSizeAttr) {
     CSSValueID size = CSSValueInvalid;
     if (CssValueFromFontSizeNumber(value, size))
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyFontSize, size);
-  } else if (name == colorAttr) {
+  } else if (name == kColorAttr) {
     AddHTMLColorToStyle(style, CSSPropertyColor, value);
-  } else if (name == faceAttr && !value.IsEmpty()) {
+  } else if (name == kFaceAttr && !value.IsEmpty()) {
     if (const CSSValueList* font_face_value = CreateFontFaceValueWithPool(
             value, GetDocument().GetSecureContextMode())) {
       style->SetProperty(
diff --git a/third_party/blink/renderer/core/html/html_frame_element.cc b/third_party/blink/renderer/core/html/html_frame_element.cc
index 69915130..46555b9 100644
--- a/third_party/blink/renderer/core/html/html_frame_element.cc
+++ b/third_party/blink/renderer/core/html/html_frame_element.cc
@@ -30,10 +30,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLFrameElement::HTMLFrameElement(Document& document)
-    : HTMLFrameElementBase(frameTag, document),
+    : HTMLFrameElementBase(kFrameTag, document),
       frame_border_(true),
       frame_border_set_(false) {}
 
@@ -55,7 +55,7 @@
 }
 
 bool HTMLFrameElement::NoResize() const {
-  return hasAttribute(noresizeAttr);
+  return hasAttribute(kNoresizeAttr);
 }
 
 void HTMLFrameElement::AttachLayoutTree(AttachContext& context) {
@@ -70,11 +70,11 @@
 
 void HTMLFrameElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == frameborderAttr) {
+  if (params.name == kFrameborderAttr) {
     frame_border_ = params.new_value.ToInt();
     frame_border_set_ = !params.new_value.IsNull();
     // FIXME: If we are already attached, this has no effect.
-  } else if (params.name == noresizeAttr) {
+  } else if (params.name == kNoresizeAttr) {
     if (GetLayoutObject())
       GetLayoutObject()->UpdateFromElement();
   } else {
diff --git a/third_party/blink/renderer/core/html/html_frame_element_base.cc b/third_party/blink/renderer/core/html/html_frame_element_base.cc
index 3e1fce3c..783fd247 100644
--- a/third_party/blink/renderer/core/html/html_frame_element_base.cc
+++ b/third_party/blink/renderer/core/html/html_frame_element_base.cc
@@ -43,7 +43,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 HTMLFrameElementBase::HTMLFrameElementBase(const QualifiedName& tag_name,
                                            Document& document)
@@ -125,28 +125,28 @@
     const AttributeModificationParams& params) {
   const QualifiedName& name = params.name;
   const AtomicString& value = params.new_value;
-  if (name == srcdocAttr) {
+  if (name == kSrcdocAttr) {
     if (!value.IsNull()) {
       SetLocation(SrcdocURL().GetString());
     } else {
-      const AtomicString& src_value = FastGetAttribute(srcAttr);
+      const AtomicString& src_value = FastGetAttribute(kSrcAttr);
       if (!src_value.IsNull())
         SetLocation(StripLeadingAndTrailingHTMLSpaces(src_value));
     }
-  } else if (name == srcAttr && !FastHasAttribute(srcdocAttr)) {
+  } else if (name == kSrcAttr && !FastHasAttribute(kSrcdocAttr)) {
     SetLocation(StripLeadingAndTrailingHTMLSpaces(value));
-  } else if (name == idAttr) {
+  } else if (name == kIdAttr) {
     // Important to call through to base for the id attribute so the hasID bit
     // gets set.
     HTMLFrameOwnerElement::ParseAttribute(params);
     frame_name_ = value;
-  } else if (name == nameAttr) {
+  } else if (name == kNameAttr) {
     frame_name_ = value;
-  } else if (name == marginwidthAttr) {
+  } else if (name == kMarginwidthAttr) {
     SetMarginWidth(value.ToInt());
-  } else if (name == marginheightAttr) {
+  } else if (name == kMarginheightAttr) {
     SetMarginHeight(value.ToInt());
-  } else if (name == scrollingAttr) {
+  } else if (name == kScrollingAttr) {
     // Auto and yes both simply mean "allow scrolling." No means "don't allow
     // scrolling."
     if (DeprecatedEqualIgnoringCase(value, "auto") ||
@@ -154,7 +154,7 @@
       SetScrollingMode(kScrollbarAuto);
     else if (DeprecatedEqualIgnoringCase(value, "no"))
       SetScrollingMode(kScrollbarAlwaysOff);
-  } else if (name == onbeforeunloadAttr) {
+  } else if (name == kOnbeforeunloadAttr) {
     // FIXME: should <frame> elements have beforeunload handlers?
     SetAttributeEventListener(
         EventTypeNames::beforeunload,
@@ -241,19 +241,19 @@
 }
 
 bool HTMLFrameElementBase::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName() == longdescAttr ||
-         attribute.GetName() == srcAttr ||
+  return attribute.GetName() == kLongdescAttr ||
+         attribute.GetName() == kSrcAttr ||
          HTMLFrameOwnerElement::IsURLAttribute(attribute);
 }
 
 bool HTMLFrameElementBase::HasLegalLinkAttribute(
     const QualifiedName& name) const {
-  return name == srcAttr || HTMLFrameOwnerElement::HasLegalLinkAttribute(name);
+  return name == kSrcAttr || HTMLFrameOwnerElement::HasLegalLinkAttribute(name);
 }
 
 bool HTMLFrameElementBase::IsHTMLContentAttribute(
     const Attribute& attribute) const {
-  return attribute.GetName() == srcdocAttr ||
+  return attribute.GetName() == kSrcdocAttr ||
          HTMLFrameOwnerElement::IsHTMLContentAttribute(attribute);
 }
 
diff --git a/third_party/blink/renderer/core/html/html_frame_element_test.cc b/third_party/blink/renderer/core/html/html_frame_element_test.cc
index 4e97512d..54a4cf8 100644
--- a/third_party/blink/renderer/core/html/html_frame_element_test.cc
+++ b/third_party/blink/renderer/core/html/html_frame_element_test.cc
@@ -22,7 +22,7 @@
 
   HTMLFrameElement* frame_element = HTMLFrameElement::Create(*document);
 
-  frame_element->setAttribute(HTMLNames::srcAttr, "http://example.net/");
+  frame_element->setAttribute(html_names::kSrcAttr, "http://example.net/");
   frame_element->UpdateContainerPolicyForTests();
 
   const ParsedFeaturePolicy& container_policy =
diff --git a/third_party/blink/renderer/core/html/html_frame_owner_element.cc b/third_party/blink/renderer/core/html/html_frame_owner_element.cc
index 0d9e018f..1870828f 100644
--- a/third_party/blink/renderer/core/html/html_frame_owner_element.cc
+++ b/third_party/blink/renderer/core/html/html_frame_owner_element.cc
@@ -354,7 +354,7 @@
   // attribute value "off" for "lazyload" is ignored (i.e., interpreted as
   // "auto" instead).
   if (should_lazy_load_children_ &&
-      EqualIgnoringASCIICase(FastGetAttribute(HTMLNames::lazyloadAttr),
+      EqualIgnoringASCIICase(FastGetAttribute(html_names::kLazyloadAttr),
                              "off") &&
       !GetDocument().IsLazyLoadPolicyEnforced()) {
     should_lazy_load_children_ = false;
@@ -411,7 +411,7 @@
       // URLs like invalid or empty URLs, "about:blank", local file URLs, etc.
       // that it doesn't make sense to lazily load.
       url.ProtocolIsInHTTPFamily() &&
-      (EqualIgnoringASCIICase(FastGetAttribute(HTMLNames::lazyloadAttr),
+      (EqualIgnoringASCIICase(FastGetAttribute(html_names::kLazyloadAttr),
                               "on") ||
        (should_lazy_load_children_ &&
         // Disallow lazy loading by default if javascript in the embedding
@@ -457,7 +457,7 @@
 
 void HTMLFrameOwnerElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == HTMLNames::lazyloadAttr) {
+  if (params.name == html_names::kLazyloadAttr) {
     // Note that when the *feature policy* for "lazyload" is disabled, the
     // attribute value "off" for "lazyload" is ignored (i.e., interpreted as
     // "auto" instead).
diff --git a/third_party/blink/renderer/core/html/html_frame_owner_element.h b/third_party/blink/renderer/core/html/html_frame_owner_element.h
index f66e023..243836d 100644
--- a/third_party/blink/renderer/core/html/html_frame_owner_element.h
+++ b/third_party/blink/renderer/core/html/html_frame_owner_element.h
@@ -104,7 +104,7 @@
   void RenderFallbackContent(Frame*) override {}
   void IntrinsicSizingInfoChanged() override {}
   AtomicString BrowsingContextContainerName() const override {
-    return getAttribute(HTMLNames::nameAttr);
+    return getAttribute(html_names::kNameAttr);
   }
   ScrollbarMode ScrollingMode() const override { return kScrollbarAuto; }
   int MarginWidth() const override { return -1; }
diff --git a/third_party/blink/renderer/core/html/html_frame_set_element.cc b/third_party/blink/renderer/core/html/html_frame_set_element.cc
index fc7c8112..0e3f2b0e 100644
--- a/third_party/blink/renderer/core/html/html_frame_set_element.cc
+++ b/third_party/blink/renderer/core/html/html_frame_set_element.cc
@@ -39,10 +39,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLFrameSetElement::HTMLFrameSetElement(Document& document)
-    : HTMLElement(framesetTag, document),
+    : HTMLElement(kFramesetTag, document),
       border_(6),
       border_set_(false),
       border_color_set_(false),
@@ -56,7 +56,7 @@
 
 bool HTMLFrameSetElement::IsPresentationAttribute(
     const QualifiedName& name) const {
-  if (name == bordercolorAttr)
+  if (name == kBordercolorAttr)
     return true;
   return HTMLElement::IsPresentationAttribute(name);
 }
@@ -65,7 +65,7 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == bordercolorAttr)
+  if (name == kBordercolorAttr)
     AddHTMLColorToStyle(style, CSSPropertyBorderColor, value);
   else
     HTMLElement::CollectStyleForPresentationAttribute(name, value, style);
@@ -75,19 +75,19 @@
     const AttributeModificationParams& params) {
   const QualifiedName& name = params.name;
   const AtomicString& value = params.new_value;
-  if (name == rowsAttr) {
+  if (name == kRowsAttr) {
     if (!value.IsNull()) {
       row_lengths_ = ParseListOfDimensions(value.GetString());
       SetNeedsStyleRecalc(kSubtreeStyleChange,
                           StyleChangeReasonForTracing::FromAttribute(name));
     }
-  } else if (name == colsAttr) {
+  } else if (name == kColsAttr) {
     if (!value.IsNull()) {
       col_lengths_ = ParseListOfDimensions(value.GetString());
       SetNeedsStyleRecalc(kSubtreeStyleChange,
                           StyleChangeReasonForTracing::FromAttribute(name));
     }
-  } else if (name == frameborderAttr) {
+  } else if (name == kFrameborderAttr) {
     if (!value.IsNull()) {
       if (DeprecatedEqualIgnoringCase(value, "no") ||
           DeprecatedEqualIgnoringCase(value, "0")) {
@@ -101,107 +101,107 @@
       frameborder_ = false;
       frameborder_set_ = false;
     }
-  } else if (name == noresizeAttr) {
+  } else if (name == kNoresizeAttr) {
     noresize_ = true;
-  } else if (name == borderAttr) {
+  } else if (name == kBorderAttr) {
     if (!value.IsNull()) {
       border_ = value.ToInt();
       border_set_ = true;
     } else {
       border_set_ = false;
     }
-  } else if (name == bordercolorAttr) {
+  } else if (name == kBordercolorAttr) {
     border_color_set_ = !value.IsEmpty();
-  } else if (name == onafterprintAttr) {
+  } else if (name == kOnafterprintAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::afterprint,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onbeforeprintAttr) {
+  } else if (name == kOnbeforeprintAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::beforeprint,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onloadAttr) {
+  } else if (name == kOnloadAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::load,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onbeforeunloadAttr) {
+  } else if (name == kOnbeforeunloadAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::beforeunload,
         CreateAttributeEventListener(
             GetDocument().GetFrame(), name, value,
             JSEventHandler::HandlerType::kOnBeforeUnloadEventHandler));
-  } else if (name == onunloadAttr) {
+  } else if (name == kOnunloadAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::unload,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onpagehideAttr) {
+  } else if (name == kOnpagehideAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::pagehide,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onpageshowAttr) {
+  } else if (name == kOnpageshowAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::pageshow,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onblurAttr) {
+  } else if (name == kOnblurAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::blur,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onerrorAttr) {
+  } else if (name == kOnerrorAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::error,
         CreateAttributeEventListener(
             GetDocument().GetFrame(), name, value,
             JSEventHandler::HandlerType::kOnErrorEventHandler));
-  } else if (name == onfocusAttr) {
+  } else if (name == kOnfocusAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::focus,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onfocusinAttr) {
+  } else if (name == kOnfocusinAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::focusin,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onfocusoutAttr) {
+  } else if (name == kOnfocusoutAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::focusout,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
   } else if (RuntimeEnabledFeatures::OrientationEventEnabled() &&
-             name == onorientationchangeAttr) {
+             name == kOnorientationchangeAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::orientationchange,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onhashchangeAttr) {
+  } else if (name == kOnhashchangeAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::hashchange,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onmessageAttr) {
+  } else if (name == kOnmessageAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::message,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onresizeAttr) {
+  } else if (name == kOnresizeAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::resize,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onscrollAttr) {
+  } else if (name == kOnscrollAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::scroll,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onstorageAttr) {
+  } else if (name == kOnstorageAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::storage,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == ononlineAttr) {
+  } else if (name == kOnonlineAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::online,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onofflineAttr) {
+  } else if (name == kOnofflineAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::offline,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onpopstateAttr) {
+  } else if (name == kOnpopstateAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::popstate,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == onlanguagechangeAttr) {
+  } else if (name == kOnlanguagechangeAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::languagechange,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
diff --git a/third_party/blink/renderer/core/html/html_head_element.cc b/third_party/blink/renderer/core/html/html_head_element.cc
index 498dbf3..e378e21 100644
--- a/third_party/blink/renderer/core/html/html_head_element.cc
+++ b/third_party/blink/renderer/core/html/html_head_element.cc
@@ -27,10 +27,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLHeadElement::HTMLHeadElement(Document& document)
-    : HTMLElement(headTag, document) {}
+    : HTMLElement(kHeadTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLHeadElement)
 
diff --git a/third_party/blink/renderer/core/html/html_hr_element.cc b/third_party/blink/renderer/core/html/html_hr_element.cc
index a1835bf..3729778 100644
--- a/third_party/blink/renderer/core/html/html_hr_element.cc
+++ b/third_party/blink/renderer/core/html/html_hr_element.cc
@@ -33,16 +33,16 @@
 namespace blink {
 
 using namespace cssvalue;
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLHRElement::HTMLHRElement(Document& document)
-    : HTMLElement(hrTag, document) {}
+    : HTMLElement(kHrTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLHRElement)
 
 bool HTMLHRElement::IsPresentationAttribute(const QualifiedName& name) const {
-  if (name == alignAttr || name == widthAttr || name == colorAttr ||
-      name == noshadeAttr || name == sizeAttr)
+  if (name == kAlignAttr || name == kWidthAttr || name == kColorAttr ||
+      name == kNoshadeAttr || name == kSizeAttr)
     return true;
   return HTMLElement::IsPresentationAttribute(name);
 }
@@ -51,7 +51,7 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == alignAttr) {
+  if (name == kAlignAttr) {
     if (DeprecatedEqualIgnoringCase(value, "left")) {
       AddPropertyToPresentationAttributeStyle(
           style, CSSPropertyMarginLeft, 0,
@@ -70,7 +70,7 @@
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyMarginRight,
                                               CSSValueAuto);
     }
-  } else if (name == widthAttr) {
+  } else if (name == kWidthAttr) {
     bool ok;
     int v = value.ToInt(&ok);
     if (ok && !v)
@@ -78,13 +78,13 @@
           style, CSSPropertyWidth, 1, CSSPrimitiveValue::UnitType::kPixels);
     else
       AddHTMLLengthToStyle(style, CSSPropertyWidth, value);
-  } else if (name == colorAttr) {
+  } else if (name == kColorAttr) {
     AddPropertyToPresentationAttributeStyle(style, CSSPropertyBorderStyle,
                                             CSSValueSolid);
     AddHTMLColorToStyle(style, CSSPropertyBorderColor, value);
     AddHTMLColorToStyle(style, CSSPropertyBackgroundColor, value);
-  } else if (name == noshadeAttr) {
-    if (!hasAttribute(colorAttr)) {
+  } else if (name == kNoshadeAttr) {
+    if (!hasAttribute(kColorAttr)) {
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyBorderStyle,
                                               CSSValueSolid);
 
@@ -93,7 +93,7 @@
       style->SetProperty(CSSPropertyBorderColor, dark_gray_value);
       style->SetProperty(CSSPropertyBackgroundColor, dark_gray_value);
     }
-  } else if (name == sizeAttr) {
+  } else if (name == kSizeAttr) {
     int size = value.ToInt();
     if (size <= 1)
       AddPropertyToPresentationAttributeStyle(
diff --git a/third_party/blink/renderer/core/html/html_html_element.cc b/third_party/blink/renderer/core/html/html_html_element.cc
index eb9f3b1..6188335 100644
--- a/third_party/blink/renderer/core/html/html_html_element.cc
+++ b/third_party/blink/renderer/core/html/html_html_element.cc
@@ -36,15 +36,15 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLHtmlElement::HTMLHtmlElement(Document& document)
-    : HTMLElement(htmlTag, document) {}
+    : HTMLElement(kHTMLTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLHtmlElement)
 
 bool HTMLHtmlElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName() == manifestAttr ||
+  return attribute.GetName() == kManifestAttr ||
          HTMLElement::IsURLAttribute(attribute);
 }
 
@@ -73,7 +73,7 @@
   if (!document_loader ||
       !GetDocument().Parser()->DocumentWasLoadedAsPartOfNavigation())
     return;
-  const AtomicString& manifest = FastGetAttribute(manifestAttr);
+  const AtomicString& manifest = FastGetAttribute(kManifestAttr);
 
   if (RuntimeEnabledFeatures::RestrictAppCacheToSecureContextsEnabled() &&
       !GetDocument().IsSecureContext()) {
diff --git a/third_party/blink/renderer/core/html/html_iframe_element.cc b/third_party/blink/renderer/core/html/html_iframe_element.cc
index 0fe3efa..8cc63590 100644
--- a/third_party/blink/renderer/core/html/html_iframe_element.cc
+++ b/third_party/blink/renderer/core/html/html_iframe_element.cc
@@ -40,10 +40,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLIFrameElement::HTMLIFrameElement(Document& document)
-    : HTMLFrameElementBase(iframeTag, document),
+    : HTMLFrameElementBase(kIFrameTag, document),
       collapsed_by_client_(false),
       sandbox_(HTMLIFrameElementSandbox::Create(this)),
       referrer_policy_(kReferrerPolicyDefault) {}
@@ -92,8 +92,8 @@
 
 bool HTMLIFrameElement::IsPresentationAttribute(
     const QualifiedName& name) const {
-  if (name == widthAttr || name == heightAttr || name == alignAttr ||
-      name == frameborderAttr)
+  if (name == kWidthAttr || name == kHeightAttr || name == kAlignAttr ||
+      name == kFrameborderAttr)
     return true;
   return HTMLFrameElementBase::IsPresentationAttribute(name);
 }
@@ -102,13 +102,13 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == widthAttr) {
+  if (name == kWidthAttr) {
     AddHTMLLengthToStyle(style, CSSPropertyWidth, value);
-  } else if (name == heightAttr) {
+  } else if (name == kHeightAttr) {
     AddHTMLLengthToStyle(style, CSSPropertyHeight, value);
-  } else if (name == alignAttr) {
+  } else if (name == kAlignAttr) {
     ApplyAlignmentAttributeToStyle(value, style);
-  } else if (name == frameborderAttr) {
+  } else if (name == kFrameborderAttr) {
     // LocalFrame border doesn't really match the HTML4 spec definition for
     // iframes. It simply adds a presentational hint that the border should be
     // off if set to zero.
@@ -128,7 +128,7 @@
     const AttributeModificationParams& params) {
   const QualifiedName& name = params.name;
   const AtomicString& value = params.new_value;
-  if (name == nameAttr) {
+  if (name == kNameAttr) {
     if (IsInDocumentTree() && GetDocument().IsHTMLDocument()) {
       HTMLDocument& document = ToHTMLDocument(GetDocument());
       document.RemoveNamedItem(name_);
@@ -138,7 +138,7 @@
     name_ = value;
     if (name_ != old_name)
       FrameOwnerPropertiesChanged();
-  } else if (name == sandboxAttr) {
+  } else if (name == kSandboxAttr) {
     sandbox_->DidUpdateAttributeValue(params.old_value, value);
     String invalid_tokens;
     SetSandboxFlags(value.IsNull() ? kSandboxNone
@@ -150,7 +150,7 @@
           "Error while parsing the 'sandbox' attribute: " + invalid_tokens));
     }
     UseCounter::Count(GetDocument(), WebFeature::kSandboxViaIFrame);
-  } else if (name == referrerpolicyAttr) {
+  } else if (name == kReferrerpolicyAttr) {
     referrer_policy_ = kReferrerPolicyDefault;
     if (!value.IsNull()) {
       SecurityPolicy::ReferrerPolicyFromString(
@@ -158,7 +158,7 @@
       UseCounter::Count(GetDocument(),
                         WebFeature::kHTMLIFrameElementReferrerPolicyAttribute);
     }
-  } else if (name == allowfullscreenAttr) {
+  } else if (name == kAllowfullscreenAttr) {
     bool old_allow_fullscreen = allow_fullscreen_;
     allow_fullscreen_ = !value.IsNull();
     if (allow_fullscreen_ != old_allow_fullscreen) {
@@ -173,14 +173,14 @@
       FrameOwnerPropertiesChanged();
       UpdateContainerPolicy();
     }
-  } else if (name == allowpaymentrequestAttr) {
+  } else if (name == kAllowpaymentrequestAttr) {
     bool old_allow_payment_request = allow_payment_request_;
     allow_payment_request_ = !value.IsNull();
     if (allow_payment_request_ != old_allow_payment_request) {
       FrameOwnerPropertiesChanged();
       UpdateContainerPolicy();
     }
-  } else if (name == cspAttr) {
+  } else if (name == kCspAttr) {
     if (!ContentSecurityPolicy::IsValidCSPAttr(
             value.GetString(), GetDocument().RequiredCSP().GetString())) {
       required_csp_ = g_null_atom;
@@ -193,7 +193,7 @@
       required_csp_ = value;
       FrameOwnerPropertiesChanged();
     }
-  } else if (name == allowAttr) {
+  } else if (name == kAllowAttr) {
     if (allow_ != value) {
       allow_ = value;
       Vector<String> messages;
@@ -228,7 +228,7 @@
                                  "https://goo.gl/ximf56"));
     }
 
-    if (name == srcAttr)
+    if (name == kSrcAttr)
       LogUpdateAttributeIfIsolatedWorldAndInDocument("iframe", params);
     HTMLFrameElementBase::ParseAttribute(params);
   }
@@ -300,7 +300,7 @@
       }
     }
   }
-  LogAddElementIfIsolatedWorldAndInDocument("iframe", srcAttr);
+  LogAddElementIfIsolatedWorldAndInDocument("iframe", kSrcAttr);
   return result;
 }
 
diff --git a/third_party/blink/renderer/core/html/html_iframe_element_sandbox.cc b/third_party/blink/renderer/core/html/html_iframe_element_sandbox.cc
index 3e77536..8603fa8 100644
--- a/third_party/blink/renderer/core/html/html_iframe_element_sandbox.cc
+++ b/third_party/blink/renderer/core/html/html_iframe_element_sandbox.cc
@@ -41,7 +41,7 @@
 }  // namespace
 
 HTMLIFrameElementSandbox::HTMLIFrameElementSandbox(HTMLIFrameElement* element)
-    : DOMTokenList(*element, HTMLNames::sandboxAttr) {}
+    : DOMTokenList(*element, html_names::kSandboxAttr) {}
 
 bool HTMLIFrameElementSandbox::ValidateTokenValue(
     const AtomicString& token_value,
diff --git a/third_party/blink/renderer/core/html/html_iframe_element_test.cc b/third_party/blink/renderer/core/html/html_iframe_element_test.cc
index a7c95a8..6e57695 100644
--- a/third_party/blink/renderer/core/html/html_iframe_element_test.cc
+++ b/third_party/blink/renderer/core/html/html_iframe_element_test.cc
@@ -29,20 +29,20 @@
 
   HTMLIFrameElement* frame_element = HTMLIFrameElement::Create(*document);
 
-  frame_element->setAttribute(HTMLNames::srcAttr, "about:blank");
+  frame_element->setAttribute(html_names::kSrcAttr, "about:blank");
   scoped_refptr<const SecurityOrigin> effective_origin =
       GetOriginForFeaturePolicy(frame_element);
   EXPECT_TRUE(
       effective_origin->IsSameSchemeHostPort(document->GetSecurityOrigin()));
 
-  frame_element->setAttribute(HTMLNames::srcAttr,
+  frame_element->setAttribute(html_names::kSrcAttr,
                               "data:text/html;base64,PHRpdGxlPkFCQzwvdGl0bGU+");
   effective_origin = GetOriginForFeaturePolicy(frame_element);
   EXPECT_FALSE(
       effective_origin->IsSameSchemeHostPort(document->GetSecurityOrigin()));
   EXPECT_TRUE(effective_origin->IsOpaque());
 
-  frame_element->setAttribute(HTMLNames::srcAttr, "http://example.net/");
+  frame_element->setAttribute(html_names::kSrcAttr, "http://example.net/");
   effective_origin = GetOriginForFeaturePolicy(frame_element);
   EXPECT_FALSE(
       effective_origin->IsSameSchemeHostPort(document->GetSecurityOrigin()));
@@ -59,15 +59,15 @@
 
   HTMLIFrameElement* frame_element = HTMLIFrameElement::Create(*document);
 
-  frame_element->setAttribute(HTMLNames::sandboxAttr, "");
-  frame_element->setAttribute(HTMLNames::srcAttr, "http://example.com/");
+  frame_element->setAttribute(html_names::kSandboxAttr, "");
+  frame_element->setAttribute(html_names::kSrcAttr, "http://example.com/");
   scoped_refptr<const SecurityOrigin> effective_origin =
       GetOriginForFeaturePolicy(frame_element);
   EXPECT_FALSE(
       effective_origin->IsSameSchemeHostPort(document->GetSecurityOrigin()));
   EXPECT_TRUE(effective_origin->IsOpaque());
 
-  frame_element->setAttribute(HTMLNames::srcAttr, "http://example.net/");
+  frame_element->setAttribute(html_names::kSrcAttr, "http://example.net/");
   effective_origin = GetOriginForFeaturePolicy(frame_element);
   EXPECT_FALSE(
       effective_origin->IsSameSchemeHostPort(document->GetSecurityOrigin()));
@@ -84,8 +84,8 @@
 
   HTMLIFrameElement* frame_element = HTMLIFrameElement::Create(*document);
 
-  frame_element->setAttribute(HTMLNames::sandboxAttr, "allow-same-origin");
-  frame_element->setAttribute(HTMLNames::srcAttr, "http://example.com/");
+  frame_element->setAttribute(html_names::kSandboxAttr, "allow-same-origin");
+  frame_element->setAttribute(html_names::kSrcAttr, "http://example.com/");
   scoped_refptr<const SecurityOrigin> effective_origin =
       GetOriginForFeaturePolicy(frame_element);
   EXPECT_TRUE(
@@ -103,7 +103,7 @@
 
   HTMLIFrameElement* frame_element = HTMLIFrameElement::Create(*document);
 
-  frame_element->setAttribute(HTMLNames::srcdocAttr, "<title>title</title>");
+  frame_element->setAttribute(html_names::kSrcdocAttr, "<title>title</title>");
   scoped_refptr<const SecurityOrigin> effective_origin =
       GetOriginForFeaturePolicy(frame_element);
   EXPECT_TRUE(
@@ -120,8 +120,8 @@
 
   HTMLIFrameElement* frame_element = HTMLIFrameElement::Create(*document);
 
-  frame_element->setAttribute(HTMLNames::sandboxAttr, "");
-  frame_element->setAttribute(HTMLNames::srcdocAttr, "<title>title</title>");
+  frame_element->setAttribute(html_names::kSandboxAttr, "");
+  frame_element->setAttribute(html_names::kSrcdocAttr, "<title>title</title>");
   scoped_refptr<const SecurityOrigin> effective_origin =
       GetOriginForFeaturePolicy(frame_element);
   EXPECT_FALSE(
@@ -140,14 +140,15 @@
   HTMLIFrameElement* frame_element = HTMLIFrameElement::Create(*document);
 
   // Host-relative URLs should resolve to the same domain as the parent.
-  frame_element->setAttribute(HTMLNames::srcAttr, "index2.html");
+  frame_element->setAttribute(html_names::kSrcAttr, "index2.html");
   scoped_refptr<const SecurityOrigin> effective_origin =
       GetOriginForFeaturePolicy(frame_element);
   EXPECT_TRUE(
       effective_origin->IsSameSchemeHostPort(document->GetSecurityOrigin()));
 
   // Scheme-relative URLs should not resolve to the same domain as the parent.
-  frame_element->setAttribute(HTMLNames::srcAttr, "//example.net/index2.html");
+  frame_element->setAttribute(html_names::kSrcAttr,
+                              "//example.net/index2.html");
   effective_origin = GetOriginForFeaturePolicy(frame_element);
   EXPECT_FALSE(
       effective_origin->IsSameSchemeHostPort(document->GetSecurityOrigin()));
@@ -165,7 +166,7 @@
 
   HTMLIFrameElement* frame_element = HTMLIFrameElement::Create(*document);
 
-  frame_element->setAttribute(HTMLNames::srcAttr, "http://example.net/");
+  frame_element->setAttribute(html_names::kSrcAttr, "http://example.net/");
   frame_element->UpdateContainerPolicyForTests();
 
   const ParsedFeaturePolicy& container_policy =
@@ -183,8 +184,8 @@
 
   HTMLIFrameElement* frame_element = HTMLIFrameElement::Create(*document);
 
-  frame_element->setAttribute(HTMLNames::srcAttr, "http://example.net/");
-  frame_element->setAttribute(HTMLNames::allowAttr, "fullscreen");
+  frame_element->setAttribute(html_names::kSrcAttr, "http://example.net/");
+  frame_element->setAttribute(html_names::kAllowAttr, "fullscreen");
   frame_element->UpdateContainerPolicyForTests();
 
   const ParsedFeaturePolicy& container_policy1 =
@@ -197,7 +198,7 @@
   EXPECT_EQ(1UL, container_policy1[0].origins.size());
   EXPECT_EQ("http://example.net", container_policy1[0].origins[0].Serialize());
 
-  frame_element->setAttribute(HTMLNames::allowAttr, "payment; fullscreen");
+  frame_element->setAttribute(html_names::kAllowAttr, "payment; fullscreen");
   frame_element->UpdateContainerPolicyForTests();
 
   const ParsedFeaturePolicy& container_policy2 =
@@ -228,9 +229,9 @@
 
   HTMLIFrameElement* frame_element = HTMLIFrameElement::Create(*document);
 
-  frame_element->setAttribute(HTMLNames::srcAttr, "http://example.net/");
-  frame_element->setAttribute(HTMLNames::allowAttr, "fullscreen");
-  frame_element->setAttribute(HTMLNames::sandboxAttr, "");
+  frame_element->setAttribute(html_names::kSrcAttr, "http://example.net/");
+  frame_element->setAttribute(html_names::kAllowAttr, "fullscreen");
+  frame_element->setAttribute(html_names::kSandboxAttr, "");
   frame_element->UpdateContainerPolicyForTests();
 
   const ParsedFeaturePolicy& container_policy =
@@ -255,9 +256,9 @@
 
   HTMLIFrameElement* frame_element = HTMLIFrameElement::Create(*document);
 
-  frame_element->setAttribute(HTMLNames::srcAttr, "http://example.net/");
-  frame_element->setAttribute(HTMLNames::allowAttr, "fullscreen");
-  frame_element->setAttribute(HTMLNames::sandboxAttr, "allow-same-origin");
+  frame_element->setAttribute(html_names::kSrcAttr, "http://example.net/");
+  frame_element->setAttribute(html_names::kAllowAttr, "fullscreen");
+  frame_element->setAttribute(html_names::kSandboxAttr, "allow-same-origin");
   frame_element->UpdateContainerPolicyForTests();
 
   const ParsedFeaturePolicy& container_policy =
@@ -297,7 +298,7 @@
   document->UpdateSecurityOrigin(SecurityOrigin::Create(document_url));
 
   HTMLIFrameElement* frame_element = HTMLIFrameElement::Create(*document);
-  frame_element->setAttribute(HTMLNames::allowAttr, "payment; usb");
+  frame_element->setAttribute(html_names::kAllowAttr, "payment; usb");
   ParsedFeaturePolicy container_policy =
       frame_element->ConstructContainerPolicy(nullptr);
   EXPECT_EQ(2UL, container_policy.size());
@@ -322,7 +323,7 @@
   document->UpdateSecurityOrigin(SecurityOrigin::Create(document_url));
 
   HTMLIFrameElement* frame_element = HTMLIFrameElement::Create(*document);
-  frame_element->SetBooleanAttribute(HTMLNames::allowfullscreenAttr, true);
+  frame_element->SetBooleanAttribute(html_names::kAllowfullscreenAttr, true);
 
   ParsedFeaturePolicy container_policy =
       frame_element->ConstructContainerPolicy(nullptr);
@@ -341,8 +342,9 @@
   document->UpdateSecurityOrigin(SecurityOrigin::Create(document_url));
 
   HTMLIFrameElement* frame_element = HTMLIFrameElement::Create(*document);
-  frame_element->setAttribute(HTMLNames::allowAttr, "usb");
-  frame_element->SetBooleanAttribute(HTMLNames::allowpaymentrequestAttr, true);
+  frame_element->setAttribute(html_names::kAllowAttr, "usb");
+  frame_element->SetBooleanAttribute(html_names::kAllowpaymentrequestAttr,
+                                     true);
 
   ParsedFeaturePolicy container_policy =
       frame_element->ConstructContainerPolicy(nullptr);
@@ -369,9 +371,10 @@
   document->UpdateSecurityOrigin(SecurityOrigin::Create(document_url));
 
   HTMLIFrameElement* frame_element = HTMLIFrameElement::Create(*document);
-  frame_element->setAttribute(HTMLNames::allowAttr, "payment; usb");
-  frame_element->SetBooleanAttribute(HTMLNames::allowfullscreenAttr, true);
-  frame_element->SetBooleanAttribute(HTMLNames::allowpaymentrequestAttr, true);
+  frame_element->setAttribute(html_names::kAllowAttr, "payment; usb");
+  frame_element->SetBooleanAttribute(html_names::kAllowfullscreenAttr, true);
+  frame_element->SetBooleanAttribute(html_names::kAllowpaymentrequestAttr,
+                                     true);
 
   ParsedFeaturePolicy container_policy =
       frame_element->ConstructContainerPolicy(nullptr);
diff --git a/third_party/blink/renderer/core/html/html_image_element.cc b/third_party/blink/renderer/core/html/html_image_element.cc
index 1a424daf..684b7374 100644
--- a/third_party/blink/renderer/core/html/html_image_element.cc
+++ b/third_party/blink/renderer/core/html/html_image_element.cc
@@ -67,7 +67,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 class HTMLImageElement::ViewportChangeListener final
     : public MediaQueryListListener {
@@ -93,7 +93,7 @@
 };
 
 HTMLImageElement::HTMLImageElement(Document& document, bool created_by_parser)
-    : HTMLElement(imgTag, document),
+    : HTMLElement(kImgTag, document),
       image_loader_(HTMLImageLoader::Create(this)),
       image_device_pixel_ratio_(1.0f),
       source_(nullptr),
@@ -171,9 +171,9 @@
 
 bool HTMLImageElement::IsPresentationAttribute(
     const QualifiedName& name) const {
-  if (name == widthAttr || name == heightAttr || name == borderAttr ||
-      name == vspaceAttr || name == hspaceAttr || name == alignAttr ||
-      name == valignAttr)
+  if (name == kWidthAttr || name == kHeightAttr || name == kBorderAttr ||
+      name == kVspaceAttr || name == kHspaceAttr || name == kAlignAttr ||
+      name == kValignAttr)
     return true;
   return HTMLElement::IsPresentationAttribute(name);
 }
@@ -182,21 +182,21 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == widthAttr) {
+  if (name == kWidthAttr) {
     AddHTMLLengthToStyle(style, CSSPropertyWidth, value);
-  } else if (name == heightAttr) {
+  } else if (name == kHeightAttr) {
     AddHTMLLengthToStyle(style, CSSPropertyHeight, value);
-  } else if (name == borderAttr) {
+  } else if (name == kBorderAttr) {
     ApplyBorderAttributeToStyle(value, style);
-  } else if (name == vspaceAttr) {
+  } else if (name == kVspaceAttr) {
     AddHTMLLengthToStyle(style, CSSPropertyMarginTop, value);
     AddHTMLLengthToStyle(style, CSSPropertyMarginBottom, value);
-  } else if (name == hspaceAttr) {
+  } else if (name == kHspaceAttr) {
     AddHTMLLengthToStyle(style, CSSPropertyMarginLeft, value);
     AddHTMLLengthToStyle(style, CSSPropertyMarginRight, value);
-  } else if (name == alignAttr) {
+  } else if (name == kAlignAttr) {
     ApplyAlignmentAttributeToStyle(value, style);
-  } else if (name == valignAttr) {
+  } else if (name == kValignAttr) {
     AddPropertyToPresentationAttributeStyle(style, CSSPropertyVerticalAlign,
                                             value);
   } else {
@@ -205,7 +205,7 @@
 }
 
 const AtomicString HTMLImageElement::ImageSourceURL() const {
-  return best_fit_image_url_.IsNull() ? FastGetAttribute(srcAttr)
+  return best_fit_image_url_.IsNull() ? FastGetAttribute(kSrcAttr)
                                       : best_fit_image_url_;
 }
 
@@ -273,18 +273,18 @@
 void HTMLImageElement::ParseAttribute(
     const AttributeModificationParams& params) {
   const QualifiedName& name = params.name;
-  if (name == altAttr || name == titleAttr) {
+  if (name == kAltAttr || name == kTitleAttr) {
     if (UserAgentShadowRoot()) {
       Element* text = UserAgentShadowRoot()->getElementById("alttext");
       String alt_text_content = AltText();
       if (text && text->textContent() != alt_text_content)
         text->setTextContent(alt_text_content);
     }
-  } else if (name == srcAttr || name == srcsetAttr || name == sizesAttr) {
+  } else if (name == kSrcAttr || name == kSrcsetAttr || name == kSizesAttr) {
     SelectSourceURL(ImageLoader::kUpdateIgnorePreviousError);
-  } else if (name == usemapAttr) {
+  } else if (name == kUsemapAttr) {
     SetIsLink(!params.new_value.IsNull());
-  } else if (name == referrerpolicyAttr) {
+  } else if (name == kReferrerpolicyAttr) {
     referrer_policy_ = kReferrerPolicyDefault;
     if (!params.new_value.IsNull()) {
       SecurityPolicy::ReferrerPolicyFromString(
@@ -293,10 +293,10 @@
       UseCounter::Count(GetDocument(),
                         WebFeature::kHTMLImageElementReferrerPolicyAttribute);
     }
-  } else if (name == decodingAttr) {
+  } else if (name == kDecodingAttr) {
     UseCounter::Count(GetDocument(), WebFeature::kImageDecodingAttribute);
     decoding_mode_ = ParseImageDecodingMode(params.new_value);
-  } else if (name == intrinsicsizeAttr &&
+  } else if (name == kIntrinsicsizeAttr &&
              RuntimeEnabledFeatures::
                  ExperimentalProductivityFeaturesEnabled()) {
     String message;
@@ -312,7 +312,7 @@
     if (intrinsic_size_changed && GetLayoutObject() &&
         GetLayoutObject()->IsLayoutImage())
       ToLayoutImage(GetLayoutObject())->IntrinsicSizeChanged();
-  } else if (name == lazyloadAttr &&
+  } else if (name == kLazyloadAttr &&
              EqualIgnoringASCIICase(params.new_value, "off") &&
              !GetDocument().IsLazyLoadPolicyEnforced()) {
     GetImageLoader().LoadDeferredImage(referrer_policy_);
@@ -325,11 +325,11 @@
   // lets figure out the alt text.. magic stuff
   // http://www.w3.org/TR/1998/REC-html40-19980424/appendix/notes.html#altgen
   // also heavily discussed by Hixie on bugzilla
-  const AtomicString& alt = FastGetAttribute(altAttr);
+  const AtomicString& alt = FastGetAttribute(kAltAttr);
   if (!alt.IsNull())
     return alt;
   // fall back to title attribute
-  return FastGetAttribute(titleAttr);
+  return FastGetAttribute(kTitleAttr);
 }
 
 static bool SupportedImageType(const String& type) {
@@ -356,14 +356,14 @@
       continue;
 
     HTMLSourceElement* source = ToHTMLSourceElement(child);
-    if (!source->FastGetAttribute(srcAttr).IsNull()) {
+    if (!source->FastGetAttribute(kSrcAttr).IsNull()) {
       Deprecation::CountDeprecation(GetDocument(),
                                     WebFeature::kPictureSourceSrc);
     }
-    String srcset = source->FastGetAttribute(srcsetAttr);
+    String srcset = source->FastGetAttribute(kSrcsetAttr);
     if (srcset.IsEmpty())
       continue;
-    String type = source->FastGetAttribute(typeAttr);
+    String type = source->FastGetAttribute(kTypeAttr);
     if (!type.IsEmpty() && !SupportedImageType(type))
       continue;
 
@@ -372,7 +372,7 @@
 
     ImageCandidate candidate = BestFitSourceForSrcsetAttribute(
         GetDocument().DevicePixelRatio(), SourceSize(*source),
-        source->FastGetAttribute(srcsetAttr), &GetDocument());
+        source->FastGetAttribute(kSrcsetAttr), &GetDocument());
     if (candidate.IsEmpty())
       continue;
     source_ = source;
@@ -474,7 +474,7 @@
   if (!GetLayoutObject()) {
     // check the attribute first for an explicit pixel value
     unsigned width = 0;
-    if (ParseHTMLNonNegativeInteger(getAttribute(widthAttr), width))
+    if (ParseHTMLNonNegativeInteger(getAttribute(kWidthAttr), width))
       return width;
 
     // if the image is available, use its width
@@ -495,7 +495,7 @@
   if (!GetLayoutObject()) {
     // check the attribute first for an explicit pixel value
     unsigned height = 0;
-    if (ParseHTMLNonNegativeInteger(getAttribute(heightAttr), height))
+    if (ParseHTMLNonNegativeInteger(getAttribute(kHeightAttr), height))
       return height;
 
     // if the image is available, use its height
@@ -573,27 +573,28 @@
 }
 
 bool HTMLImageElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName() == srcAttr || attribute.GetName() == lowsrcAttr ||
-         attribute.GetName() == longdescAttr ||
-         (attribute.GetName() == usemapAttr && attribute.Value()[0] != '#') ||
+  return attribute.GetName() == kSrcAttr ||
+         attribute.GetName() == kLowsrcAttr ||
+         attribute.GetName() == kLongdescAttr ||
+         (attribute.GetName() == kUsemapAttr && attribute.Value()[0] != '#') ||
          HTMLElement::IsURLAttribute(attribute);
 }
 
 bool HTMLImageElement::HasLegalLinkAttribute(const QualifiedName& name) const {
-  return name == srcAttr || HTMLElement::HasLegalLinkAttribute(name);
+  return name == kSrcAttr || HTMLElement::HasLegalLinkAttribute(name);
 }
 
 const QualifiedName& HTMLImageElement::SubResourceAttributeName() const {
-  return srcAttr;
+  return kSrcAttr;
 }
 
 bool HTMLImageElement::draggable() const {
   // Image elements are draggable by default.
-  return !DeprecatedEqualIgnoringCase(getAttribute(draggableAttr), "false");
+  return !DeprecatedEqualIgnoringCase(getAttribute(kDraggableAttr), "false");
 }
 
 void HTMLImageElement::setHeight(unsigned value) {
-  SetUnsignedIntegralAttribute(heightAttr, value);
+  SetUnsignedIntegralAttribute(kHeightAttr, value);
 }
 
 IntSize HTMLImageElement::GetOverriddenIntrinsicSize() const {
@@ -609,20 +610,20 @@
 }
 
 KURL HTMLImageElement::Src() const {
-  return GetDocument().CompleteURL(getAttribute(srcAttr));
+  return GetDocument().CompleteURL(getAttribute(kSrcAttr));
 }
 
 void HTMLImageElement::SetSrc(const String& value) {
-  setAttribute(srcAttr, AtomicString(value));
+  setAttribute(kSrcAttr, AtomicString(value));
 }
 
 void HTMLImageElement::SetSrc(const USVStringOrTrustedURL& value,
                               ExceptionState& exception_state) {
-  setAttribute(srcAttr, value, exception_state);
+  setAttribute(kSrcAttr, value, exception_state);
 }
 
 void HTMLImageElement::setWidth(unsigned value) {
-  SetUnsignedIntegralAttribute(widthAttr, value);
+  SetUnsignedIntegralAttribute(kWidthAttr, value);
 }
 
 int HTMLImageElement::x() const {
@@ -663,10 +664,10 @@
 }
 
 bool HTMLImageElement::IsServerMap() const {
-  if (!FastHasAttribute(ismapAttr))
+  if (!FastHasAttribute(kIsmapAttr))
     return false;
 
-  const AtomicString& usemap = FastGetAttribute(usemapAttr);
+  const AtomicString& usemap = FastGetAttribute(kUsemapAttr);
 
   // If the usemap attribute starts with '#', it refers to a map element in
   // the document.
@@ -686,7 +687,7 @@
 }
 
 bool HTMLImageElement::IsInteractiveContent() const {
-  return FastHasAttribute(usemapAttr);
+  return FastHasAttribute(kUsemapAttr);
 }
 
 FloatSize HTMLImageElement::DefaultDestinationSize(
@@ -710,7 +711,7 @@
 static bool SourceSizeValue(const Element* element,
                             Document& current_document,
                             float& source_size) {
-  String sizes = element->FastGetAttribute(sizesAttr);
+  String sizes = element->FastGetAttribute(kSizesAttr);
   bool exists = !sizes.IsNull();
   if (exists)
     UseCounter::Count(current_document, WebFeature::kSizes);
@@ -750,7 +751,7 @@
   if (candidate.IsEmpty()) {
     candidate = BestFitSourceForImageAttributes(
         GetDocument().DevicePixelRatio(), SourceSize(*this),
-        FastGetAttribute(srcAttr), FastGetAttribute(srcsetAttr),
+        FastGetAttribute(kSrcAttr), FastGetAttribute(kSrcsetAttr),
         &GetDocument());
   }
   SetBestFitURLAndDPRFromImageCandidate(candidate);
diff --git a/third_party/blink/renderer/core/html/html_image_element_test.cc b/third_party/blink/renderer/core/html/html_image_element_test.cc
index d3683c93..1e3ae678 100644
--- a/third_party/blink/renderer/core/html/html_image_element_test.cc
+++ b/third_party/blink/renderer/core/html/html_image_element_test.cc
@@ -23,19 +23,19 @@
 
 TEST_F(HTMLImageElementTest, width) {
   auto* image = HTMLImageElement::Create(GetDocument());
-  image->setAttribute(HTMLNames::widthAttr, "400");
+  image->setAttribute(html_names::kWidthAttr, "400");
   // TODO(yoav): `width` does not impact resourceWidth until we resolve
   // https://github.com/ResponsiveImagesCG/picture-element/issues/268
   EXPECT_EQ(500, image->GetResourceWidth().width);
-  image->setAttribute(HTMLNames::sizesAttr, "100vw");
+  image->setAttribute(html_names::kSizesAttr, "100vw");
   EXPECT_EQ(500, image->GetResourceWidth().width);
 }
 
 TEST_F(HTMLImageElementTest, sourceSize) {
   auto* image = HTMLImageElement::Create(GetDocument());
-  image->setAttribute(HTMLNames::widthAttr, "400");
+  image->setAttribute(html_names::kWidthAttr, "400");
   EXPECT_EQ(kViewportWidth, image->SourceSize(*image));
-  image->setAttribute(HTMLNames::sizesAttr, "50vw");
+  image->setAttribute(html_names::kSizesAttr, "50vw");
   EXPECT_EQ(250, image->SourceSize(*image));
 }
 
diff --git a/third_party/blink/renderer/core/html/html_image_fallback_helper.cc b/third_party/blink/renderer/core/html/html_image_fallback_helper.cc
index 4801ad7..8f1f32cc 100644
--- a/third_party/blink/renderer/core/html/html_image_fallback_helper.cc
+++ b/third_party/blink/renderer/core/html/html_image_fallback_helper.cc
@@ -20,10 +20,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 static bool NoImageSourceSpecified(const Element& element) {
-  return element.getAttribute(srcAttr).IsEmpty();
+  return element.getAttribute(kSrcAttr).IsEmpty();
 }
 
 static bool ElementRepresentsNothing(const Element& element) {
@@ -52,22 +52,22 @@
 
   HTMLSpanElement* container = HTMLSpanElement::Create(element.GetDocument());
   root.AppendChild(container);
-  container->setAttribute(idAttr, AtomicString("alttext-container"));
+  container->setAttribute(kIdAttr, AtomicString("alttext-container"));
 
   HTMLImageElement* broken_image =
       HTMLImageElement::Create(element.GetDocument());
   container->AppendChild(broken_image);
   broken_image->SetIsFallbackImage();
-  broken_image->setAttribute(idAttr, AtomicString("alttext-image"));
-  broken_image->setAttribute(widthAttr, AtomicString("16"));
-  broken_image->setAttribute(heightAttr, AtomicString("16"));
-  broken_image->setAttribute(alignAttr, AtomicString("left"));
+  broken_image->setAttribute(kIdAttr, AtomicString("alttext-image"));
+  broken_image->setAttribute(kWidthAttr, AtomicString("16"));
+  broken_image->setAttribute(kHeightAttr, AtomicString("16"));
+  broken_image->setAttribute(kAlignAttr, AtomicString("left"));
   broken_image->SetInlineStyleProperty(CSSPropertyMargin, 0,
                                        CSSPrimitiveValue::UnitType::kPixels);
 
   HTMLSpanElement* alt_text = HTMLSpanElement::Create(element.GetDocument());
   container->AppendChild(alt_text);
-  alt_text->setAttribute(idAttr, AtomicString("alttext"));
+  alt_text->setAttribute(kIdAttr, AtomicString("alttext"));
 
   Text* text =
       Text::Create(element.GetDocument(), ToHTMLElement(element).AltText());
diff --git a/third_party/blink/renderer/core/html/html_image_loader.cc b/third_party/blink/renderer/core/html/html_image_loader.cc
index 8450c6a..2f906165 100644
--- a/third_party/blink/renderer/core/html/html_image_loader.cc
+++ b/third_party/blink/renderer/core/html/html_image_loader.cc
@@ -27,14 +27,11 @@
 #include "third_party/blink/renderer/core/html/html_image_element.h"
 #include "third_party/blink/renderer/core/html/html_object_element.h"
 #include "third_party/blink/renderer/core/html/parser/html_parser_idioms.h"
-#include "third_party/blink/renderer/core/html_names.h"
 #include "third_party/blink/renderer/core/loader/resource/image_resource_content.h"
 #include "third_party/blink/renderer/platform/loader/fetch/resource_loading_log.h"
 
 namespace blink {
 
-using namespace HTMLNames;
-
 HTMLImageLoader::HTMLImageLoader(Element* element) : ImageLoader(element) {}
 
 HTMLImageLoader::~HTMLImageLoader() = default;
diff --git a/third_party/blink/renderer/core/html/html_li_element.cc b/third_party/blink/renderer/core/html/html_li_element.cc
index 30f2e50b..7d2fc83 100644
--- a/third_party/blink/renderer/core/html/html_li_element.cc
+++ b/third_party/blink/renderer/core/html/html_li_element.cc
@@ -32,15 +32,15 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLLIElement::HTMLLIElement(Document& document)
-    : HTMLElement(liTag, document) {}
+    : HTMLElement(kLiTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLLIElement)
 
 bool HTMLLIElement::IsPresentationAttribute(const QualifiedName& name) const {
-  if (name == typeAttr)
+  if (name == kTypeAttr)
     return true;
   return HTMLElement::IsPresentationAttribute(name);
 }
@@ -71,7 +71,7 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == typeAttr) {
+  if (name == kTypeAttr) {
     CSSValueID type_value = ListTypeToCSSValueID(value);
     if (type_value != CSSValueInvalid)
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyListStyleType,
@@ -82,7 +82,7 @@
 }
 
 void HTMLLIElement::ParseAttribute(const AttributeModificationParams& params) {
-  if (params.name == valueAttr) {
+  if (params.name == kValueAttr) {
     if (ListItemOrdinal* ordinal = ListItemOrdinal::Get(*this))
       ParseValue(params.new_value, ordinal);
   } else {
@@ -113,7 +113,7 @@
     if (!list_node)
       ordinal->SetNotInList(true, *this);
 
-    ParseValue(FastGetAttribute(valueAttr), ordinal);
+    ParseValue(FastGetAttribute(kValueAttr), ordinal);
   }
 }
 
diff --git a/third_party/blink/renderer/core/html/html_link_element.cc b/third_party/blink/renderer/core/html/html_link_element.cc
index a1829233..68721591 100644
--- a/third_party/blink/renderer/core/html/html_link_element.cc
+++ b/third_party/blink/renderer/core/html/html_link_element.cc
@@ -47,14 +47,14 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLLinkElement::HTMLLinkElement(Document& document,
                                         const CreateElementFlags flags)
-    : HTMLElement(linkTag, document),
+    : HTMLElement(kLinkTag, document),
       link_loader_(LinkLoader::Create(this)),
       referrer_policy_(kReferrerPolicyDefault),
-      sizes_(DOMTokenList::Create(*this, HTMLNames::sizesAttr)),
+      sizes_(DOMTokenList::Create(*this, html_names::kSizesAttr)),
       rel_list_(RelList::Create(this)),
       created_by_parser_(flags.IsCreatedByParser()) {}
 
@@ -74,31 +74,31 @@
     const AttributeModificationParams& params) {
   const QualifiedName& name = params.name;
   const AtomicString& value = params.new_value;
-  if (name == relAttr) {
+  if (name == kRelAttr) {
     rel_attribute_ = LinkRelAttribute(value);
     if (rel_attribute_.IsImport()) {
       Deprecation::CountDeprecation(GetDocument(), WebFeature::kHTMLImports);
     }
     rel_list_->DidUpdateAttributeValue(params.old_value, value);
     Process();
-  } else if (name == hrefAttr) {
+  } else if (name == kHrefAttr) {
     // Log href attribute before logging resource fetching in process().
     LogUpdateAttributeIfIsolatedWorldAndInDocument("link", params);
     Process();
-  } else if (name == typeAttr) {
+  } else if (name == kTypeAttr) {
     type_ = value;
     Process();
-  } else if (name == asAttr) {
+  } else if (name == kAsAttr) {
     as_ = value;
     Process();
-  } else if (name == referrerpolicyAttr) {
+  } else if (name == kReferrerpolicyAttr) {
     if (!value.IsNull()) {
       SecurityPolicy::ReferrerPolicyFromString(
           value, kDoNotSupportReferrerPolicyLegacyKeywords, &referrer_policy_);
       UseCounter::Count(GetDocument(),
                         WebFeature::kHTMLLinkElementReferrerPolicyAttribute);
     }
-  } else if (name == sizesAttr) {
+  } else if (name == kSizesAttr) {
     sizes_->DidUpdateAttributeValue(params.old_value, value);
     WebVector<WebSize> web_icon_sizes =
         WebIconSizesParser::ParseIconSizes(value);
@@ -106,25 +106,25 @@
     for (wtf_size_t i = 0; i < icon_sizes_.size(); ++i)
       icon_sizes_[i] = web_icon_sizes[i];
     Process();
-  } else if (name == mediaAttr) {
+  } else if (name == kMediaAttr) {
     media_ = value.DeprecatedLower();
     Process();
-  } else if (name == scopeAttr) {
+  } else if (name == kScopeAttr) {
     scope_ = value;
     Process();
-  } else if (name == integrityAttr) {
+  } else if (name == kIntegrityAttr) {
     integrity_ = value;
-  } else if (name == importanceAttr &&
+  } else if (name == kImportanceAttr &&
              RuntimeEnabledFeatures::PriorityHintsEnabled()) {
     importance_ = value;
-  } else if (name == disabledAttr) {
+  } else if (name == kDisabledAttr) {
     UseCounter::Count(GetDocument(), WebFeature::kHTMLLinkElementDisabled);
     if (params.reason == AttributeModificationReason::kByParser)
       UseCounter::Count(GetDocument(), WebFeature::kHTMLLinkElementDisabledByParser);
     if (LinkStyle* link = GetLinkStyle())
       link->SetDisabledState(!value.IsNull());
   } else {
-    if (name == titleAttr) {
+    if (name == kTitleAttr) {
       if (LinkStyle* link = GetLinkStyle())
         link->SetSheetTitle(value);
     }
@@ -134,7 +134,7 @@
 }
 
 bool HTMLLinkElement::ShouldLoadLink() {
-  const KURL& href = GetNonEmptyURLAttribute(hrefAttr);
+  const KURL& href = GetNonEmptyURLAttribute(kHrefAttr);
   return (IsInDocumentTree() ||
           (isConnected() && rel_attribute_.IsStyleSheet())) &&
          !href.PotentiallyDanglingMarkup();
@@ -177,7 +177,7 @@
       link_ = LinkManifest::Create(this);
     } else {
       LinkStyle* link = LinkStyle::Create(this);
-      if (FastHasAttribute(disabledAttr)) {
+      if (FastHasAttribute(kDisabledAttr)) {
         UseCounter::Count(GetDocument(), WebFeature::kHTMLLinkElementDisabled);
         link->SetDisabledState(true);
       }
@@ -214,7 +214,7 @@
 Node::InsertionNotificationRequest HTMLLinkElement::InsertedInto(
     ContainerNode& insertion_point) {
   HTMLElement::InsertedInto(insertion_point);
-  LogAddElementIfIsolatedWorldAndInDocument("link", relAttr, hrefAttr);
+  LogAddElementIfIsolatedWorldAndInDocument("link", kRelAttr, kHrefAttr);
   if (!insertion_point.isConnected())
     return kInsertionDone;
   DCHECK(isConnected());
@@ -340,41 +340,41 @@
 }
 
 bool HTMLLinkElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName().LocalName() == hrefAttr ||
+  return attribute.GetName().LocalName() == kHrefAttr ||
          HTMLElement::IsURLAttribute(attribute);
 }
 
 bool HTMLLinkElement::HasLegalLinkAttribute(const QualifiedName& name) const {
-  return name == hrefAttr || HTMLElement::HasLegalLinkAttribute(name);
+  return name == kHrefAttr || HTMLElement::HasLegalLinkAttribute(name);
 }
 
 const QualifiedName& HTMLLinkElement::SubResourceAttributeName() const {
   // If the link element is not css, ignore it.
-  if (DeprecatedEqualIgnoringCase(getAttribute(typeAttr), "text/css")) {
+  if (DeprecatedEqualIgnoringCase(getAttribute(kTypeAttr), "text/css")) {
     // FIXME: Add support for extracting links of sub-resources which
     // are inside style-sheet such as @import, @font-face, url(), etc.
-    return hrefAttr;
+    return kHrefAttr;
   }
   return HTMLElement::SubResourceAttributeName();
 }
 
 KURL HTMLLinkElement::Href() const {
-  const String& url = getAttribute(hrefAttr);
+  const String& url = getAttribute(kHrefAttr);
   if (url.IsEmpty())
     return KURL();
   return GetDocument().CompleteURL(url);
 }
 
 const AtomicString& HTMLLinkElement::Rel() const {
-  return getAttribute(relAttr);
+  return getAttribute(kRelAttr);
 }
 
 const AtomicString& HTMLLinkElement::GetType() const {
-  return getAttribute(typeAttr);
+  return getAttribute(kTypeAttr);
 }
 
 bool HTMLLinkElement::Async() const {
-  return FastHasAttribute(HTMLNames::asyncAttr);
+  return FastHasAttribute(html_names::kAsyncAttr);
 }
 
 IconType HTMLLinkElement::GetIconType() const {
diff --git a/third_party/blink/renderer/core/html/html_link_element_sizes_attribute_test.cc b/third_party/blink/renderer/core/html/html_link_element_sizes_attribute_test.cc
index af088cc..5580251 100644
--- a/third_party/blink/renderer/core/html/html_link_element_sizes_attribute_test.cc
+++ b/third_party/blink/renderer/core/html/html_link_element_sizes_attribute_test.cc
@@ -20,7 +20,7 @@
   DOMTokenList* sizes = link->sizes();
   EXPECT_EQ(g_null_atom, sizes->value());
   sizes->setValue("   a b  c ");
-  EXPECT_EQ("   a b  c ", link->getAttribute(HTMLNames::sizesAttr));
+  EXPECT_EQ("   a b  c ", link->getAttribute(html_names::kSizesAttr));
   EXPECT_EQ("   a b  c ", sizes->value());
 }
 
@@ -31,7 +31,7 @@
       HTMLLinkElement::Create(*document, CreateElementFlags());
   DOMTokenList* sizes = link->sizes();
   EXPECT_EQ(g_null_atom, sizes->value());
-  link->setAttribute(HTMLNames::sizesAttr, "y  x ");
+  link->setAttribute(html_names::kSizesAttr, "y  x ");
   EXPECT_EQ("y  x ", sizes->value());
 }
 
diff --git a/third_party/blink/renderer/core/html/html_map_element.cc b/third_party/blink/renderer/core/html/html_map_element.cc
index d7eb120..f4dfd2d 100644
--- a/third_party/blink/renderer/core/html/html_map_element.cc
+++ b/third_party/blink/renderer/core/html/html_map_element.cc
@@ -33,10 +33,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLMapElement::HTMLMapElement(Document& document)
-    : HTMLElement(mapTag, document) {
+    : HTMLElement(kMapTag, document) {
   UseCounter::Count(document, WebFeature::kMapElement);
 }
 
@@ -66,7 +66,7 @@
     // beginning, which has to be stripped off.
     HTMLImageElement& image_element = ToHTMLImageElement(*curr);
     String use_map_name =
-        image_element.getAttribute(usemapAttr).GetString().Substring(1);
+        image_element.getAttribute(kUsemapAttr).GetString().Substring(1);
     if (use_map_name == name_)
       return &image_element;
   }
@@ -79,8 +79,8 @@
   // Either the id or name will be used depending on the order the attributes
   // are parsed.
 
-  if (params.name == idAttr || params.name == nameAttr) {
-    if (params.name == idAttr) {
+  if (params.name == kIdAttr || params.name == kNameAttr) {
+    if (params.name == kIdAttr) {
       // Call base class so that hasID bit gets set.
       HTMLElement::ParseAttribute(params);
       if (GetDocument().IsHTMLDocument())
diff --git a/third_party/blink/renderer/core/html/html_marquee_element.cc b/third_party/blink/renderer/core/html/html_marquee_element.cc
index c133071..b781931 100644
--- a/third_party/blink/renderer/core/html/html_marquee_element.cc
+++ b/third_party/blink/renderer/core/html/html_marquee_element.cc
@@ -52,7 +52,7 @@
 namespace blink {
 
 inline HTMLMarqueeElement::HTMLMarqueeElement(Document& document)
-    : HTMLElement(HTMLNames::marqueeTag, document) {
+    : HTMLElement(html_names::kMarqueeTag, document) {
   UseCounter::Count(document, WebFeature::kHTMLMarqueeElement);
 }
 
@@ -151,7 +151,7 @@
 
 unsigned HTMLMarqueeElement::scrollAmount() const {
   unsigned scroll_amount = 0;
-  AtomicString value = FastGetAttribute(HTMLNames::scrollamountAttr);
+  AtomicString value = FastGetAttribute(html_names::kScrollamountAttr);
   if (value.IsEmpty() || !ParseHTMLNonNegativeInteger(value, scroll_amount) ||
       scroll_amount > 0x7fffffffu)
     return kDefaultScrollAmount;
@@ -159,13 +159,13 @@
 }
 
 void HTMLMarqueeElement::setScrollAmount(unsigned value) {
-  SetUnsignedIntegralAttribute(HTMLNames::scrollamountAttr, value,
+  SetUnsignedIntegralAttribute(html_names::kScrollamountAttr, value,
                                kDefaultScrollAmount);
 }
 
 unsigned HTMLMarqueeElement::scrollDelay() const {
   unsigned scroll_delay = 0;
-  AtomicString value = FastGetAttribute(HTMLNames::scrolldelayAttr);
+  AtomicString value = FastGetAttribute(html_names::kScrolldelayAttr);
   if (value.IsEmpty() || !ParseHTMLNonNegativeInteger(value, scroll_delay) ||
       scroll_delay > 0x7fffffffu)
     return kDefaultScrollDelayMS;
@@ -173,13 +173,13 @@
 }
 
 void HTMLMarqueeElement::setScrollDelay(unsigned value) {
-  SetUnsignedIntegralAttribute(HTMLNames::scrolldelayAttr, value,
+  SetUnsignedIntegralAttribute(html_names::kScrolldelayAttr, value,
                                kDefaultScrollDelayMS);
 }
 
 int HTMLMarqueeElement::loop() const {
   bool ok;
-  int loop = FastGetAttribute(HTMLNames::loopAttr).ToInt(&ok);
+  int loop = FastGetAttribute(html_names::kLoopAttr).ToInt(&ok);
   if (!ok || loop <= 0)
     return kDefaultLoopLimit;
   return loop;
@@ -193,7 +193,7 @@
                                           ") is neither positive nor -1.");
     return;
   }
-  SetIntegralAttribute(HTMLNames::loopAttr, value);
+  SetIntegralAttribute(html_names::kLoopAttr, value);
 }
 
 void HTMLMarqueeElement::start() {
@@ -218,9 +218,9 @@
 
 bool HTMLMarqueeElement::IsPresentationAttribute(
     const QualifiedName& attr) const {
-  if (attr == HTMLNames::bgcolorAttr || attr == HTMLNames::heightAttr ||
-      attr == HTMLNames::hspaceAttr || attr == HTMLNames::vspaceAttr ||
-      attr == HTMLNames::widthAttr) {
+  if (attr == html_names::kBgcolorAttr || attr == html_names::kHeightAttr ||
+      attr == html_names::kHspaceAttr || attr == html_names::kVspaceAttr ||
+      attr == html_names::kWidthAttr) {
     return true;
   }
   return HTMLElement::IsPresentationAttribute(attr);
@@ -230,17 +230,17 @@
     const QualifiedName& attr,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (attr == HTMLNames::bgcolorAttr) {
+  if (attr == html_names::kBgcolorAttr) {
     AddHTMLColorToStyle(style, CSSPropertyBackgroundColor, value);
-  } else if (attr == HTMLNames::heightAttr) {
+  } else if (attr == html_names::kHeightAttr) {
     AddHTMLLengthToStyle(style, CSSPropertyHeight, value);
-  } else if (attr == HTMLNames::hspaceAttr) {
+  } else if (attr == html_names::kHspaceAttr) {
     AddHTMLLengthToStyle(style, CSSPropertyMarginLeft, value);
     AddHTMLLengthToStyle(style, CSSPropertyMarginRight, value);
-  } else if (attr == HTMLNames::vspaceAttr) {
+  } else if (attr == html_names::kVspaceAttr) {
     AddHTMLLengthToStyle(style, CSSPropertyMarginTop, value);
     AddHTMLLengthToStyle(style, CSSPropertyMarginBottom, value);
-  } else if (attr == HTMLNames::widthAttr) {
+  } else if (attr == html_names::kWidthAttr) {
     AddHTMLLengthToStyle(style, CSSPropertyWidth, value);
   } else {
     HTMLElement::CollectStyleForPresentationAttribute(attr, value, style);
@@ -290,7 +290,7 @@
   int scroll_amount = scrollAmount();
 
   if (scroll_delay < kMinimumScrollDelayMS &&
-      !FastHasAttribute(HTMLNames::truespeedAttr))
+      !FastHasAttribute(html_names::kTruespeedAttr))
     scroll_delay = kDefaultScrollDelayMS;
   double duration = 0;
   if (scroll_amount)
@@ -328,7 +328,7 @@
 }
 
 HTMLMarqueeElement::Behavior HTMLMarqueeElement::GetBehavior() const {
-  const AtomicString& behavior = FastGetAttribute(HTMLNames::behaviorAttr);
+  const AtomicString& behavior = FastGetAttribute(html_names::kBehaviorAttr);
   if (EqualIgnoringASCIICase(behavior, "alternate"))
     return kAlternate;
   if (EqualIgnoringASCIICase(behavior, "slide"))
@@ -337,7 +337,7 @@
 }
 
 HTMLMarqueeElement::Direction HTMLMarqueeElement::GetDirection() const {
-  const AtomicString& direction = FastGetAttribute(HTMLNames::directionAttr);
+  const AtomicString& direction = FastGetAttribute(html_names::kDirectionAttr);
   if (EqualIgnoringASCIICase(direction, "down"))
     return kDown;
   if (EqualIgnoringASCIICase(direction, "up"))
diff --git a/third_party/blink/renderer/core/html/html_menu_element.cc b/third_party/blink/renderer/core/html/html_menu_element.cc
index 41ee6c9a..784d144b 100644
--- a/third_party/blink/renderer/core/html/html_menu_element.cc
+++ b/third_party/blink/renderer/core/html/html_menu_element.cc
@@ -26,10 +26,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLMenuElement::HTMLMenuElement(Document& document)
-    : HTMLElement(menuTag, document) {}
+    : HTMLElement(kMenuTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLMenuElement)
 
diff --git a/third_party/blink/renderer/core/html/html_meta_element.cc b/third_party/blink/renderer/core/html/html_meta_element.cc
index 8f10ad6f..1c67a206 100644
--- a/third_party/blink/renderer/core/html/html_meta_element.cc
+++ b/third_party/blink/renderer/core/html/html_meta_element.cc
@@ -39,10 +39,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLMetaElement::HTMLMetaElement(Document& document)
-    : HTMLElement(metaTag, document) {}
+    : HTMLElement(kMetaTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLMetaElement)
 
@@ -474,12 +474,12 @@
 
 void HTMLMetaElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == http_equivAttr || params.name == contentAttr) {
+  if (params.name == kHttpEquivAttr || params.name == kContentAttr) {
     Process();
     return;
   }
 
-  if (params.name != nameAttr)
+  if (params.name != kNameAttr)
     HTMLElement::ParseAttribute(params);
 }
 
@@ -506,11 +506,11 @@
 
   // All below situations require a content attribute (which can be the empty
   // string).
-  const AtomicString& content_value = FastGetAttribute(contentAttr);
+  const AtomicString& content_value = FastGetAttribute(kContentAttr);
   if (content_value.IsNull())
     return;
 
-  const AtomicString& name_value = FastGetAttribute(nameAttr);
+  const AtomicString& name_value = FastGetAttribute(kNameAttr);
   if (!name_value.IsEmpty()) {
     if (DeprecatedEqualIgnoringCase(name_value, "viewport"))
       ProcessViewportContentAttribute(content_value,
@@ -535,7 +535,7 @@
   // tree (changing a meta tag while it's not in the tree shouldn't have any
   // effect on the document).
 
-  const AtomicString& http_equiv_value = FastGetAttribute(http_equivAttr);
+  const AtomicString& http_equiv_value = FastGetAttribute(kHttpEquivAttr);
   if (http_equiv_value.IsEmpty())
     return;
 
@@ -552,11 +552,11 @@
 }
 
 const AtomicString& HTMLMetaElement::Content() const {
-  return getAttribute(contentAttr);
+  return getAttribute(kContentAttr);
 }
 
 const AtomicString& HTMLMetaElement::HttpEquiv() const {
-  return getAttribute(http_equivAttr);
+  return getAttribute(kHttpEquivAttr);
 }
 
 const AtomicString& HTMLMetaElement::GetName() const {
diff --git a/third_party/blink/renderer/core/html/html_meter_element.cc b/third_party/blink/renderer/core/html/html_meter_element.cc
index b4a7f84..5b84980c 100644
--- a/third_party/blink/renderer/core/html/html_meter_element.cc
+++ b/third_party/blink/renderer/core/html/html_meter_element.cc
@@ -32,10 +32,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 HTMLMeterElement::HTMLMeterElement(Document& document)
-    : LabelableElement(meterTag, document) {
+    : LabelableElement(kMeterTag, document) {
   UseCounter::Count(document, WebFeature::kMeterElement);
 }
 
@@ -66,64 +66,64 @@
 void HTMLMeterElement::ParseAttribute(
     const AttributeModificationParams& params) {
   const QualifiedName& name = params.name;
-  if (name == valueAttr || name == minAttr || name == maxAttr ||
-      name == lowAttr || name == highAttr || name == optimumAttr)
+  if (name == kValueAttr || name == kMinAttr || name == kMaxAttr ||
+      name == kLowAttr || name == kHighAttr || name == kOptimumAttr)
     DidElementStateChange();
   else
     LabelableElement::ParseAttribute(params);
 }
 
 double HTMLMeterElement::value() const {
-  double value = GetFloatingPointAttribute(valueAttr, 0);
+  double value = GetFloatingPointAttribute(kValueAttr, 0);
   return std::min(std::max(value, min()), max());
 }
 
 void HTMLMeterElement::setValue(double value) {
-  SetFloatingPointAttribute(valueAttr, value);
+  SetFloatingPointAttribute(kValueAttr, value);
 }
 
 double HTMLMeterElement::min() const {
-  return GetFloatingPointAttribute(minAttr, 0);
+  return GetFloatingPointAttribute(kMinAttr, 0);
 }
 
 void HTMLMeterElement::setMin(double min) {
-  SetFloatingPointAttribute(minAttr, min);
+  SetFloatingPointAttribute(kMinAttr, min);
 }
 
 double HTMLMeterElement::max() const {
-  return std::max(GetFloatingPointAttribute(maxAttr, std::max(1.0, min())),
+  return std::max(GetFloatingPointAttribute(kMaxAttr, std::max(1.0, min())),
                   min());
 }
 
 void HTMLMeterElement::setMax(double max) {
-  SetFloatingPointAttribute(maxAttr, max);
+  SetFloatingPointAttribute(kMaxAttr, max);
 }
 
 double HTMLMeterElement::low() const {
-  double low = GetFloatingPointAttribute(lowAttr, min());
+  double low = GetFloatingPointAttribute(kLowAttr, min());
   return std::min(std::max(low, min()), max());
 }
 
 void HTMLMeterElement::setLow(double low) {
-  SetFloatingPointAttribute(lowAttr, low);
+  SetFloatingPointAttribute(kLowAttr, low);
 }
 
 double HTMLMeterElement::high() const {
-  double high = GetFloatingPointAttribute(highAttr, max());
+  double high = GetFloatingPointAttribute(kHighAttr, max());
   return std::min(std::max(high, low()), max());
 }
 
 void HTMLMeterElement::setHigh(double high) {
-  SetFloatingPointAttribute(highAttr, high);
+  SetFloatingPointAttribute(kHighAttr, high);
 }
 
 double HTMLMeterElement::optimum() const {
-  double optimum = GetFloatingPointAttribute(optimumAttr, (max() + min()) / 2);
+  double optimum = GetFloatingPointAttribute(kOptimumAttr, (max() + min()) / 2);
   return std::min(std::max(optimum, min()), max());
 }
 
 void HTMLMeterElement::setOptimum(double optimum) {
-  SetFloatingPointAttribute(optimumAttr, optimum);
+  SetFloatingPointAttribute(kOptimumAttr, optimum);
 }
 
 HTMLMeterElement::GaugeRegion HTMLMeterElement::GetGaugeRegion() const {
diff --git a/third_party/blink/renderer/core/html/html_mod_element.cc b/third_party/blink/renderer/core/html/html_mod_element.cc
index a06b1fc..4087cbd 100644
--- a/third_party/blink/renderer/core/html/html_mod_element.cc
+++ b/third_party/blink/renderer/core/html/html_mod_element.cc
@@ -26,7 +26,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLModElement::HTMLModElement(const QualifiedName& tag_name,
                                       Document& document)
@@ -35,16 +35,16 @@
 DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLModElement)
 
 bool HTMLModElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName() == citeAttr ||
+  return attribute.GetName() == kCiteAttr ||
          HTMLElement::IsURLAttribute(attribute);
 }
 
 bool HTMLModElement::HasLegalLinkAttribute(const QualifiedName& name) const {
-  return name == citeAttr || HTMLElement::HasLegalLinkAttribute(name);
+  return name == kCiteAttr || HTMLElement::HasLegalLinkAttribute(name);
 }
 
 const QualifiedName& HTMLModElement::SubResourceAttributeName() const {
-  return citeAttr;
+  return kCiteAttr;
 }
 
 }  // namespace blink
diff --git a/third_party/blink/renderer/core/html/html_no_embed_element.cc b/third_party/blink/renderer/core/html/html_no_embed_element.cc
index fbd4e2eb..b2ac3a0 100644
--- a/third_party/blink/renderer/core/html/html_no_embed_element.cc
+++ b/third_party/blink/renderer/core/html/html_no_embed_element.cc
@@ -37,10 +37,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLNoEmbedElement::HTMLNoEmbedElement(Document& document)
-    : HTMLElement(noembedTag, document) {}
+    : HTMLElement(kNoembedTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLNoEmbedElement)
 
diff --git a/third_party/blink/renderer/core/html/html_no_script_element.cc b/third_party/blink/renderer/core/html/html_no_script_element.cc
index d3fb75d..3d9e5cd2 100644
--- a/third_party/blink/renderer/core/html/html_no_script_element.cc
+++ b/third_party/blink/renderer/core/html/html_no_script_element.cc
@@ -37,10 +37,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLNoScriptElement::HTMLNoScriptElement(Document& document)
-    : HTMLElement(noscriptTag, document) {}
+    : HTMLElement(kNoscriptTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLNoScriptElement)
 
diff --git a/third_party/blink/renderer/core/html/html_object_element.cc b/third_party/blink/renderer/core/html/html_object_element.cc
index 4c426d81..e16656b 100644
--- a/third_party/blink/renderer/core/html/html_object_element.cc
+++ b/third_party/blink/renderer/core/html/html_object_element.cc
@@ -45,11 +45,11 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLObjectElement::HTMLObjectElement(Document& document,
                                             const CreateElementFlags flags)
-    : HTMLPlugInElement(objectTag,
+    : HTMLPlugInElement(kObjectTag,
                         document,
                         flags,
                         kShouldNotPreferPlugInsForImages),
@@ -84,7 +84,7 @@
 
 bool HTMLObjectElement::IsPresentationAttribute(
     const QualifiedName& name) const {
-  if (name == borderAttr)
+  if (name == kBorderAttr)
     return true;
   return HTMLPlugInElement::IsPresentationAttribute(name);
 }
@@ -93,7 +93,7 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == borderAttr)
+  if (name == kBorderAttr)
     ApplyBorderAttributeToStyle(value, style);
   else
     HTMLPlugInElement::CollectStyleForPresentationAttribute(name, value, style);
@@ -102,9 +102,9 @@
 void HTMLObjectElement::ParseAttribute(
     const AttributeModificationParams& params) {
   const QualifiedName& name = params.name;
-  if (name == formAttr) {
+  if (name == kFormAttr) {
     FormAttributeChanged();
-  } else if (name == typeAttr) {
+  } else if (name == kTypeAttr) {
     SetServiceType(params.new_value.LowerASCII());
     wtf_size_t pos = service_type_.Find(";");
     if (pos != kNotFound)
@@ -113,7 +113,7 @@
     // Should we suppress the reload stuff when a persistable widget-type is
     // specified?
     ReloadPluginOnAttributeChange(name);
-  } else if (name == dataAttr) {
+  } else if (name == kDataAttr) {
     SetUrl(StripLeadingAndTrailingHTMLSpaces(params.new_value));
     if (GetLayoutObject() && IsImageType()) {
       SetNeedsPluginUpdate(true);
@@ -123,7 +123,7 @@
     } else {
       ReloadPluginOnAttributeChange(name);
     }
-  } else if (name == classidAttr) {
+  } else if (name == kClassidAttr) {
     class_id_ = params.new_value;
     ReloadPluginOnAttributeChange(name);
   } else {
@@ -224,12 +224,12 @@
   // the updating of certain attributes should bring about "redetermination"
   // of what the element contains.
   bool needs_invalidation;
-  if (name == typeAttr) {
+  if (name == kTypeAttr) {
     needs_invalidation =
-        !FastHasAttribute(classidAttr) && !FastHasAttribute(dataAttr);
-  } else if (name == dataAttr) {
-    needs_invalidation = !FastHasAttribute(classidAttr);
-  } else if (name == classidAttr) {
+        !FastHasAttribute(kClassidAttr) && !FastHasAttribute(kDataAttr);
+  } else if (name == kDataAttr) {
+    needs_invalidation = !FastHasAttribute(kClassidAttr);
+  } else if (name == kClassidAttr) {
     needs_invalidation = true;
   } else {
     NOTREACHED();
@@ -316,23 +316,23 @@
 }
 
 bool HTMLObjectElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName() == codebaseAttr ||
-         attribute.GetName() == dataAttr ||
-         (attribute.GetName() == usemapAttr && attribute.Value()[0] != '#') ||
+  return attribute.GetName() == kCodebaseAttr ||
+         attribute.GetName() == kDataAttr ||
+         (attribute.GetName() == kUsemapAttr && attribute.Value()[0] != '#') ||
          HTMLPlugInElement::IsURLAttribute(attribute);
 }
 
 bool HTMLObjectElement::HasLegalLinkAttribute(const QualifiedName& name) const {
-  return name == classidAttr || name == dataAttr || name == codebaseAttr ||
+  return name == kClassidAttr || name == kDataAttr || name == kCodebaseAttr ||
          HTMLPlugInElement::HasLegalLinkAttribute(name);
 }
 
 const QualifiedName& HTMLObjectElement::SubResourceAttributeName() const {
-  return dataAttr;
+  return kDataAttr;
 }
 
 const AtomicString HTMLObjectElement::ImageSourceURL() const {
-  return getAttribute(dataAttr);
+  return getAttribute(kDataAttr);
 }
 
 void HTMLObjectElement::ReattachFallbackContent() {
@@ -387,14 +387,14 @@
 }
 
 bool HTMLObjectElement::ContainsJavaApplet() const {
-  if (MIMETypeRegistry::IsJavaAppletMIMEType(getAttribute(typeAttr)))
+  if (MIMETypeRegistry::IsJavaAppletMIMEType(getAttribute(kTypeAttr)))
     return true;
 
   for (HTMLElement& child : Traversal<HTMLElement>::ChildrenOf(*this)) {
     if (IsHTMLParamElement(child) &&
         DeprecatedEqualIgnoringCase(child.GetNameAttribute(), "type") &&
         MIMETypeRegistry::IsJavaAppletMIMEType(
-            child.getAttribute(valueAttr).GetString()))
+            child.getAttribute(kValueAttr).GetString()))
       return true;
     if (IsHTMLObjectElement(child) &&
         ToHTMLObjectElement(child).ContainsJavaApplet())
@@ -414,7 +414,7 @@
 }
 
 bool HTMLObjectElement::IsInteractiveContent() const {
-  return FastHasAttribute(usemapAttr);
+  return FastHasAttribute(kUsemapAttr);
 }
 
 bool HTMLObjectElement::UseFallbackContent() const {
@@ -437,7 +437,7 @@
   // We need to assert after the cast because ListedElement doesn't
   // have hasTagName.
   SECURITY_DCHECK(!object_element ||
-                  object_element->HasTagName(HTMLNames::objectTag));
+                  object_element->HasTagName(html_names::kObjectTag));
   return object_element;
 }
 
diff --git a/third_party/blink/renderer/core/html/html_olist_element.cc b/third_party/blink/renderer/core/html/html_olist_element.cc
index cf91df7..78fe970 100644
--- a/third_party/blink/renderer/core/html/html_olist_element.cc
+++ b/third_party/blink/renderer/core/html/html_olist_element.cc
@@ -32,10 +32,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLOListElement::HTMLOListElement(Document& document)
-    : HTMLElement(olTag, document),
+    : HTMLElement(kOlTag, document),
       start_(0xBADBEEF),
       item_count_(0),
       has_explicit_start_(false),
@@ -46,7 +46,7 @@
 
 bool HTMLOListElement::IsPresentationAttribute(
     const QualifiedName& name) const {
-  if (name == typeAttr)
+  if (name == kTypeAttr)
     return true;
   return HTMLElement::IsPresentationAttribute(name);
 }
@@ -55,7 +55,7 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == typeAttr) {
+  if (name == kTypeAttr) {
     if (value == "a")
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyListStyleType,
                                               CSSValueLowerAlpha);
@@ -78,7 +78,7 @@
 
 void HTMLOListElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == startAttr) {
+  if (params.name == kStartAttr) {
     int old_start = StartConsideringItemCount();
     int parsed_start = 0;
     bool can_parse = ParseHTMLInteger(params.new_value, parsed_start);
@@ -87,7 +87,7 @@
     if (old_start == StartConsideringItemCount())
       return;
     UpdateItemValues();
-  } else if (params.name == reversedAttr) {
+  } else if (params.name == kReversedAttr) {
     bool reversed = !params.new_value.IsNull();
     if (reversed == is_reversed_)
       return;
@@ -99,7 +99,7 @@
 }
 
 void HTMLOListElement::setStart(int start) {
-  SetIntegralAttribute(startAttr, start);
+  SetIntegralAttribute(kStartAttr, start);
 }
 
 void HTMLOListElement::UpdateItemValues() {
diff --git a/third_party/blink/renderer/core/html/html_paragraph_element.cc b/third_party/blink/renderer/core/html/html_paragraph_element.cc
index b38c624..3fc9ec4 100644
--- a/third_party/blink/renderer/core/html/html_paragraph_element.cc
+++ b/third_party/blink/renderer/core/html/html_paragraph_element.cc
@@ -28,10 +28,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLParagraphElement::HTMLParagraphElement(Document& document)
-    : HTMLElement(pTag, document) {}
+    : HTMLElement(kPTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLParagraphElement)
 
@@ -39,7 +39,7 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == alignAttr) {
+  if (name == kAlignAttr) {
     if (DeprecatedEqualIgnoringCase(value, "middle") ||
         DeprecatedEqualIgnoringCase(value, "center"))
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyTextAlign,
diff --git a/third_party/blink/renderer/core/html/html_param_element.cc b/third_party/blink/renderer/core/html/html_param_element.cc
index f896142a..c910bed 100644
--- a/third_party/blink/renderer/core/html/html_param_element.cc
+++ b/third_party/blink/renderer/core/html/html_param_element.cc
@@ -28,10 +28,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLParamElement::HTMLParamElement(Document& document)
-    : HTMLElement(paramTag, document) {}
+    : HTMLElement(kParamTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLParamElement)
 
@@ -42,7 +42,7 @@
 }
 
 const AtomicString& HTMLParamElement::Value() const {
-  return FastGetAttribute(valueAttr);
+  return FastGetAttribute(kValueAttr);
 }
 
 // HTML5 says that an object resource's URL is specified by the object's
@@ -58,7 +58,7 @@
 }
 
 bool HTMLParamElement::IsURLAttribute(const Attribute& attribute) const {
-  if (attribute.GetName() == valueAttr && IsURLParameter(GetName()))
+  if (attribute.GetName() == kValueAttr && IsURLParameter(GetName()))
     return true;
   return HTMLElement::IsURLAttribute(attribute);
 }
diff --git a/third_party/blink/renderer/core/html/html_picture_element.cc b/third_party/blink/renderer/core/html/html_picture_element.cc
index acabeb3..a2bf86e 100644
--- a/third_party/blink/renderer/core/html/html_picture_element.cc
+++ b/third_party/blink/renderer/core/html/html_picture_element.cc
@@ -13,10 +13,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLPictureElement::HTMLPictureElement(Document& document)
-    : HTMLElement(pictureTag, document) {}
+    : HTMLElement(kPictureTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLPictureElement)
 
diff --git a/third_party/blink/renderer/core/html/html_plugin_element.cc b/third_party/blink/renderer/core/html/html_plugin_element.cc
index 228c40c9..16fd671 100644
--- a/third_party/blink/renderer/core/html/html_plugin_element.cc
+++ b/third_party/blink/renderer/core/html/html_plugin_element.cc
@@ -57,7 +57,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 namespace {
 
@@ -408,8 +408,8 @@
 
 bool HTMLPlugInElement::IsPresentationAttribute(
     const QualifiedName& name) const {
-  if (name == widthAttr || name == heightAttr || name == vspaceAttr ||
-      name == hspaceAttr || name == alignAttr)
+  if (name == kWidthAttr || name == kHeightAttr || name == kVspaceAttr ||
+      name == kHspaceAttr || name == kAlignAttr)
     return true;
   return HTMLFrameOwnerElement::IsPresentationAttribute(name);
 }
@@ -418,17 +418,17 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == widthAttr) {
+  if (name == kWidthAttr) {
     AddHTMLLengthToStyle(style, CSSPropertyWidth, value);
-  } else if (name == heightAttr) {
+  } else if (name == kHeightAttr) {
     AddHTMLLengthToStyle(style, CSSPropertyHeight, value);
-  } else if (name == vspaceAttr) {
+  } else if (name == kVspaceAttr) {
     AddHTMLLengthToStyle(style, CSSPropertyMarginTop, value);
     AddHTMLLengthToStyle(style, CSSPropertyMarginBottom, value);
-  } else if (name == hspaceAttr) {
+  } else if (name == kHspaceAttr) {
     AddHTMLLengthToStyle(style, CSSPropertyMarginLeft, value);
     AddHTMLLengthToStyle(style, CSSPropertyMarginRight, value);
-  } else if (name == alignAttr) {
+  } else if (name == kAlignAttr) {
     ApplyAlignmentAttributeToStyle(value, style);
   } else {
     HTMLFrameOwnerElement::CollectStyleForPresentationAttribute(name, value,
@@ -657,7 +657,7 @@
   if (MIMETypeRegistry::IsJavaAppletMIMEType(mime_type))
     return false;
 
-  AtomicString declared_mime_type = FastGetAttribute(HTMLNames::typeAttr);
+  AtomicString declared_mime_type = FastGetAttribute(html_names::kTypeAttr);
   if (!GetDocument().GetContentSecurityPolicy()->AllowObjectFromSource(url) ||
       !GetDocument().GetContentSecurityPolicy()->AllowPluginTypeForDocument(
           GetDocument(), mime_type, declared_mime_type, url)) {
diff --git a/third_party/blink/renderer/core/html/html_pre_element.cc b/third_party/blink/renderer/core/html/html_pre_element.cc
index 9167f29..4cf0916 100644
--- a/third_party/blink/renderer/core/html/html_pre_element.cc
+++ b/third_party/blink/renderer/core/html/html_pre_element.cc
@@ -29,7 +29,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLPreElement::HTMLPreElement(const QualifiedName& tag_name,
                                       Document& document)
@@ -38,7 +38,7 @@
 DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLPreElement)
 
 bool HTMLPreElement::IsPresentationAttribute(const QualifiedName& name) const {
-  if (name == wrapAttr)
+  if (name == kWrapAttr)
     return true;
   return HTMLElement::IsPresentationAttribute(name);
 }
@@ -47,7 +47,7 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == wrapAttr)
+  if (name == kWrapAttr)
     style->SetProperty(CSSPropertyWhiteSpace, CSSValuePreWrap);
   else
     HTMLElement::CollectStyleForPresentationAttribute(name, value, style);
diff --git a/third_party/blink/renderer/core/html/html_progress_element.cc b/third_party/blink/renderer/core/html/html_progress_element.cc
index d18eaed..2d3ab2d 100644
--- a/third_party/blink/renderer/core/html/html_progress_element.cc
+++ b/third_party/blink/renderer/core/html/html_progress_element.cc
@@ -30,13 +30,13 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 const double HTMLProgressElement::kIndeterminatePosition = -1;
 const double HTMLProgressElement::kInvalidPosition = -2;
 
 HTMLProgressElement::HTMLProgressElement(Document& document)
-    : LabelableElement(progressTag, document), value_(nullptr) {
+    : LabelableElement(kProgressTag, document), value_(nullptr) {
   UseCounter::Count(document, WebFeature::kProgressElement);
 }
 
@@ -68,11 +68,11 @@
 
 void HTMLProgressElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == valueAttr) {
+  if (params.name == kValueAttr) {
     if (params.old_value.IsNull() != params.new_value.IsNull())
       PseudoStateChanged(CSSSelector::kPseudoIndeterminate);
     DidElementStateChange();
-  } else if (params.name == maxAttr) {
+  } else if (params.name == kMaxAttr) {
     DidElementStateChange();
   } else {
     LabelableElement::ParseAttribute(params);
@@ -86,7 +86,7 @@
 }
 
 double HTMLProgressElement::value() const {
-  double value = GetFloatingPointAttribute(valueAttr);
+  double value = GetFloatingPointAttribute(kValueAttr);
   // Otherwise, if the parsed value was greater than or equal to the maximum
   // value, then the current value of the progress bar is the maximum value
   // of the progress bar. Otherwise, if parsing the value attribute's value
@@ -96,11 +96,11 @@
 }
 
 void HTMLProgressElement::setValue(double value) {
-  SetFloatingPointAttribute(valueAttr, std::max(value, 0.));
+  SetFloatingPointAttribute(kValueAttr, std::max(value, 0.));
 }
 
 double HTMLProgressElement::max() const {
-  double max = GetFloatingPointAttribute(maxAttr);
+  double max = GetFloatingPointAttribute(kMaxAttr);
   // Otherwise, if the element has no max attribute, or if it has one but
   // parsing it resulted in an error, or if the parsed value was less than or
   // equal to zero, then the maximum value of the progress bar is 1.0.
@@ -110,7 +110,7 @@
 void HTMLProgressElement::setMax(double max) {
   // FIXME: The specification says we should ignore the input value if it is
   // inferior or equal to 0.
-  SetFloatingPointAttribute(maxAttr, max > 0 ? max : 1);
+  SetFloatingPointAttribute(kMaxAttr, max > 0 ? max : 1);
 }
 
 double HTMLProgressElement::position() const {
@@ -120,7 +120,7 @@
 }
 
 bool HTMLProgressElement::IsDeterminate() const {
-  return FastHasAttribute(valueAttr);
+  return FastHasAttribute(kValueAttr);
 }
 
 void HTMLProgressElement::DidElementStateChange() {
diff --git a/third_party/blink/renderer/core/html/html_quote_element.cc b/third_party/blink/renderer/core/html/html_quote_element.cc
index 95e843b..8d9fe5eb 100644
--- a/third_party/blink/renderer/core/html/html_quote_element.cc
+++ b/third_party/blink/renderer/core/html/html_quote_element.cc
@@ -27,27 +27,27 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLQuoteElement::HTMLQuoteElement(const QualifiedName& tag_name,
                                           Document& document)
     : HTMLElement(tag_name, document) {
-  DCHECK(HasTagName(qTag) || HasTagName(blockquoteTag));
+  DCHECK(HasTagName(kQTag) || HasTagName(kBlockquoteTag));
 }
 
 DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLQuoteElement)
 
 bool HTMLQuoteElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName() == citeAttr ||
+  return attribute.GetName() == kCiteAttr ||
          HTMLElement::IsURLAttribute(attribute);
 }
 
 bool HTMLQuoteElement::HasLegalLinkAttribute(const QualifiedName& name) const {
-  return name == citeAttr || HTMLElement::HasLegalLinkAttribute(name);
+  return name == kCiteAttr || HTMLElement::HasLegalLinkAttribute(name);
 }
 
 const QualifiedName& HTMLQuoteElement::SubResourceAttributeName() const {
-  return citeAttr;
+  return kCiteAttr;
 }
 
 }  // namespace blink
diff --git a/third_party/blink/renderer/core/html/html_quote_element.h b/third_party/blink/renderer/core/html/html_quote_element.h
index 14df03e..f2eb658 100644
--- a/third_party/blink/renderer/core/html/html_quote_element.h
+++ b/third_party/blink/renderer/core/html/html_quote_element.h
@@ -44,8 +44,8 @@
 };
 
 inline bool IsHTMLQuoteElement(const HTMLElement& element) {
-  return element.HasTagName(HTMLNames::qTag) ||
-         element.HasTagName(HTMLNames::blockquoteTag);
+  return element.HasTagName(html_names::kQTag) ||
+         element.HasTagName(html_names::kBlockquoteTag);
 }
 
 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLQuoteElement);
diff --git a/third_party/blink/renderer/core/html/html_rt_element.cc b/third_party/blink/renderer/core/html/html_rt_element.cc
index 8a643c1a..a115a3d 100644
--- a/third_party/blink/renderer/core/html/html_rt_element.cc
+++ b/third_party/blink/renderer/core/html/html_rt_element.cc
@@ -9,10 +9,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLRTElement::HTMLRTElement(Document& document)
-    : HTMLElement(rtTag, document) {}
+    : HTMLElement(kRtTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLRTElement)
 
diff --git a/third_party/blink/renderer/core/html/html_ruby_element.cc b/third_party/blink/renderer/core/html/html_ruby_element.cc
index 6a8fa40e..3856164 100644
--- a/third_party/blink/renderer/core/html/html_ruby_element.cc
+++ b/third_party/blink/renderer/core/html/html_ruby_element.cc
@@ -9,10 +9,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLRubyElement::HTMLRubyElement(Document& document)
-    : HTMLElement(rubyTag, document) {}
+    : HTMLElement(kRubyTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLRubyElement)
 
diff --git a/third_party/blink/renderer/core/html/html_script_element.cc b/third_party/blink/renderer/core/html/html_script_element.cc
index 4d4a077c..ff9981df 100644
--- a/third_party/blink/renderer/core/html/html_script_element.cc
+++ b/third_party/blink/renderer/core/html/html_script_element.cc
@@ -38,11 +38,11 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLScriptElement::HTMLScriptElement(Document& document,
                                             const CreateElementFlags flags)
-    : HTMLElement(scriptTag, document),
+    : HTMLElement(kScriptTag, document),
       loader_(InitializeScriptLoader(flags.IsCreatedByParser(),
                                      flags.WasAlreadyStarted())) {}
 
@@ -58,16 +58,16 @@
 }
 
 bool HTMLScriptElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName() == srcAttr ||
+  return attribute.GetName() == kSrcAttr ||
          HTMLElement::IsURLAttribute(attribute);
 }
 
 bool HTMLScriptElement::HasLegalLinkAttribute(const QualifiedName& name) const {
-  return name == srcAttr || HTMLElement::HasLegalLinkAttribute(name);
+  return name == kSrcAttr || HTMLElement::HasLegalLinkAttribute(name);
 }
 
 const QualifiedName& HTMLScriptElement::SubResourceAttributeName() const {
-  return srcAttr;
+  return kSrcAttr;
 }
 
 void HTMLScriptElement::ChildrenChanged(const ChildrenChange& change) {
@@ -83,10 +83,10 @@
 
 void HTMLScriptElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == srcAttr) {
+  if (params.name == kSrcAttr) {
     loader_->HandleSourceAttribute(params.new_value);
     LogUpdateAttributeIfIsolatedWorldAndInDocument("script", params);
-  } else if (params.name == asyncAttr) {
+  } else if (params.name == kAsyncAttr) {
     loader_->HandleAsyncAttribute();
   } else {
     HTMLElement::ParseAttribute(params);
@@ -104,7 +104,7 @@
                       WebFeature::kScriptElementWithInvalidTypeHasSrc);
   }
   HTMLElement::InsertedInto(insertion_point);
-  LogAddElementIfIsolatedWorldAndInDocument("script", srcAttr);
+  LogAddElementIfIsolatedWorldAndInDocument("script", kSrcAttr);
 
   return kInsertionShouldCallDidNotifySubtreeInsertions;
 }
@@ -118,12 +118,12 @@
 }
 
 void HTMLScriptElement::setAsync(bool async) {
-  SetBooleanAttribute(asyncAttr, async);
+  SetBooleanAttribute(kAsyncAttr, async);
   loader_->HandleAsyncAttribute();
 }
 
 bool HTMLScriptElement::async() const {
-  return FastHasAttribute(asyncAttr) || loader_->IsNonBlocking();
+  return FastHasAttribute(kAsyncAttr) || loader_->IsNonBlocking();
 }
 
 KURL HTMLScriptElement::Src() const {
@@ -131,43 +131,43 @@
 }
 
 String HTMLScriptElement::SourceAttributeValue() const {
-  return getAttribute(srcAttr).GetString();
+  return getAttribute(kSrcAttr).GetString();
 }
 
 String HTMLScriptElement::CharsetAttributeValue() const {
-  return getAttribute(charsetAttr).GetString();
+  return getAttribute(kCharsetAttr).GetString();
 }
 
 String HTMLScriptElement::TypeAttributeValue() const {
-  return getAttribute(typeAttr).GetString();
+  return getAttribute(kTypeAttr).GetString();
 }
 
 String HTMLScriptElement::LanguageAttributeValue() const {
-  return getAttribute(languageAttr).GetString();
+  return getAttribute(kLanguageAttr).GetString();
 }
 
 bool HTMLScriptElement::NomoduleAttributeValue() const {
-  return FastHasAttribute(nomoduleAttr);
+  return FastHasAttribute(kNomoduleAttr);
 }
 
 String HTMLScriptElement::ForAttributeValue() const {
-  return getAttribute(forAttr).GetString();
+  return getAttribute(kForAttr).GetString();
 }
 
 String HTMLScriptElement::EventAttributeValue() const {
-  return getAttribute(eventAttr).GetString();
+  return getAttribute(kEventAttr).GetString();
 }
 
 String HTMLScriptElement::CrossOriginAttributeValue() const {
-  return getAttribute(crossoriginAttr);
+  return getAttribute(kCrossoriginAttr);
 }
 
 String HTMLScriptElement::IntegrityAttributeValue() const {
-  return getAttribute(integrityAttr);
+  return getAttribute(kIntegrityAttr);
 }
 
 String HTMLScriptElement::ReferrerPolicyAttributeValue() const {
-  return getAttribute(referrerpolicyAttr);
+  return getAttribute(kReferrerpolicyAttr);
 }
 
 String HTMLScriptElement::TextFromChildren() {
@@ -175,15 +175,15 @@
 }
 
 bool HTMLScriptElement::AsyncAttributeValue() const {
-  return FastHasAttribute(asyncAttr);
+  return FastHasAttribute(kAsyncAttr);
 }
 
 bool HTMLScriptElement::DeferAttributeValue() const {
-  return FastHasAttribute(deferAttr);
+  return FastHasAttribute(kDeferAttr);
 }
 
 bool HTMLScriptElement::HasSourceAttribute() const {
-  return FastHasAttribute(srcAttr);
+  return FastHasAttribute(kSrcAttr);
 }
 
 bool HTMLScriptElement::IsConnected() const {
diff --git a/third_party/blink/renderer/core/html/html_shadow_element.cc b/third_party/blink/renderer/core/html/html_shadow_element.cc
index 9753001e..db8da59 100644
--- a/third_party/blink/renderer/core/html/html_shadow_element.cc
+++ b/third_party/blink/renderer/core/html/html_shadow_element.cc
@@ -41,7 +41,7 @@
 class Document;
 
 inline HTMLShadowElement::HTMLShadowElement(Document& document)
-    : V0InsertionPoint(HTMLNames::shadowTag, document) {
+    : V0InsertionPoint(html_names::kShadowTag, document) {
   UseCounter::Count(document, WebFeature::kHTMLShadowElement);
 }
 
diff --git a/third_party/blink/renderer/core/html/html_slot_element.cc b/third_party/blink/renderer/core/html/html_slot_element.cc
index c9142d1..d2377fc640 100644
--- a/third_party/blink/renderer/core/html/html_slot_element.cc
+++ b/third_party/blink/renderer/core/html/html_slot_element.cc
@@ -49,7 +49,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 namespace {
 constexpr size_t kLCSTableSizeLimit = 16;
@@ -62,19 +62,19 @@
 HTMLSlotElement* HTMLSlotElement::CreateUserAgentDefaultSlot(
     Document& document) {
   HTMLSlotElement* slot = new HTMLSlotElement(document);
-  slot->setAttribute(nameAttr, UserAgentDefaultSlotName());
+  slot->setAttribute(kNameAttr, UserAgentDefaultSlotName());
   return slot;
 }
 
 HTMLSlotElement* HTMLSlotElement::CreateUserAgentCustomAssignSlot(
     Document& document) {
   HTMLSlotElement* slot = new HTMLSlotElement(document);
-  slot->setAttribute(nameAttr, UserAgentCustomAssignSlotName());
+  slot->setAttribute(kNameAttr, UserAgentCustomAssignSlotName());
   return slot;
 }
 
 inline HTMLSlotElement::HTMLSlotElement(Document& document)
-    : HTMLElement(slotTag, document) {
+    : HTMLElement(kSlotTag, document) {
   UseCounter::Count(document, WebFeature::kHTMLSlotElement);
   SetHasCustomStyleCallbacks();
 }
@@ -243,7 +243,7 @@
 }
 
 AtomicString HTMLSlotElement::GetName() const {
-  return NormalizeSlotName(FastGetAttribute(nameAttr));
+  return NormalizeSlotName(FastGetAttribute(kNameAttr));
 }
 
 void HTMLSlotElement::AttachLayoutTree(AttachContext& context) {
@@ -286,7 +286,7 @@
 
 void HTMLSlotElement::AttributeChanged(
     const AttributeModificationParams& params) {
-  if (params.name == nameAttr) {
+  if (params.name == kNameAttr) {
     if (ShadowRoot* root = ContainingShadowRoot()) {
       if (root->IsV1() && params.old_value != params.new_value) {
         root->GetSlotAssignment().DidRenameSlot(
diff --git a/third_party/blink/renderer/core/html/html_slot_element_test.cc b/third_party/blink/renderer/core/html/html_slot_element_test.cc
index 9d4ac83..0089908 100644
--- a/third_party/blink/renderer/core/html/html_slot_element_test.cc
+++ b/third_party/blink/renderer/core/html/html_slot_element_test.cc
@@ -159,7 +159,7 @@
   Element& shadow_span = *ToElement(shadow_root.firstChild());
   GetDocument().View()->UpdateAllLifecyclePhases();
 
-  shadow_span.setAttribute(HTMLNames::styleAttr, "display:block");
+  shadow_span.setAttribute(html_names::kStyleAttr, "display:block");
 
   GetDocument().Lifecycle().AdvanceTo(DocumentLifecycle::kInStyleRecalc);
   GetDocument().GetStyleEngine().RecalcStyle(kNoChange);
diff --git a/third_party/blink/renderer/core/html/html_source_element.cc b/third_party/blink/renderer/core/html/html_source_element.cc
index 737dc30..fbb3bdf 100644
--- a/third_party/blink/renderer/core/html/html_source_element.cc
+++ b/third_party/blink/renderer/core/html/html_source_element.cc
@@ -41,7 +41,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 class HTMLSourceElement::Listener final : public MediaQueryListListener {
  public:
@@ -62,7 +62,7 @@
 };
 
 inline HTMLSourceElement::HTMLSourceElement(Document& document)
-    : HTMLElement(sourceTag, document), listener_(new Listener(this)) {
+    : HTMLElement(kSourceTag, document), listener_(new Listener(this)) {
   DVLOG(SOURCE_LOG_LEVEL) << "HTMLSourceElement - " << (void*)this;
 }
 
@@ -90,7 +90,7 @@
 }
 
 void HTMLSourceElement::DidMoveToNewDocument(Document& old_document) {
-  CreateMediaQueryList(FastGetAttribute(mediaAttr));
+  CreateMediaQueryList(FastGetAttribute(kMediaAttr));
   HTMLElement::DidMoveToNewDocument(old_document);
 }
 
@@ -129,20 +129,20 @@
 }
 
 void HTMLSourceElement::SetSrc(const String& url) {
-  setAttribute(srcAttr, AtomicString(url));
+  setAttribute(kSrcAttr, AtomicString(url));
 }
 
 void HTMLSourceElement::SetSrc(const USVStringOrTrustedURL& usvStringOrURL,
                                ExceptionState& exception_state) {
-  setAttribute(srcAttr, usvStringOrURL, exception_state);
+  setAttribute(kSrcAttr, usvStringOrURL, exception_state);
 }
 
 const AtomicString& HTMLSourceElement::type() const {
-  return getAttribute(typeAttr);
+  return getAttribute(kTypeAttr);
 }
 
 void HTMLSourceElement::setType(const AtomicString& type) {
-  setAttribute(typeAttr, type);
+  setAttribute(kTypeAttr, type);
 }
 
 void HTMLSourceElement::ScheduleErrorEvent() {
@@ -172,7 +172,7 @@
 }
 
 bool HTMLSourceElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName() == srcAttr ||
+  return attribute.GetName() == kSrcAttr ||
          HTMLElement::IsURLAttribute(attribute);
 }
 
@@ -180,10 +180,10 @@
     const AttributeModificationParams& params) {
   HTMLElement::ParseAttribute(params);
   const QualifiedName& name = params.name;
-  if (name == mediaAttr)
+  if (name == kMediaAttr)
     CreateMediaQueryList(params.new_value);
-  if (name == srcsetAttr || name == sizesAttr || name == mediaAttr ||
-      name == typeAttr) {
+  if (name == kSrcsetAttr || name == kSizesAttr || name == kMediaAttr ||
+      name == kTypeAttr) {
     if (auto* picture = ToHTMLPictureElementOrNull(parentElement()))
       picture->SourceOrMediaChanged();
   }
diff --git a/third_party/blink/renderer/core/html/html_span_element.cc b/third_party/blink/renderer/core/html/html_span_element.cc
index 8686d44..d7a59e3 100644
--- a/third_party/blink/renderer/core/html/html_span_element.cc
+++ b/third_party/blink/renderer/core/html/html_span_element.cc
@@ -29,10 +29,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 HTMLSpanElement::HTMLSpanElement(Document& document)
-    : HTMLElement(spanTag, document) {}
+    : HTMLElement(kSpanTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLSpanElement)
 
diff --git a/third_party/blink/renderer/core/html/html_style_element.cc b/third_party/blink/renderer/core/html/html_style_element.cc
index 72a1ca8b..13c9efe 100644
--- a/third_party/blink/renderer/core/html/html_style_element.cc
+++ b/third_party/blink/renderer/core/html/html_style_element.cc
@@ -33,11 +33,11 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLStyleElement::HTMLStyleElement(Document& document,
                                           const CreateElementFlags flags)
-    : HTMLElement(styleTag, document),
+    : HTMLElement(kStyleTag, document),
       StyleElement(&document, flags.IsCreatedByParser()),
       fired_load_(false),
       loaded_sheet_(false) {}
@@ -51,13 +51,13 @@
 
 void HTMLStyleElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == titleAttr && sheet_ && IsInDocumentTree()) {
+  if (params.name == kTitleAttr && sheet_ && IsInDocumentTree()) {
     sheet_->SetTitle(params.new_value);
-  } else if (params.name == mediaAttr && isConnected() &&
+  } else if (params.name == kMediaAttr && isConnected() &&
              GetDocument().IsActive() && sheet_) {
     sheet_->SetMediaQueries(MediaQuerySet::Create(params.new_value));
     GetDocument().GetStyleEngine().MediaQueriesChangedInScope(GetTreeScope());
-  } else if (params.name == typeAttr) {
+  } else if (params.name == kTypeAttr) {
     HTMLElement::ParseAttribute(params);
     StyleElement::ChildrenChanged(*this);
   } else {
@@ -101,11 +101,11 @@
 }
 
 const AtomicString& HTMLStyleElement::media() const {
-  return getAttribute(mediaAttr);
+  return getAttribute(kMediaAttr);
 }
 
 const AtomicString& HTMLStyleElement::type() const {
-  return getAttribute(typeAttr);
+  return getAttribute(kTypeAttr);
 }
 
 void HTMLStyleElement::DispatchPendingEvent(
diff --git a/third_party/blink/renderer/core/html/html_summary_element.cc b/third_party/blink/renderer/core/html/html_summary_element.cc
index 751682d..58d4b3f 100644
--- a/third_party/blink/renderer/core/html/html_summary_element.cc
+++ b/third_party/blink/renderer/core/html/html_summary_element.cc
@@ -34,7 +34,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 HTMLSummaryElement* HTMLSummaryElement::Create(Document& document) {
   HTMLSummaryElement* summary = new HTMLSummaryElement(document);
@@ -43,7 +43,7 @@
 }
 
 HTMLSummaryElement::HTMLSummaryElement(Document& document)
-    : HTMLElement(summaryTag, document) {}
+    : HTMLElement(kSummaryTag, document) {}
 
 LayoutObject* HTMLSummaryElement::CreateLayoutObject(
     const ComputedStyle& style) {
diff --git a/third_party/blink/renderer/core/html/html_table_caption_element.cc b/third_party/blink/renderer/core/html/html_table_caption_element.cc
index 0e5c1b4..c754f11 100644
--- a/third_party/blink/renderer/core/html/html_table_caption_element.cc
+++ b/third_party/blink/renderer/core/html/html_table_caption_element.cc
@@ -29,10 +29,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLTableCaptionElement::HTMLTableCaptionElement(Document& document)
-    : HTMLElement(captionTag, document) {}
+    : HTMLElement(kCaptionTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLTableCaptionElement)
 
@@ -40,7 +40,7 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == alignAttr) {
+  if (name == kAlignAttr) {
     if (!value.IsEmpty())
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyCaptionSide,
                                               value);
diff --git a/third_party/blink/renderer/core/html/html_table_cell_element.cc b/third_party/blink/renderer/core/html/html_table_cell_element.cc
index 9992cb8..30afae92 100644
--- a/third_party/blink/renderer/core/html/html_table_cell_element.cc
+++ b/third_party/blink/renderer/core/html/html_table_cell_element.cc
@@ -37,7 +37,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLTableCellElement::HTMLTableCellElement(const QualifiedName& tag_name,
                                                   Document& document)
@@ -46,7 +46,7 @@
 DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(HTMLTableCellElement)
 
 unsigned HTMLTableCellElement::colSpan() const {
-  const AtomicString& col_span_value = FastGetAttribute(colspanAttr);
+  const AtomicString& col_span_value = FastGetAttribute(kColspanAttr);
   unsigned value = 0;
   if (!ParseHTMLClampedNonNegativeInteger(col_span_value, kMinColSpan,
                                           kMaxColSpan, value))
@@ -64,7 +64,7 @@
 }
 
 unsigned HTMLTableCellElement::rowSpan() const {
-  const AtomicString& row_span_value = FastGetAttribute(rowspanAttr);
+  const AtomicString& row_span_value = FastGetAttribute(kRowspanAttr);
   unsigned value = 0;
   if (!ParseHTMLClampedNonNegativeInteger(row_span_value, kMinRowSpan,
                                           kMaxRowSpan, value))
@@ -88,7 +88,7 @@
 
 bool HTMLTableCellElement::IsPresentationAttribute(
     const QualifiedName& name) const {
-  if (name == nowrapAttr || name == widthAttr || name == heightAttr)
+  if (name == kNowrapAttr || name == kWidthAttr || name == kHeightAttr)
     return true;
   return HTMLTablePartElement::IsPresentationAttribute(name);
 }
@@ -97,16 +97,16 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == nowrapAttr) {
+  if (name == kNowrapAttr) {
     AddPropertyToPresentationAttributeStyle(style, CSSPropertyWhiteSpace,
                                             CSSValueWebkitNowrap);
-  } else if (name == widthAttr) {
+  } else if (name == kWidthAttr) {
     if (!value.IsEmpty()) {
       int width_int = value.ToInt();
       if (width_int > 0)  // width="0" is ignored for compatibility with WinIE.
         AddHTMLLengthToStyle(style, CSSPropertyWidth, value);
     }
-  } else if (name == heightAttr) {
+  } else if (name == kHeightAttr) {
     if (!value.IsEmpty()) {
       int height_int = value.ToInt();
       if (height_int >
@@ -121,7 +121,7 @@
 
 void HTMLTableCellElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == rowspanAttr || params.name == colspanAttr) {
+  if (params.name == kRowspanAttr || params.name == kColspanAttr) {
     if (GetLayoutObject() && GetLayoutObject()->IsTableCell())
       ToLayoutTableCell(GetLayoutObject())->ColSpanOrRowSpanChanged();
   } else {
@@ -137,39 +137,39 @@
 }
 
 bool HTMLTableCellElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName() == backgroundAttr ||
+  return attribute.GetName() == kBackgroundAttr ||
          HTMLTablePartElement::IsURLAttribute(attribute);
 }
 
 bool HTMLTableCellElement::HasLegalLinkAttribute(
     const QualifiedName& name) const {
-  return (HasTagName(tdTag) && name == backgroundAttr) ||
+  return (HasTagName(kTdTag) && name == kBackgroundAttr) ||
          HTMLTablePartElement::HasLegalLinkAttribute(name);
 }
 
 const QualifiedName& HTMLTableCellElement::SubResourceAttributeName() const {
-  return HasTagName(tdTag) ? backgroundAttr
-                           : HTMLTablePartElement::SubResourceAttributeName();
+  return HasTagName(kTdTag) ? kBackgroundAttr
+                            : HTMLTablePartElement::SubResourceAttributeName();
 }
 
 const AtomicString& HTMLTableCellElement::Abbr() const {
-  return FastGetAttribute(abbrAttr);
+  return FastGetAttribute(kAbbrAttr);
 }
 
 const AtomicString& HTMLTableCellElement::Axis() const {
-  return FastGetAttribute(axisAttr);
+  return FastGetAttribute(kAxisAttr);
 }
 
 void HTMLTableCellElement::setColSpan(unsigned n) {
-  SetUnsignedIntegralAttribute(colspanAttr, n, kDefaultColSpan);
+  SetUnsignedIntegralAttribute(kColspanAttr, n, kDefaultColSpan);
 }
 
 const AtomicString& HTMLTableCellElement::Headers() const {
-  return FastGetAttribute(headersAttr);
+  return FastGetAttribute(kHeadersAttr);
 }
 
 void HTMLTableCellElement::setRowSpan(unsigned n) {
-  SetUnsignedIntegralAttribute(rowspanAttr, n, kDefaultRowSpan);
+  SetUnsignedIntegralAttribute(kRowspanAttr, n, kDefaultRowSpan);
 }
 
 }  // namespace blink
diff --git a/third_party/blink/renderer/core/html/html_table_cell_element.h b/third_party/blink/renderer/core/html/html_table_cell_element.h
index a6d99e9..c896313 100644
--- a/third_party/blink/renderer/core/html/html_table_cell_element.h
+++ b/third_party/blink/renderer/core/html/html_table_cell_element.h
@@ -69,8 +69,8 @@
 };
 
 inline bool IsHTMLTableCellElement(const HTMLElement& element) {
-  return element.HasTagName(HTMLNames::tdTag) ||
-         element.HasTagName(HTMLNames::thTag);
+  return element.HasTagName(html_names::kTdTag) ||
+         element.HasTagName(html_names::kThTag);
 }
 
 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLTableCellElement);
diff --git a/third_party/blink/renderer/core/html/html_table_col_element.cc b/third_party/blink/renderer/core/html/html_table_col_element.cc
index 7475912..10e8e717e 100644
--- a/third_party/blink/renderer/core/html/html_table_col_element.cc
+++ b/third_party/blink/renderer/core/html/html_table_col_element.cc
@@ -35,7 +35,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLTableColElement::HTMLTableColElement(const QualifiedName& tag_name,
                                                 Document& document)
@@ -45,7 +45,7 @@
 
 bool HTMLTableColElement::IsPresentationAttribute(
     const QualifiedName& name) const {
-  if (name == widthAttr)
+  if (name == kWidthAttr)
     return true;
   return HTMLTablePartElement::IsPresentationAttribute(name);
 }
@@ -54,7 +54,7 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == widthAttr)
+  if (name == kWidthAttr)
     AddHTMLLengthToStyle(style, CSSPropertyWidth, value);
   else
     HTMLTablePartElement::CollectStyleForPresentationAttribute(name, value,
@@ -63,7 +63,7 @@
 
 void HTMLTableColElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == spanAttr) {
+  if (params.name == kSpanAttr) {
     unsigned new_span = 0;
     if (!ParseHTMLClampedNonNegativeInteger(params.new_value, kMinColSpan,
                                             kMaxColSpan, new_span)) {
@@ -72,7 +72,7 @@
     span_ = new_span;
     if (GetLayoutObject() && GetLayoutObject()->IsLayoutTableCol())
       GetLayoutObject()->UpdateFromElement();
-  } else if (params.name == widthAttr) {
+  } else if (params.name == kWidthAttr) {
     if (!params.new_value.IsEmpty()) {
       if (GetLayoutObject() && GetLayoutObject()->IsLayoutTableCol()) {
         LayoutTableCol* col = ToLayoutTableCol(GetLayoutObject());
@@ -89,7 +89,7 @@
 
 const CSSPropertyValueSet*
 HTMLTableColElement::AdditionalPresentationAttributeStyle() {
-  if (!HasTagName(colgroupTag))
+  if (!HasTagName(kColgroupTag))
     return nullptr;
   if (HTMLTableElement* table = FindParentTable())
     return table->AdditionalGroupStyle(false);
@@ -97,11 +97,11 @@
 }
 
 void HTMLTableColElement::setSpan(unsigned n) {
-  SetUnsignedIntegralAttribute(spanAttr, n, kDefaultColSpan);
+  SetUnsignedIntegralAttribute(kSpanAttr, n, kDefaultColSpan);
 }
 
 const AtomicString& HTMLTableColElement::Width() const {
-  return getAttribute(widthAttr);
+  return getAttribute(kWidthAttr);
 }
 
 }  // namespace blink
diff --git a/third_party/blink/renderer/core/html/html_table_col_element.h b/third_party/blink/renderer/core/html/html_table_col_element.h
index 8e4eef7..1e7ff08 100644
--- a/third_party/blink/renderer/core/html/html_table_col_element.h
+++ b/third_party/blink/renderer/core/html/html_table_col_element.h
@@ -58,8 +58,8 @@
 };
 
 inline bool IsHTMLTableColElement(const HTMLElement& element) {
-  return element.HasTagName(HTMLNames::colTag) ||
-         element.HasTagName(HTMLNames::colgroupTag);
+  return element.HasTagName(html_names::kColTag) ||
+         element.HasTagName(html_names::kColgroupTag);
 }
 
 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLTableColElement);
diff --git a/third_party/blink/renderer/core/html/html_table_element.cc b/third_party/blink/renderer/core/html/html_table_element.cc
index bcf1f640..93c609a 100644
--- a/third_party/blink/renderer/core/html/html_table_element.cc
+++ b/third_party/blink/renderer/core/html/html_table_element.cc
@@ -49,10 +49,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLTableElement::HTMLTableElement(Document& document)
-    : HTMLElement(tableTag, document),
+    : HTMLElement(kTableTag, document),
       border_attr_(false),
       border_color_attr_(false),
       frame_attr_(false),
@@ -81,12 +81,12 @@
 
 HTMLTableSectionElement* HTMLTableElement::tHead() const {
   return ToHTMLTableSectionElement(
-      Traversal<HTMLElement>::FirstChild(*this, HasHTMLTagName(theadTag)));
+      Traversal<HTMLElement>::FirstChild(*this, HasHTMLTagName(kTheadTag)));
 }
 
 void HTMLTableElement::setTHead(HTMLTableSectionElement* new_head,
                                 ExceptionState& exception_state) {
-  if (new_head && !new_head->HasTagName(theadTag)) {
+  if (new_head && !new_head->HasTagName(kTheadTag)) {
     exception_state.ThrowDOMException(DOMExceptionCode::kHierarchyRequestError,
                                       "Not a thead element.");
     return;
@@ -99,7 +99,7 @@
   HTMLElement* child;
   for (child = Traversal<HTMLElement>::FirstChild(*this); child;
        child = Traversal<HTMLElement>::NextSibling(*child)) {
-    if (!child->HasTagName(captionTag) && !child->HasTagName(colgroupTag))
+    if (!child->HasTagName(kCaptionTag) && !child->HasTagName(kColgroupTag))
       break;
   }
 
@@ -108,12 +108,12 @@
 
 HTMLTableSectionElement* HTMLTableElement::tFoot() const {
   return ToHTMLTableSectionElement(
-      Traversal<HTMLElement>::FirstChild(*this, HasHTMLTagName(tfootTag)));
+      Traversal<HTMLElement>::FirstChild(*this, HasHTMLTagName(kTfootTag)));
 }
 
 void HTMLTableElement::setTFoot(HTMLTableSectionElement* new_foot,
                                 ExceptionState& exception_state) {
-  if (new_foot && !new_foot->HasTagName(tfootTag)) {
+  if (new_foot && !new_foot->HasTagName(kTfootTag)) {
     exception_state.ThrowDOMException(DOMExceptionCode::kHierarchyRequestError,
                                       "Not a tfoot element.");
     return;
@@ -129,7 +129,7 @@
   if (HTMLTableSectionElement* existing_head = tHead())
     return existing_head;
   HTMLTableSectionElement* head =
-      HTMLTableSectionElement::Create(theadTag, GetDocument());
+      HTMLTableSectionElement::Create(kTheadTag, GetDocument());
   setTHead(head, IGNORE_EXCEPTION_FOR_TESTING);
   return head;
 }
@@ -142,7 +142,7 @@
   if (HTMLTableSectionElement* existing_foot = tFoot())
     return existing_foot;
   HTMLTableSectionElement* foot =
-      HTMLTableSectionElement::Create(tfootTag, GetDocument());
+      HTMLTableSectionElement::Create(kTfootTag, GetDocument());
   setTFoot(foot, IGNORE_EXCEPTION_FOR_TESTING);
   return foot;
 }
@@ -153,7 +153,7 @@
 
 HTMLTableSectionElement* HTMLTableElement::createTBody() {
   HTMLTableSectionElement* body =
-      HTMLTableSectionElement::Create(tbodyTag, GetDocument());
+      HTMLTableSectionElement::Create(kTbodyTag, GetDocument());
   Node* reference_element = LastBody() ? LastBody()->nextSibling() : nullptr;
 
   InsertBefore(body, reference_element);
@@ -175,7 +175,7 @@
 
 HTMLTableSectionElement* HTMLTableElement::LastBody() const {
   return ToHTMLTableSectionElement(
-      Traversal<HTMLElement>::LastChild(*this, HasHTMLTagName(tbodyTag)));
+      Traversal<HTMLElement>::LastChild(*this, HasHTMLTagName(kTbodyTag)));
 }
 
 HTMLTableRowElement* HTMLTableElement::insertRow(
@@ -217,7 +217,7 @@
     parent = LastBody();
     if (!parent) {
       HTMLTableSectionElement* new_body =
-          HTMLTableSectionElement::Create(tbodyTag, GetDocument());
+          HTMLTableSectionElement::Create(kTbodyTag, GetDocument());
       HTMLTableRowElement* new_row = HTMLTableRowElement::Create(GetDocument());
       new_body->AppendChild(new_row, exception_state);
       AppendChild(new_body, exception_state);
@@ -267,7 +267,7 @@
   while (element) {
     element->SetNeedsStyleRecalc(
         kLocalStyleChange,
-        StyleChangeReasonForTracing::FromAttribute(rulesAttr));
+        StyleChangeReasonForTracing::FromAttribute(kRulesAttr));
     if (IsHTMLTableCellElement(*element))
       element = ElementTraversal::NextSkippingChildren(*element, this);
     else
@@ -309,20 +309,20 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == widthAttr) {
+  if (name == kWidthAttr) {
     AddHTMLLengthToStyle(style, CSSPropertyWidth, value);
-  } else if (name == heightAttr) {
+  } else if (name == kHeightAttr) {
     AddHTMLLengthToStyle(style, CSSPropertyHeight, value);
-  } else if (name == borderAttr) {
+  } else if (name == kBorderAttr) {
     AddPropertyToPresentationAttributeStyle(
         style, CSSPropertyBorderWidth, ParseBorderWidthAttribute(value),
         CSSPrimitiveValue::UnitType::kPixels);
-  } else if (name == bordercolorAttr) {
+  } else if (name == kBordercolorAttr) {
     if (!value.IsEmpty())
       AddHTMLColorToStyle(style, CSSPropertyBorderColor, value);
-  } else if (name == bgcolorAttr) {
+  } else if (name == kBgcolorAttr) {
     AddHTMLColorToStyle(style, CSSPropertyBackgroundColor, value);
-  } else if (name == backgroundAttr) {
+  } else if (name == kBackgroundAttr) {
     String url = StripLeadingAndTrailingHTMLSpaces(value);
     if (!url.IsEmpty()) {
       UseCounter::Count(
@@ -335,16 +335,16 @@
       style->SetProperty(
           CSSPropertyValue(GetCSSPropertyBackgroundImage(), *image_value));
     }
-  } else if (name == valignAttr) {
+  } else if (name == kValignAttr) {
     if (!value.IsEmpty())
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyVerticalAlign,
                                               value);
-  } else if (name == cellspacingAttr) {
+  } else if (name == kCellspacingAttr) {
     if (!value.IsEmpty()) {
       AddHTMLLengthToStyle(style, CSSPropertyBorderSpacing, value,
                            kDontAllowPercentageValues);
     }
-  } else if (name == alignAttr) {
+  } else if (name == kAlignAttr) {
     if (!value.IsEmpty()) {
       if (DeprecatedEqualIgnoringCase(value, "center")) {
         AddPropertyToPresentationAttributeStyle(
@@ -355,13 +355,13 @@
         AddPropertyToPresentationAttributeStyle(style, CSSPropertyFloat, value);
       }
     }
-  } else if (name == rulesAttr) {
+  } else if (name == kRulesAttr) {
     // The presence of a valid rules attribute causes border collapsing to be
     // enabled.
     if (rules_attr_ != kUnsetRules)
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyBorderCollapse,
                                               CSSValueCollapse);
-  } else if (name == frameAttr) {
+  } else if (name == kFrameAttr) {
     bool border_top;
     bool border_right;
     bool border_bottom;
@@ -390,11 +390,11 @@
 
 bool HTMLTableElement::IsPresentationAttribute(
     const QualifiedName& name) const {
-  if (name == widthAttr || name == heightAttr || name == bgcolorAttr ||
-      name == backgroundAttr || name == valignAttr || name == vspaceAttr ||
-      name == hspaceAttr || name == alignAttr || name == cellspacingAttr ||
-      name == borderAttr || name == bordercolorAttr || name == frameAttr ||
-      name == rulesAttr)
+  if (name == kWidthAttr || name == kHeightAttr || name == kBgcolorAttr ||
+      name == kBackgroundAttr || name == kValignAttr || name == kVspaceAttr ||
+      name == kHspaceAttr || name == kAlignAttr || name == kCellspacingAttr ||
+      name == kBorderAttr || name == kBordercolorAttr || name == kFrameAttr ||
+      name == kRulesAttr)
     return true;
   return HTMLElement::IsPresentationAttribute(name);
 }
@@ -405,12 +405,12 @@
   CellBorders borders_before = GetCellBorders();
   unsigned short old_padding = padding_;
 
-  if (name == borderAttr) {
+  if (name == kBorderAttr) {
     // FIXME: This attribute is a mess.
     border_attr_ = ParseBorderWidthAttribute(params.new_value);
-  } else if (name == bordercolorAttr) {
+  } else if (name == kBordercolorAttr) {
     border_color_attr_ = !params.new_value.IsEmpty();
-  } else if (name == frameAttr) {
+  } else if (name == kFrameAttr) {
     // FIXME: This attribute is a mess.
     bool border_top;
     bool border_right;
@@ -418,7 +418,7 @@
     bool border_left;
     frame_attr_ = GetBordersFromFrameAttributeValue(
         params.new_value, border_top, border_right, border_bottom, border_left);
-  } else if (name == rulesAttr) {
+  } else if (name == kRulesAttr) {
     rules_attr_ = kUnsetRules;
     if (DeprecatedEqualIgnoringCase(params.new_value, "none"))
       rules_attr_ = kNoneRules;
@@ -430,12 +430,12 @@
       rules_attr_ = kColsRules;
     else if (DeprecatedEqualIgnoringCase(params.new_value, "all"))
       rules_attr_ = kAllRules;
-  } else if (params.name == cellpaddingAttr) {
+  } else if (params.name == kCellpaddingAttr) {
     if (!params.new_value.IsEmpty())
       padding_ = std::max(0, params.new_value.ToInt());
     else
       padding_ = 1;
-  } else if (params.name == colsAttr) {
+  } else if (params.name == kColsAttr) {
     // ###
   } else {
     HTMLElement::ParseAttribute(params);
@@ -592,16 +592,16 @@
 }
 
 bool HTMLTableElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName() == backgroundAttr ||
+  return attribute.GetName() == kBackgroundAttr ||
          HTMLElement::IsURLAttribute(attribute);
 }
 
 bool HTMLTableElement::HasLegalLinkAttribute(const QualifiedName& name) const {
-  return name == backgroundAttr || HTMLElement::HasLegalLinkAttribute(name);
+  return name == kBackgroundAttr || HTMLElement::HasLegalLinkAttribute(name);
 }
 
 const QualifiedName& HTMLTableElement::SubResourceAttributeName() const {
-  return backgroundAttr;
+  return kBackgroundAttr;
 }
 
 HTMLTableRowsCollection* HTMLTableElement::rows() {
@@ -613,11 +613,11 @@
 }
 
 const AtomicString& HTMLTableElement::Rules() const {
-  return getAttribute(rulesAttr);
+  return getAttribute(kRulesAttr);
 }
 
 const AtomicString& HTMLTableElement::Summary() const {
-  return getAttribute(summaryAttr);
+  return getAttribute(kSummaryAttr);
 }
 
 void HTMLTableElement::Trace(blink::Visitor* visitor) {
diff --git a/third_party/blink/renderer/core/html/html_table_part_element.cc b/third_party/blink/renderer/core/html/html_table_part_element.cc
index d897372..8ad0629 100644
--- a/third_party/blink/renderer/core/html/html_table_part_element.cc
+++ b/third_party/blink/renderer/core/html/html_table_part_element.cc
@@ -38,12 +38,12 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 bool HTMLTablePartElement::IsPresentationAttribute(
     const QualifiedName& name) const {
-  if (name == bgcolorAttr || name == backgroundAttr || name == valignAttr ||
-      name == alignAttr || name == heightAttr)
+  if (name == kBgcolorAttr || name == kBackgroundAttr || name == kValignAttr ||
+      name == kAlignAttr || name == kHeightAttr)
     return true;
   return HTMLElement::IsPresentationAttribute(name);
 }
@@ -52,9 +52,9 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == bgcolorAttr) {
+  if (name == kBgcolorAttr) {
     AddHTMLColorToStyle(style, CSSPropertyBackgroundColor, value);
-  } else if (name == backgroundAttr) {
+  } else if (name == kBackgroundAttr) {
     String url = StripLeadingAndTrailingHTMLSpaces(value);
     if (!url.IsEmpty()) {
       UseCounter::Count(
@@ -67,7 +67,7 @@
       style->SetProperty(
           CSSPropertyValue(GetCSSPropertyBackgroundImage(), *image_value));
     }
-  } else if (name == valignAttr) {
+  } else if (name == kValignAttr) {
     if (DeprecatedEqualIgnoringCase(value, "top"))
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyVerticalAlign,
                                               CSSValueTop);
@@ -83,7 +83,7 @@
     else
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyVerticalAlign,
                                               value);
-  } else if (name == alignAttr) {
+  } else if (name == kAlignAttr) {
     if (DeprecatedEqualIgnoringCase(value, "middle") ||
         DeprecatedEqualIgnoringCase(value, "center"))
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyTextAlign,
@@ -100,7 +100,7 @@
     else
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyTextAlign,
                                               value);
-  } else if (name == heightAttr) {
+  } else if (name == kHeightAttr) {
     if (!value.IsEmpty())
       AddHTMLLengthToStyle(style, CSSPropertyHeight, value);
   } else {
diff --git a/third_party/blink/renderer/core/html/html_table_row_element.cc b/third_party/blink/renderer/core/html/html_table_row_element.cc
index 7b248e83..12c9272 100644
--- a/third_party/blink/renderer/core/html/html_table_row_element.cc
+++ b/third_party/blink/renderer/core/html/html_table_row_element.cc
@@ -37,21 +37,21 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLTableRowElement::HTMLTableRowElement(Document& document)
-    : HTMLTablePartElement(trTag, document) {}
+    : HTMLTablePartElement(kTrTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLTableRowElement)
 
 bool HTMLTableRowElement::HasLegalLinkAttribute(
     const QualifiedName& name) const {
-  return name == backgroundAttr ||
+  return name == kBackgroundAttr ||
          HTMLTablePartElement::HasLegalLinkAttribute(name);
 }
 
 const QualifiedName& HTMLTableRowElement::SubResourceAttributeName() const {
-  return backgroundAttr;
+  return kBackgroundAttr;
 }
 
 static int FindIndexInRowCollection(const HTMLCollection& rows,
@@ -103,7 +103,7 @@
   }
 
   HTMLTableCellElement* cell =
-      HTMLTableCellElement::Create(tdTag, GetDocument());
+      HTMLTableCellElement::Create(kTdTag, GetDocument());
   if (num_cells == index || index == -1)
     AppendChild(cell, exception_state);
   else
diff --git a/third_party/blink/renderer/core/html/html_table_rows_collection.cc b/third_party/blink/renderer/core/html/html_table_rows_collection.cc
index e9c293a..1bec2c3 100644
--- a/third_party/blink/renderer/core/html/html_table_rows_collection.cc
+++ b/third_party/blink/renderer/core/html/html_table_rows_collection.cc
@@ -35,7 +35,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 static inline bool IsInSection(HTMLTableRowElement& row,
                                const HTMLQualifiedName& section_tag) {
@@ -61,10 +61,10 @@
   HTMLElement* child = nullptr;
   if (!previous)
     child = Traversal<HTMLElement>::FirstChild(table);
-  else if (IsInSection(*previous, theadTag))
+  else if (IsInSection(*previous, kTheadTag))
     child = Traversal<HTMLElement>::NextSibling(*previous->parentNode());
   for (; child; child = Traversal<HTMLElement>::NextSibling(*child)) {
-    if (child->HasTagName(theadTag)) {
+    if (child->HasTagName(kTheadTag)) {
       if (HTMLTableRowElement* row =
               Traversal<HTMLTableRowElement>::FirstChild(*child))
         return row;
@@ -73,16 +73,16 @@
 
   // If still looking at top level and bodies, find the next row in top level or
   // the first in the next body section.
-  if (!previous || IsInSection(*previous, theadTag))
+  if (!previous || IsInSection(*previous, kTheadTag))
     child = Traversal<HTMLElement>::FirstChild(table);
   else if (previous->parentNode() == table)
     child = Traversal<HTMLElement>::NextSibling(*previous);
-  else if (IsInSection(*previous, tbodyTag))
+  else if (IsInSection(*previous, kTbodyTag))
     child = Traversal<HTMLElement>::NextSibling(*previous->parentNode());
   for (; child; child = Traversal<HTMLElement>::NextSibling(*child)) {
     if (auto* row = ToHTMLTableRowElementOrNull(child))
       return row;
-    if (child->HasTagName(tbodyTag)) {
+    if (child->HasTagName(kTbodyTag)) {
       if (HTMLTableRowElement* row =
               Traversal<HTMLTableRowElement>::FirstChild(*child))
         return row;
@@ -90,12 +90,12 @@
   }
 
   // Find the first row in the next foot section.
-  if (!previous || !IsInSection(*previous, tfootTag))
+  if (!previous || !IsInSection(*previous, kTfootTag))
     child = Traversal<HTMLElement>::FirstChild(table);
   else
     child = Traversal<HTMLElement>::NextSibling(*previous->parentNode());
   for (; child; child = Traversal<HTMLElement>::NextSibling(*child)) {
-    if (child->HasTagName(tfootTag)) {
+    if (child->HasTagName(kTfootTag)) {
       if (HTMLTableRowElement* row =
               Traversal<HTMLTableRowElement>::FirstChild(*child))
         return row;
@@ -107,9 +107,9 @@
 
 HTMLTableRowElement* HTMLTableRowsCollection::LastRow(HTMLTableElement& table) {
   for (HTMLElement* tfoot =
-           Traversal<HTMLElement>::LastChild(table, HasHTMLTagName(tfootTag));
+           Traversal<HTMLElement>::LastChild(table, HasHTMLTagName(kTfootTag));
        tfoot; tfoot = Traversal<HTMLElement>::PreviousSibling(
-                  *tfoot, HasHTMLTagName(tfootTag))) {
+                  *tfoot, HasHTMLTagName(kTfootTag))) {
     if (HTMLTableRowElement* last_row =
             Traversal<HTMLTableRowElement>::LastChild(*tfoot))
       return last_row;
@@ -119,7 +119,7 @@
        child = Traversal<HTMLElement>::PreviousSibling(*child)) {
     if (auto* row = ToHTMLTableRowElementOrNull(child))
       return row;
-    if (child->HasTagName(tbodyTag)) {
+    if (child->HasTagName(kTbodyTag)) {
       if (HTMLTableRowElement* last_row =
               Traversal<HTMLTableRowElement>::LastChild(*child))
         return last_row;
@@ -127,9 +127,9 @@
   }
 
   for (HTMLElement* thead =
-           Traversal<HTMLElement>::LastChild(table, HasHTMLTagName(theadTag));
+           Traversal<HTMLElement>::LastChild(table, HasHTMLTagName(kTheadTag));
        thead; thead = Traversal<HTMLElement>::PreviousSibling(
-                  *thead, HasHTMLTagName(theadTag))) {
+                  *thead, HasHTMLTagName(kTheadTag))) {
     if (HTMLTableRowElement* last_row =
             Traversal<HTMLTableRowElement>::LastChild(*thead))
       return last_row;
diff --git a/third_party/blink/renderer/core/html/html_table_section_element.cc b/third_party/blink/renderer/core/html/html_table_section_element.cc
index 640ee39..1c5a455 100644
--- a/third_party/blink/renderer/core/html/html_table_section_element.cc
+++ b/third_party/blink/renderer/core/html/html_table_section_element.cc
@@ -29,13 +29,10 @@
 #include "third_party/blink/renderer/core/html/html_collection.h"
 #include "third_party/blink/renderer/core/html/html_table_element.h"
 #include "third_party/blink/renderer/core/html/html_table_row_element.h"
-#include "third_party/blink/renderer/core/html_names.h"
 #include "third_party/blink/renderer/platform/bindings/exception_state.h"
 
 namespace blink {
 
-using namespace HTMLNames;
-
 inline HTMLTableSectionElement::HTMLTableSectionElement(
     const QualifiedName& tag_name,
     Document& document)
diff --git a/third_party/blink/renderer/core/html/html_table_section_element.h b/third_party/blink/renderer/core/html/html_table_section_element.h
index 60c13db..151730e2 100644
--- a/third_party/blink/renderer/core/html/html_table_section_element.h
+++ b/third_party/blink/renderer/core/html/html_table_section_element.h
@@ -52,9 +52,9 @@
 };
 
 inline bool IsHTMLTableSectionElement(const HTMLElement& element) {
-  return element.HasTagName(HTMLNames::tbodyTag) ||
-         element.HasTagName(HTMLNames::tfootTag) ||
-         element.HasTagName(HTMLNames::theadTag);
+  return element.HasTagName(html_names::kTbodyTag) ||
+         element.HasTagName(html_names::kTfootTag) ||
+         element.HasTagName(html_names::kTheadTag);
 }
 
 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLTableSectionElement);
diff --git a/third_party/blink/renderer/core/html/html_template_element.cc b/third_party/blink/renderer/core/html/html_template_element.cc
index dc64c22f..1db0696 100644
--- a/third_party/blink/renderer/core/html/html_template_element.cc
+++ b/third_party/blink/renderer/core/html/html_template_element.cc
@@ -36,10 +36,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLTemplateElement::HTMLTemplateElement(Document& document)
-    : HTMLElement(templateTag, document) {}
+    : HTMLElement(kTemplateTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLTemplateElement)
 
diff --git a/third_party/blink/renderer/core/html/html_time_element.cc b/third_party/blink/renderer/core/html/html_time_element.cc
index 6ebe403..4225d823 100644
--- a/third_party/blink/renderer/core/html/html_time_element.cc
+++ b/third_party/blink/renderer/core/html/html_time_element.cc
@@ -9,7 +9,7 @@
 namespace blink {
 
 HTMLTimeElement::HTMLTimeElement(Document& document)
-    : HTMLElement(HTMLNames::timeTag, document) {
+    : HTMLElement(html_names::kTimeTag, document) {
   UseCounter::Count(document, WebFeature::kTimeElement);
 }
 
diff --git a/third_party/blink/renderer/core/html/html_title_element.cc b/third_party/blink/renderer/core/html/html_title_element.cc
index 7118b49..b54bd60 100644
--- a/third_party/blink/renderer/core/html/html_title_element.cc
+++ b/third_party/blink/renderer/core/html/html_title_element.cc
@@ -32,10 +32,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLTitleElement::HTMLTitleElement(Document& document)
-    : HTMLElement(titleTag, document),
+    : HTMLElement(kTitleTag, document),
       ignore_title_updates_when_children_change_(false) {}
 
 DEFINE_NODE_FACTORY(HTMLTitleElement)
diff --git a/third_party/blink/renderer/core/html/html_ulist_element.cc b/third_party/blink/renderer/core/html/html_ulist_element.cc
index 41c4ade87..ac0d1ab 100644
--- a/third_party/blink/renderer/core/html/html_ulist_element.cc
+++ b/third_party/blink/renderer/core/html/html_ulist_element.cc
@@ -27,16 +27,16 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLUListElement::HTMLUListElement(Document& document)
-    : HTMLElement(ulTag, document) {}
+    : HTMLElement(kUlTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLUListElement)
 
 bool HTMLUListElement::IsPresentationAttribute(
     const QualifiedName& name) const {
-  if (name == typeAttr)
+  if (name == kTypeAttr)
     return true;
   return HTMLElement::IsPresentationAttribute(name);
 }
@@ -45,7 +45,7 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == typeAttr) {
+  if (name == kTypeAttr) {
     if (DeprecatedEqualIgnoringCase(value, "disc"))
       AddPropertyToPresentationAttributeStyle(style, CSSPropertyListStyleType,
                                               CSSValueDisc);
diff --git a/third_party/blink/renderer/core/html/html_view_source_document.cc b/third_party/blink/renderer/core/html/html_view_source_document.cc
index cd50273..fa0c0f9 100644
--- a/third_party/blink/renderer/core/html/html_view_source_document.cc
+++ b/third_party/blink/renderer/core/html/html_view_source_document.cc
@@ -41,7 +41,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 namespace {
 
@@ -74,12 +74,12 @@
   // Create a line gutter div that can be used to make sure the gutter extends
   // down the height of the whole document.
   HTMLDivElement* div = HTMLDivElement::Create(*this);
-  div->setAttribute(classAttr, "line-gutter-backdrop");
+  div->setAttribute(kClassAttr, "line-gutter-backdrop");
   body->ParserAppendChild(div);
 
   HTMLTableElement* table = HTMLTableElement::Create(*this);
   body->ParserAppendChild(table);
-  tbody_ = HTMLTableSectionElement::Create(tbodyTag, *this);
+  tbody_ = HTMLTableSectionElement::Create(kTbodyTag, *this);
   table->ParserAppendChild(tbody_);
   current_ = tbody_;
   line_number_ = 0;
@@ -155,21 +155,21 @@
     index = AddRange(source, index, iter->NameRange().end - token.StartIndex(),
                      "html-attribute-name");
 
-    if (tag_name == baseTag && name == hrefAttr)
+    if (tag_name == kBaseTag && name == kHrefAttr)
       AddBase(value);
 
     index =
         AddRange(source, index, iter->ValueRange().start - token.StartIndex(),
                  g_empty_atom);
 
-    if (name == srcsetAttr) {
+    if (name == kSrcsetAttr) {
       index =
           AddSrcset(source, index, iter->ValueRange().end - token.StartIndex());
     } else {
-      bool is_link = name == srcAttr || name == hrefAttr;
+      bool is_link = name == kSrcAttr || name == kHrefAttr;
       index =
           AddRange(source, index, iter->ValueRange().end - token.StartIndex(),
-                   "html-attribute-value", is_link, tag_name == aTag, value);
+                   "html-attribute-value", is_link, tag_name == kATag, value);
     }
 
     ++iter;
@@ -199,7 +199,7 @@
   }
 
   HTMLSpanElement* span = HTMLSpanElement::Create(*this);
-  span->setAttribute(classAttr, class_name);
+  span->setAttribute(kClassAttr, class_name);
   current_->ParserAppendChild(span);
   return span;
 }
@@ -211,14 +211,14 @@
 
   // Create a cell that will hold the line number (it is generated in the
   // stylesheet using counters).
-  HTMLTableCellElement* td = HTMLTableCellElement::Create(tdTag, *this);
-  td->setAttribute(classAttr, "line-number");
-  td->SetIntegralAttribute(valueAttr, ++line_number_);
+  HTMLTableCellElement* td = HTMLTableCellElement::Create(kTdTag, *this);
+  td->setAttribute(kClassAttr, "line-number");
+  td->SetIntegralAttribute(kValueAttr, ++line_number_);
   trow->ParserAppendChild(td);
 
   // Create a second cell for the line contents
-  td = HTMLTableCellElement::Create(tdTag, *this);
-  td->setAttribute(classAttr, "line-content");
+  td = HTMLTableCellElement::Create(kTdTag, *this);
+  td->setAttribute(kClassAttr, "line-content");
   trow->ParserAppendChild(td);
   current_ = td_ = td;
 
@@ -294,7 +294,7 @@
 
 Element* HTMLViewSourceDocument::AddBase(const AtomicString& href) {
   HTMLBaseElement* base = HTMLBaseElement::Create(*this);
-  base->setAttribute(hrefAttr, href);
+  base->setAttribute(kHrefAttr, href);
   current_->ParserAppendChild(base);
   return base;
 }
@@ -311,13 +311,13 @@
     class_value = "html-attribute-value html-external-link";
   else
     class_value = "html-attribute-value html-resource-link";
-  anchor->setAttribute(classAttr, class_value);
-  anchor->setAttribute(targetAttr, "_blank");
-  anchor->setAttribute(hrefAttr, url);
-  anchor->setAttribute(relAttr, "noreferrer noopener");
+  anchor->setAttribute(kClassAttr, class_value);
+  anchor->setAttribute(kTargetAttr, "_blank");
+  anchor->setAttribute(kHrefAttr, url);
+  anchor->setAttribute(kRelAttr, "noreferrer noopener");
   // Disallow JavaScript hrefs. https://crbug.com/808407
   if (anchor->Url().ProtocolIsJavaScript())
-    anchor->setAttribute(hrefAttr, "about:blank");
+    anchor->setAttribute(kHrefAttr, "about:blank");
   current_->ParserAppendChild(anchor);
   return anchor;
 }
@@ -350,7 +350,7 @@
     SourceAnnotation annotation) {
   if (annotation == kAnnotateSourceAsXSS) {
     current_ = AddSpanWithClassName("highlight");
-    current_->setAttribute(titleAttr, kXSSDetected);
+    current_->setAttribute(kTitleAttr, kXSSDetected);
   }
 }
 
diff --git a/third_party/blink/renderer/core/html/html_wbr_element.cc b/third_party/blink/renderer/core/html/html_wbr_element.cc
index f901e6c..053085b 100644
--- a/third_party/blink/renderer/core/html/html_wbr_element.cc
+++ b/third_party/blink/renderer/core/html/html_wbr_element.cc
@@ -35,10 +35,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline HTMLWBRElement::HTMLWBRElement(Document& document)
-    : HTMLElement(wbrTag, document) {}
+    : HTMLElement(kWbrTag, document) {}
 
 DEFINE_NODE_FACTORY(HTMLWBRElement)
 
diff --git a/third_party/blink/renderer/core/html/image_document.cc b/third_party/blink/renderer/core/html/image_document.cc
index 7aecfe5c..3f0b7f0 100644
--- a/third_party/blink/renderer/core/html/image_document.cc
+++ b/third_party/blink/renderer/core/html/image_document.cc
@@ -57,7 +57,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 class ImageEventListener : public EventListener {
  public:
@@ -225,20 +225,20 @@
 
   HTMLHeadElement* head = HTMLHeadElement::Create(*this);
   HTMLMetaElement* meta = HTMLMetaElement::Create(*this);
-  meta->setAttribute(nameAttr, "viewport");
-  meta->setAttribute(contentAttr, "width=device-width, minimum-scale=0.1");
+  meta->setAttribute(kNameAttr, "viewport");
+  meta->setAttribute(kContentAttr, "width=device-width, minimum-scale=0.1");
   head->AppendChild(meta);
 
   HTMLBodyElement* body = HTMLBodyElement::Create(*this);
 
   if (ShouldShrinkToFit()) {
     // Display the image prominently centered in the frame.
-    body->setAttribute(styleAttr, "margin: 0px; background: #0e0e0e;");
+    body->setAttribute(kStyleAttr, "margin: 0px; background: #0e0e0e;");
 
     // See w3c example on how to center an element:
     // https://www.w3.org/Style/Examples/007/center.en.html
     div_element_ = HTMLDivElement::Create(*this);
-    div_element_->setAttribute(styleAttr,
+    div_element_->setAttribute(kStyleAttr,
                                "display: flex;"
                                "flex-direction: column;"
                                "justify-content: center;"
@@ -257,7 +257,7 @@
     ShadowRoot& shadow_root = body->EnsureUserAgentShadowRoot();
     shadow_root.AppendChild(div_element_);
   } else {
-    body->setAttribute(styleAttr, "margin: 0px;");
+    body->setAttribute(kStyleAttr, "margin: 0px;");
   }
 
   WillInsertBody();
@@ -409,7 +409,7 @@
     }
   }
 
-  image_element_->setAttribute(styleAttr, image_style.ToAtomicString());
+  image_element_->setAttribute(kStyleAttr, image_style.ToAtomicString());
 }
 
 void ImageDocument::ImageUpdated() {
diff --git a/third_party/blink/renderer/core/html/imports/link_import.cc b/third_party/blink/renderer/core/html/imports/link_import.cc
index 9f7cfcb..5341a51 100644
--- a/third_party/blink/renderer/core/html/imports/link_import.cc
+++ b/third_party/blink/renderer/core/html/imports/link_import.cc
@@ -72,7 +72,7 @@
   if (!ShouldLoadResource())
     return;
 
-  const KURL& url = owner_->GetNonEmptyURLAttribute(HTMLNames::hrefAttr);
+  const KURL& url = owner_->GetNonEmptyURLAttribute(html_names::kHrefAttr);
   if (url.IsEmpty() || !url.IsValid()) {
     DidFinish();
     return;
diff --git a/third_party/blink/renderer/core/html/lazy_load_frame_observer_test.cc b/third_party/blink/renderer/core/html/lazy_load_frame_observer_test.cc
index 5660132..8a064eda 100644
--- a/third_party/blink/renderer/core/html/lazy_load_frame_observer_test.cc
+++ b/third_party/blink/renderer/core/html/lazy_load_frame_observer_test.cc
@@ -907,7 +907,7 @@
 
   Element* child_frame_element = GetDocument().getElementById("child_frame");
   ASSERT_TRUE(child_frame_element);
-  child_frame_element->setAttribute(HTMLNames::lazyloadAttr, "off");
+  child_frame_element->setAttribute(html_names::kLazyloadAttr, "off");
 
   ExpectInitialDeferralActionHistogramSamplesIfApplicable(
       LazyLoadFrameObserver::FrameInitialDeferralAction::kDeferred, 1);
diff --git a/third_party/blink/renderer/core/html/link_resource.cc b/third_party/blink/renderer/core/html/link_resource.cc
index 520c0ecd..35e7b21e 100644
--- a/third_party/blink/renderer/core/html/link_resource.cc
+++ b/third_party/blink/renderer/core/html/link_resource.cc
@@ -59,7 +59,7 @@
 }
 
 WTF::TextEncoding LinkResource::GetCharset() const {
-  AtomicString charset = owner_->getAttribute(HTMLNames::charsetAttr);
+  AtomicString charset = owner_->getAttribute(html_names::kCharsetAttr);
   if (charset.IsEmpty() && GetDocument().GetFrame())
     return GetDocument().Encoding();
   return WTF::TextEncoding(charset);
diff --git a/third_party/blink/renderer/core/html/link_style.cc b/third_party/blink/renderer/core/html/link_style.cc
index fbec39a5..3aa8d76 100644
--- a/third_party/blink/renderer/core/html/link_style.cc
+++ b/third_party/blink/renderer/core/html/link_style.cc
@@ -27,7 +27,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 static bool StyleSheetTypeIsSupported(const String& type) {
   String trimmed_type = ContentType(type).GetType();
@@ -73,7 +73,7 @@
   // See the comment in pending_script.cc about why this check is necessary
   // here, instead of in the resource fetcher. https://crbug.com/500701.
   if (!cached_style_sheet->ErrorOccurred() &&
-      !owner_->FastGetAttribute(integrityAttr).IsEmpty() &&
+      !owner_->FastGetAttribute(kIntegrityAttr).IsEmpty() &&
       !cached_style_sheet->IntegrityMetadata().IsEmpty()) {
     ResourceIntegrityDisposition disposition =
         cached_style_sheet->IntegrityDisposition();
@@ -321,14 +321,14 @@
   DCHECK(owner_->ShouldProcessStyle());
   const LinkLoadParameters params(
       owner_->RelAttribute(),
-      GetCrossOriginAttributeValue(owner_->FastGetAttribute(crossoriginAttr)),
+      GetCrossOriginAttributeValue(owner_->FastGetAttribute(kCrossoriginAttr)),
       owner_->TypeValue().DeprecatedLower(),
       owner_->AsValue().DeprecatedLower(), owner_->Media().DeprecatedLower(),
       owner_->nonce(), owner_->IntegrityValue(),
       owner_->ImportanceValue().LowerASCII(), owner_->GetReferrerPolicy(),
-      owner_->GetNonEmptyURLAttribute(hrefAttr),
-      owner_->FastGetAttribute(srcsetAttr),
-      owner_->FastGetAttribute(imgsizesAttr));
+      owner_->GetNonEmptyURLAttribute(kHrefAttr),
+      owner_->FastGetAttribute(kSrcsetAttr),
+      owner_->FastGetAttribute(kImgsizesAttr));
 
   WTF::TextEncoding charset = GetCharset();
 
@@ -368,7 +368,7 @@
   if (title.IsEmpty() || !IsUnset() || owner_->IsAlternate())
     return;
 
-  const KURL& href = owner_->GetNonEmptyURLAttribute(hrefAttr);
+  const KURL& href = owner_->GetNonEmptyURLAttribute(kHrefAttr);
   if (href.IsValid() && !href.IsEmpty())
     GetDocument().GetStyleEngine().SetPreferredStylesheetSetNameIfNotSet(title);
 }
diff --git a/third_party/blink/renderer/core/html/media/html_audio_element.cc b/third_party/blink/renderer/core/html/media/html_audio_element.cc
index d3aff74..6ea76f1 100644
--- a/third_party/blink/renderer/core/html/media/html_audio_element.cc
+++ b/third_party/blink/renderer/core/html/media/html_audio_element.cc
@@ -30,10 +30,10 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 HTMLAudioElement::HTMLAudioElement(Document& document)
-    : HTMLMediaElement(audioTag, document) {}
+    : HTMLMediaElement(kAudioTag, document) {}
 
 HTMLAudioElement* HTMLAudioElement::Create(Document& document) {
   HTMLAudioElement* audio = new HTMLAudioElement(document);
diff --git a/third_party/blink/renderer/core/html/media/html_media_element.cc b/third_party/blink/renderer/core/html/media/html_media_element.cc
index a8ba2a7..759b7ae 100644
--- a/third_party/blink/renderer/core/html/media/html_media_element.cc
+++ b/third_party/blink/renderer/core/html/media/html_media_element.cc
@@ -124,7 +124,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 using WeakMediaElementSet = HeapHashSet<WeakMember<HTMLMediaElement>>;
 using DocumentElementSetMap =
@@ -624,20 +624,20 @@
 void HTMLMediaElement::ParseAttribute(
     const AttributeModificationParams& params) {
   const QualifiedName& name = params.name;
-  if (name == srcAttr) {
+  if (name == kSrcAttr) {
     BLINK_MEDIA_LOG << "parseAttribute(" << (void*)this
-                    << ", srcAttr, old=" << params.old_value
+                    << ", kSrcAttr, old=" << params.old_value
                     << ", new=" << params.new_value << ")";
     // Trigger a reload, as long as the 'src' attribute is present.
     if (!params.new_value.IsNull()) {
       ignore_preload_none_ = false;
       InvokeLoadAlgorithm();
     }
-  } else if (name == controlsAttr) {
+  } else if (name == kControlsAttr) {
     UseCounter::Count(GetDocument(),
                       WebFeature::kHTMLMediaElementControlsAttribute);
     UpdateControlsVisibility();
-  } else if (name == controlslistAttr) {
+  } else if (name == kControlslistAttr) {
     UseCounter::Count(GetDocument(),
                       WebFeature::kHTMLMediaElementControlsListAttribute);
     if (params.old_value != params.new_value) {
@@ -646,9 +646,9 @@
       if (GetMediaControls())
         GetMediaControls()->OnControlsListUpdated();
     }
-  } else if (name == preloadAttr) {
+  } else if (name == kPreloadAttr) {
     SetPlayerPreload();
-  } else if (name == disableremoteplaybackAttr) {
+  } else if (name == kDisableremoteplaybackAttr) {
     // This attribute is an extension described in the Remote Playback API spec.
     // Please see: https://w3c.github.io/remote-playback
     UseCounter::Count(GetDocument(),
@@ -667,7 +667,7 @@
 void HTMLMediaElement::ParserDidSetAttributes() {
   HTMLElement::ParserDidSetAttributes();
 
-  if (FastHasAttribute(mutedAttr))
+  if (FastHasAttribute(kMutedAttr))
     muted_ = true;
 }
 
@@ -679,7 +679,7 @@
                                                        CloneChildrenFlag flag) {
   HTMLElement::CloneNonAttributePropertiesFrom(other, flag);
 
-  if (FastHasAttribute(mutedAttr))
+  if (FastHasAttribute(kMutedAttr))
     muted_ = true;
 }
 
@@ -706,7 +706,7 @@
   HTMLElement::InsertedInto(insertion_point);
   if (insertion_point.isConnected()) {
     UseCounter::Count(GetDocument(), WebFeature::kHTMLMediaElementInDocument);
-    if ((!getAttribute(srcAttr).IsEmpty() || src_object_) &&
+    if ((!getAttribute(kSrcAttr).IsEmpty() || src_object_) &&
         network_state_ == kNetworkEmpty) {
       ignore_preload_none_ = false;
       InvokeLoadAlgorithm();
@@ -790,12 +790,12 @@
 }
 
 void HTMLMediaElement::SetSrc(const AtomicString& url) {
-  setAttribute(srcAttr, url);
+  setAttribute(kSrcAttr, url);
 }
 
 void HTMLMediaElement::SetSrc(const USVStringOrTrustedURL& stringOrURL,
                               ExceptionState& exception_state) {
-  setAttribute(srcAttr, stringOrURL, exception_state);
+  setAttribute(kSrcAttr, stringOrURL, exception_state);
 }
 
 void HTMLMediaElement::SetSrcObject(MediaStreamDescriptor* src_object) {
@@ -1032,7 +1032,7 @@
   //     mode be object.
   if (src_object_) {
     mode = kObject;
-  } else if (FastHasAttribute(srcAttr)) {
+  } else if (FastHasAttribute(kSrcAttr)) {
     // Otherwise, if the media element has no assigned media provider object
     // but has a src attribute, then let mode be attribute.
     mode = kAttribute;
@@ -1110,7 +1110,7 @@
 
 void HTMLMediaElement::LoadSourceFromAttribute() {
   load_state_ = kLoadingFromSrcAttr;
-  const AtomicString& src_value = FastGetAttribute(srcAttr);
+  const AtomicString& src_value = FastGetAttribute(kSrcAttr);
 
   // If the src attribute's value is the empty string ... jump down to the
   // failed step below
@@ -1303,7 +1303,7 @@
   web_media_player_->SetPreload(preload);
 
   web_media_player_->RequestRemotePlaybackDisabled(
-      FastHasAttribute(disableremoteplaybackAttr));
+      FastHasAttribute(kDisableremoteplaybackAttr));
 
   auto load_timing = web_media_player_->Load(GetLoadType(), source, CorsMode());
   if (load_timing == WebMediaPlayer::LoadTiming::kDeferred) {
@@ -2311,7 +2311,7 @@
 }
 
 bool HTMLMediaElement::Autoplay() const {
-  return FastHasAttribute(autoplayAttr);
+  return FastHasAttribute(kAutoplayAttr);
 }
 
 String HTMLMediaElement::preload() const {
@@ -2324,11 +2324,11 @@
   BLINK_MEDIA_LOG << "setPreload(" << (void*)this << ", " << preload << ")";
   if (GetLoadType() == WebMediaPlayer::kLoadTypeMediaStream)
     return;
-  setAttribute(preloadAttr, preload);
+  setAttribute(kPreloadAttr, preload);
 }
 
 WebMediaPlayer::Preload HTMLMediaElement::PreloadType() const {
-  const AtomicString& preload = FastGetAttribute(preloadAttr);
+  const AtomicString& preload = FastGetAttribute(kPreloadAttr);
   if (DeprecatedEqualIgnoringCase(preload, "none")) {
     UseCounter::Count(GetDocument(), WebFeature::kHTMLMediaElementPreloadNone);
     return WebMediaPlayer::kPreloadNone;
@@ -2562,12 +2562,12 @@
 }
 
 bool HTMLMediaElement::Loop() const {
-  return FastHasAttribute(loopAttr);
+  return FastHasAttribute(kLoopAttr);
 }
 
 void HTMLMediaElement::SetLoop(bool b) {
   BLINK_MEDIA_LOG << "setLoop(" << (void*)this << ", " << BoolString(b) << ")";
-  SetBooleanAttribute(loopAttr, b);
+  SetBooleanAttribute(kLoopAttr, b);
 }
 
 bool HTMLMediaElement::ShouldShowControls(
@@ -2579,7 +2579,7 @@
     return false;
   }
 
-  if (FastHasAttribute(controlsAttr)) {
+  if (FastHasAttribute(kControlsAttr)) {
     if (record_metrics == RecordMetricsBehavior::kDoRecord)
       ShowControlsHistogram().Count(kMediaControlsShowAttribute);
     return true;
@@ -2978,7 +2978,7 @@
 }
 
 void HTMLMediaElement::DidRemoveTrackElement(HTMLTrackElement* track_element) {
-  KURL url = track_element->GetNonEmptyURLAttribute(srcAttr);
+  KURL url = track_element->GetNonEmptyURLAttribute(kSrcAttr);
   BLINK_MEDIA_LOG << "didRemoveTrackElement(" << (void*)this << ") - 'src' is "
                   << UrlForLoggingMedia(url);
 
@@ -3084,7 +3084,7 @@
     // 2. If candidate does not have a src attribute, or if its src
     // attribute's value is the empty string ... jump down to the failed
     // step below
-    const AtomicString& src_value = source->FastGetAttribute(srcAttr);
+    const AtomicString& src_value = source->FastGetAttribute(kSrcAttr);
     if (should_log) {
       BLINK_MEDIA_LOG << "selectNextSourceChild(" << (void*)this
                       << ") - 'src' is " << UrlForLoggingMedia(media_url);
@@ -3149,13 +3149,13 @@
 void HTMLMediaElement::SourceWasAdded(HTMLSourceElement* source) {
   BLINK_MEDIA_LOG << "sourceWasAdded(" << (void*)this << ", " << source << ")";
 
-  KURL url = source->GetNonEmptyURLAttribute(srcAttr);
+  KURL url = source->GetNonEmptyURLAttribute(kSrcAttr);
   BLINK_MEDIA_LOG << "sourceWasAdded(" << (void*)this << ") - 'src' is "
                   << UrlForLoggingMedia(url);
 
   // We should only consider a <source> element when there is not src attribute
   // at all.
-  if (FastHasAttribute(srcAttr))
+  if (FastHasAttribute(kSrcAttr))
     return;
 
   // 4.8.8 - If a source element is inserted as a child of a media element that
@@ -3205,7 +3205,7 @@
   BLINK_MEDIA_LOG << "sourceWasRemoved(" << (void*)this << ", " << source
                   << ")";
 
-  KURL url = source->GetNonEmptyURLAttribute(srcAttr);
+  KURL url = source->GetNonEmptyURLAttribute(kSrcAttr);
   BLINK_MEDIA_LOG << "sourceWasRemoved(" << (void*)this << ") - 'src' is "
                   << UrlForLoggingMedia(url);
 
@@ -3808,7 +3808,7 @@
 }
 
 bool HTMLMediaElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName() == srcAttr ||
+  return attribute.GetName() == kSrcAttr ||
          HTMLElement::IsURLAttribute(attribute);
 }
 
@@ -3930,7 +3930,7 @@
 }
 
 WebMediaPlayer::CORSMode HTMLMediaElement::CorsMode() const {
-  const AtomicString& cross_origin_mode = FastGetAttribute(crossoriginAttr);
+  const AtomicString& cross_origin_mode = FastGetAttribute(kCrossoriginAttr);
   if (cross_origin_mode.IsNull())
     return WebMediaPlayer::kCORSModeUnspecified;
   if (DeprecatedEqualIgnoringCase(cross_origin_mode, "use-credentials"))
@@ -3960,7 +3960,7 @@
 }
 
 bool HTMLMediaElement::IsInteractiveContent() const {
-  return FastHasAttribute(controlsAttr);
+  return FastHasAttribute(kControlsAttr);
 }
 
 void HTMLMediaElement::Trace(blink::Visitor* visitor) {
@@ -4255,7 +4255,7 @@
 
 bool HTMLMediaElement::MediaShouldBeOpaque() const {
   return !IsMediaDataCORSSameOrigin() && ready_state_ < kHaveMetadata &&
-         !FastGetAttribute(srcAttr).IsEmpty() &&
+         !FastGetAttribute(kSrcAttr).IsEmpty() &&
          EffectivePreloadType() != WebMediaPlayer::kPreloadNone;
 }
 
diff --git a/third_party/blink/renderer/core/html/media/html_media_element_controls_list.cc b/third_party/blink/renderer/core/html/media/html_media_element_controls_list.cc
index 4343433c..1f552d45 100644
--- a/third_party/blink/renderer/core/html/media/html_media_element_controls_list.cc
+++ b/third_party/blink/renderer/core/html/media/html_media_element_controls_list.cc
@@ -21,7 +21,7 @@
 
 HTMLMediaElementControlsList::HTMLMediaElementControlsList(
     HTMLMediaElement* element)
-    : DOMTokenList(*element, HTMLNames::controlslistAttr) {}
+    : DOMTokenList(*element, html_names::kControlslistAttr) {}
 
 bool HTMLMediaElementControlsList::ValidateTokenValue(
     const AtomicString& token_value,
diff --git a/third_party/blink/renderer/core/html/media/html_video_element.cc b/third_party/blink/renderer/core/html/media/html_video_element.cc
index 55ae2d44..e9e5aac 100644
--- a/third_party/blink/renderer/core/html/media/html_video_element.cc
+++ b/third_party/blink/renderer/core/html/media/html_video_element.cc
@@ -61,7 +61,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 namespace {
 
@@ -75,7 +75,7 @@
 }  // anonymous namespace
 
 inline HTMLVideoElement::HTMLVideoElement(Document& document)
-    : HTMLMediaElement(videoTag, document),
+    : HTMLMediaElement(kVideoTag, document),
       remoting_interstitial_(nullptr),
       picture_in_picture_interstitial_(nullptr),
       in_overlay_fullscreen_video_(false) {
@@ -169,9 +169,9 @@
     const QualifiedName& name,
     const AtomicString& value,
     MutableCSSPropertyValueSet* style) {
-  if (name == widthAttr)
+  if (name == kWidthAttr)
     AddHTMLLengthToStyle(style, CSSPropertyWidth, value);
-  else if (name == heightAttr)
+  else if (name == kHeightAttr)
     AddHTMLLengthToStyle(style, CSSPropertyHeight, value);
   else
     HTMLMediaElement::CollectStyleForPresentationAttribute(name, value, style);
@@ -179,14 +179,14 @@
 
 bool HTMLVideoElement::IsPresentationAttribute(
     const QualifiedName& name) const {
-  if (name == widthAttr || name == heightAttr)
+  if (name == kWidthAttr || name == kHeightAttr)
     return true;
   return HTMLMediaElement::IsPresentationAttribute(name);
 }
 
 void HTMLVideoElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == posterAttr) {
+  if (params.name == kPosterAttr) {
     // In case the poster attribute is set after playback, don't update the
     // display state, post playback the correct state will be picked up.
     if (GetDisplayMode() < kVideo || !HasAvailableVideoFrame()) {
@@ -216,7 +216,7 @@
       remoting_interstitial_->OnPosterImageChanged();
     if (picture_in_picture_interstitial_)
       picture_in_picture_interstitial_->OnPosterImageChanged();
-  } else if (params.name == intrinsicsizeAttr &&
+  } else if (params.name == kIntrinsicsizeAttr &&
              RuntimeEnabledFeatures::
                  ExperimentalProductivityFeaturesEnabled()) {
     String message;
@@ -263,12 +263,12 @@
 }
 
 bool HTMLVideoElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName() == posterAttr ||
+  return attribute.GetName() == kPosterAttr ||
          HTMLMediaElement::IsURLAttribute(attribute);
 }
 
 const AtomicString HTMLVideoElement::ImageSourceURL() const {
-  const AtomicString& url = getAttribute(posterAttr);
+  const AtomicString& url = getAttribute(kPosterAttr);
   if (!StripLeadingAndTrailingHTMLSpaces(url).IsEmpty())
     return url;
   return default_poster_url_;
diff --git a/third_party/blink/renderer/core/html/media/html_video_element_persistent_test.cc b/third_party/blink/renderer/core/html/media/html_video_element_persistent_test.cc
index cf2a9aa..377812c 100644
--- a/third_party/blink/renderer/core/html/media/html_video_element_persistent_test.cc
+++ b/third_party/blink/renderer/core/html/media/html_video_element_persistent_test.cc
@@ -282,7 +282,8 @@
   EXPECT_EQ(FullscreenElement(), nullptr);
 
   // Inserting a <span> between the <div> and <video>.
-  Persistent<Element> span = GetDocument().CreateRawElement(HTMLNames::spanTag);
+  Persistent<Element> span =
+      GetDocument().CreateRawElement(html_names::kSpanTag);
   DivElement()->AppendChild(span);
   span->AppendChild(VideoElement());
 
diff --git a/third_party/blink/renderer/core/html/media/html_video_element_test.cc b/third_party/blink/renderer/core/html/media/html_video_element_test.cc
index 78a1a88e..190f5150 100644
--- a/third_party/blink/renderer/core/html/media/html_video_element_test.cc
+++ b/third_party/blink/renderer/core/html/media/html_video_element_test.cc
@@ -76,7 +76,7 @@
   scoped_refptr<cc::Layer> layer = cc::Layer::Create();
   SetFakeCcLayer(layer.get());
 
-  video()->SetBooleanAttribute(HTMLNames::controlsAttr, true);
+  video()->SetBooleanAttribute(html_names::kControlsAttr, true);
   video()->SetSrc("http://example.com/foo.mp4");
   test::RunPendingTasks();
 
@@ -100,7 +100,7 @@
   scoped_refptr<cc::Layer> layer = cc::Layer::Create();
   SetFakeCcLayer(layer.get());
 
-  video()->SetBooleanAttribute(HTMLNames::controlsAttr, true);
+  video()->SetBooleanAttribute(html_names::kControlsAttr, true);
   video()->SetSrc("http://example.com/foo.mp4");
   test::RunPendingTasks();
 
diff --git a/third_party/blink/renderer/core/html/media/media_custom_controls_fullscreen_detector.cc b/third_party/blink/renderer/core/html/media/media_custom_controls_fullscreen_detector.cc
index c4dedb2..e83f94a 100644
--- a/third_party/blink/renderer/core/html/media/media_custom_controls_fullscreen_detector.cc
+++ b/third_party/blink/renderer/core/html/media/media_custom_controls_fullscreen_detector.cc
@@ -146,7 +146,8 @@
   // Picture-in-Picture can be disabled by the website when the API is enabled.
   bool picture_in_picture_allowed =
       !RuntimeEnabledFeatures::PictureInPictureEnabled() &&
-      !VideoElement().FastHasAttribute(HTMLNames::disablepictureinpictureAttr);
+      !VideoElement().FastHasAttribute(
+          html_names::kDisablepictureinpictureAttr);
   if (picture_in_picture_allowed) {
     VideoElement().SetIsEffectivelyFullscreen(
         WebFullscreenVideoStatus::kFullscreenAndPictureInPictureEnabled);
diff --git a/third_party/blink/renderer/core/html/media/media_custom_controls_fullscreen_detector_test.cc b/third_party/blink/renderer/core/html/media/media_custom_controls_fullscreen_detector_test.cc
index 53b9b0a..51df23d 100644
--- a/third_party/blink/renderer/core/html/media/media_custom_controls_fullscreen_detector_test.cc
+++ b/third_party/blink/renderer/core/html/media/media_custom_controls_fullscreen_detector_test.cc
@@ -113,7 +113,7 @@
 TEST_F(MediaCustomControlsFullscreenDetectorTest,
        hasNoListenersBeforeAddingToDocument) {
   auto* video =
-      ToHTMLVideoElement(GetDocument().CreateRawElement(HTMLNames::videoTag));
+      ToHTMLVideoElement(GetDocument().CreateRawElement(html_names::kVideoTag));
 
   EXPECT_FALSE(CheckEventListenerRegistered(GetDocument(),
                                             EventTypeNames::fullscreenchange,
@@ -128,7 +128,7 @@
 TEST_F(MediaCustomControlsFullscreenDetectorTest,
        hasListenersAfterAddToDocumentByScript) {
   auto* video =
-      ToHTMLVideoElement(GetDocument().CreateRawElement(HTMLNames::videoTag));
+      ToHTMLVideoElement(GetDocument().CreateRawElement(html_names::kVideoTag));
   GetDocument().body()->AppendChild(video);
 
   EXPECT_TRUE(CheckEventListenerRegistered(
@@ -156,7 +156,7 @@
 TEST_F(MediaCustomControlsFullscreenDetectorTest,
        hasListenersAfterDocumentMove) {
   auto* video =
-      ToHTMLVideoElement(GetDocument().CreateRawElement(HTMLNames::videoTag));
+      ToHTMLVideoElement(GetDocument().CreateRawElement(html_names::kVideoTag));
   GetDocument().body()->AppendChild(video);
 
   NewDocument().body()->AppendChild(VideoElement());
diff --git a/third_party/blink/renderer/core/html/media/media_document.cc b/third_party/blink/renderer/core/html/media/media_document.cc
index 5263a79..47f7e7d 100644
--- a/third_party/blink/renderer/core/html/media/media_document.cc
+++ b/third_party/blink/renderer/core/html/media/media_document.cc
@@ -52,7 +52,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 // FIXME: Share more code with PluginDocumentParser.
 class MediaDocumentParser : public RawDataDocumentParser {
@@ -83,14 +83,14 @@
 
   HTMLHeadElement* head = HTMLHeadElement::Create(*GetDocument());
   HTMLMetaElement* meta = HTMLMetaElement::Create(*GetDocument());
-  meta->setAttribute(nameAttr, "viewport");
-  meta->setAttribute(contentAttr, "width=device-width");
+  meta->setAttribute(kNameAttr, "viewport");
+  meta->setAttribute(kContentAttr, "width=device-width");
   head->AppendChild(meta);
 
   HTMLVideoElement* media = HTMLVideoElement::Create(*GetDocument());
-  media->setAttribute(controlsAttr, "");
-  media->setAttribute(autoplayAttr, "");
-  media->setAttribute(nameAttr, "media");
+  media->setAttribute(kControlsAttr, "");
+  media->setAttribute(kAutoplayAttr, "");
+  media->setAttribute(kNameAttr, "media");
 
   HTMLSourceElement* source = HTMLSourceElement::Create(*GetDocument());
   source->SetSrc(GetDocument()->Url());
diff --git a/third_party/blink/renderer/core/html/media/media_remoting_interstitial.cc b/third_party/blink/renderer/core/html/media/media_remoting_interstitial.cc
index f62a329..9b4c467 100644
--- a/third_party/blink/renderer/core/html/media/media_remoting_interstitial.cc
+++ b/third_party/blink/renderer/core/html/media/media_remoting_interstitial.cc
@@ -34,7 +34,7 @@
   background_image_ = HTMLImageElement::Create(GetDocument());
   background_image_->SetShadowPseudoId(
       AtomicString("-internal-media-interstitial-background-image"));
-  background_image_->SetSrc(videoElement.getAttribute(HTMLNames::posterAttr));
+  background_image_->SetSrc(videoElement.getAttribute(html_names::kPosterAttr));
   AppendChild(background_image_);
 
   cast_icon_ = HTMLDivElement::Create(GetDocument());
@@ -141,7 +141,7 @@
 
 void MediaRemotingInterstitial::OnPosterImageChanged() {
   background_image_->SetSrc(
-      GetVideoElement().getAttribute(HTMLNames::posterAttr));
+      GetVideoElement().getAttribute(html_names::kPosterAttr));
 }
 
 void MediaRemotingInterstitial::Trace(blink::Visitor* visitor) {
diff --git a/third_party/blink/renderer/core/html/media/picture_in_picture_interstitial.cc b/third_party/blink/renderer/core/html/media/picture_in_picture_interstitial.cc
index e0adc278..06712a7 100644
--- a/third_party/blink/renderer/core/html/media/picture_in_picture_interstitial.cc
+++ b/third_party/blink/renderer/core/html/media/picture_in_picture_interstitial.cc
@@ -70,7 +70,7 @@
   background_image_ = HTMLImageElement::Create(GetDocument());
   background_image_->SetShadowPseudoId(
       AtomicString("-internal-media-interstitial-background-image"));
-  background_image_->SetSrc(videoElement.getAttribute(HTMLNames::posterAttr));
+  background_image_->SetSrc(videoElement.getAttribute(html_names::kPosterAttr));
   ParserAppendChild(background_image_);
 
   message_element_ = HTMLDivElement::Create(GetDocument());
@@ -157,7 +157,7 @@
 
 void PictureInPictureInterstitial::OnPosterImageChanged() {
   background_image_->SetSrc(
-      GetVideoElement().getAttribute(HTMLNames::posterAttr));
+      GetVideoElement().getAttribute(html_names::kPosterAttr));
 }
 
 void PictureInPictureInterstitial::Trace(blink::Visitor* visitor) {
diff --git a/third_party/blink/renderer/core/html/parser/background_html_parser.cc b/third_party/blink/renderer/core/html/parser/background_html_parser.cc
index b4a5845..a3f4480 100644
--- a/third_party/blink/renderer/core/html/parser/background_html_parser.cc
+++ b/third_party/blink/renderer/core/html/parser/background_html_parser.cc
@@ -66,8 +66,6 @@
 static_assert(kOutstandingTokenLimit > kPendingTokenLimit,
               "Outstanding token limit is applied after pending token limit.");
 
-using namespace HTMLNames;
-
 base::WeakPtr<BackgroundHTMLParser> BackgroundHTMLParser::Create(
     std::unique_ptr<Configuration> config,
     scoped_refptr<base::SingleThreadTaskRunner> loading_task_runner) {
diff --git a/third_party/blink/renderer/core/html/parser/html_construction_site.cc b/third_party/blink/renderer/core/html/parser/html_construction_site.cc
index 4e8e092..65faae0 100644
--- a/third_party/blink/renderer/core/html/parser/html_construction_site.cc
+++ b/third_party/blink/renderer/core/html/parser/html_construction_site.cc
@@ -68,7 +68,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 static const unsigned kMaximumHTMLParserDOMTreeDepth = 512;
 
@@ -85,11 +85,11 @@
 }
 
 static bool HasImpliedEndTag(const HTMLStackItem* item) {
-  return item->HasTagName(ddTag) || item->HasTagName(dtTag) ||
-         item->HasTagName(liTag) || item->HasTagName(optionTag) ||
-         item->HasTagName(optgroupTag) || item->HasTagName(pTag) ||
-         item->HasTagName(rbTag) || item->HasTagName(rpTag) ||
-         item->HasTagName(rtTag) || item->HasTagName(rtcTag);
+  return item->HasTagName(kDdTag) || item->HasTagName(kDtTag) ||
+         item->HasTagName(kLiTag) || item->HasTagName(kOptionTag) ||
+         item->HasTagName(kOptgroupTag) || item->HasTagName(kPTag) ||
+         item->HasTagName(kRbTag) || item->HasTagName(kRpTag) ||
+         item->HasTagName(kRtTag) || item->HasTagName(kRTCTag);
 }
 
 static bool ShouldUseLengthLimit(const ContainerNode& node) {
@@ -413,9 +413,9 @@
     AtomicHTMLToken* token) {
   DCHECK(document_);
   HTMLHtmlElement* element;
-  if (const auto* is_attribute = token->GetAttributeItem(HTMLNames::isAttr)) {
+  if (const auto* is_attribute = token->GetAttributeItem(html_names::kIsAttr)) {
     element = ToHTMLHtmlElement(document_->CreateElement(
-        HTMLNames::htmlTag, GetCreateElementFlags(), is_attribute->Value()));
+        html_names::kHTMLTag, GetCreateElementFlags(), is_attribute->Value()));
   } else {
     element = HTMLHtmlElement::Create(*document_);
   }
@@ -737,9 +737,9 @@
                           kAllowScriptingContentAndDoNotMarkAlreadyStarted)
       .SetAlreadyStarted(is_parsing_fragment_ && flags.IsCreatedByParser());
   HTMLScriptElement* element = nullptr;
-  if (const auto* is_attribute = token->GetAttributeItem(HTMLNames::isAttr)) {
+  if (const auto* is_attribute = token->GetAttributeItem(html_names::kIsAttr)) {
     element = ToHTMLScriptElement(OwnerDocumentForCurrentNode().CreateElement(
-        HTMLNames::scriptTag, flags, is_attribute->Value()));
+        html_names::kScriptTag, flags, is_attribute->Value()));
   } else {
     element = HTMLScriptElement::Create(OwnerDocumentForCurrentNode(), flags);
   }
@@ -848,7 +848,7 @@
     const QualifiedName& tag_name,
     const AtomicString& is) {
   // "1. If namespace is not the HTML namespace, return null."
-  if (tag_name.NamespaceURI() != HTMLNames::xhtmlNamespaceURI)
+  if (tag_name.NamespaceURI() != html_names::xhtmlNamespaceURI)
     return nullptr;
 
   // "2. If document does not have a browsing context, return null."
@@ -881,7 +881,7 @@
   // "2. Let local name be the tag name of the token."
   QualifiedName tag_name(g_null_atom, token->GetName(), namespace_uri);
   // "3. Let is be the value of the "is" attribute in the given token ..." etc.
-  const Attribute* is_attribute = token->GetAttributeItem(HTMLNames::isAttr);
+  const Attribute* is_attribute = token->GetAttributeItem(html_names::kIsAttr);
   const AtomicString& is = is_attribute ? is_attribute->Value() : g_null_atom;
   // "4. Let definition be the result of looking up a custom element ..." etc.
   auto* definition = LookUpCustomElementDefinition(document, tag_name, is);
@@ -1062,11 +1062,11 @@
 void HTMLConstructionSite::FindFosterSite(HTMLConstructionSiteTask& task) {
   // 2.1
   HTMLElementStack::ElementRecord* last_template =
-      open_elements_.Topmost(templateTag.LocalName());
+      open_elements_.Topmost(kTemplateTag.LocalName());
 
   // 2.2
   HTMLElementStack::ElementRecord* last_table =
-      open_elements_.Topmost(tableTag.LocalName());
+      open_elements_.Topmost(kTableTag.LocalName());
 
   // 2.3
   if (last_template && (!last_table || last_template->IsAbove(last_table))) {
diff --git a/third_party/blink/renderer/core/html/parser/html_document_parser.cc b/third_party/blink/renderer/core/html/parser/html_document_parser.cc
index 5637e2f1..1a2ab68 100644
--- a/third_party/blink/renderer/core/html/parser/html_document_parser.cc
+++ b/third_party/blink/renderer/core/html/parser/html_document_parser.cc
@@ -64,7 +64,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 // This is a direct transcription of step 4 from:
 // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#fragment-case
@@ -77,19 +77,19 @@
 
   const QualifiedName& context_tag = context_element->TagQName();
 
-  if (context_tag.Matches(titleTag) || context_tag.Matches(textareaTag))
+  if (context_tag.Matches(kTitleTag) || context_tag.Matches(kTextareaTag))
     return HTMLTokenizer::kRCDATAState;
-  if (context_tag.Matches(styleTag) || context_tag.Matches(xmpTag) ||
-      context_tag.Matches(iframeTag) ||
-      (context_tag.Matches(noembedTag) && options.plugins_enabled) ||
-      (context_tag.Matches(noscriptTag) && options.script_enabled) ||
-      context_tag.Matches(noframesTag))
+  if (context_tag.Matches(kStyleTag) || context_tag.Matches(kXmpTag) ||
+      context_tag.Matches(kIFrameTag) ||
+      (context_tag.Matches(kNoembedTag) && options.plugins_enabled) ||
+      (context_tag.Matches(kNoscriptTag) && options.script_enabled) ||
+      context_tag.Matches(kNoframesTag))
     return report_errors ? HTMLTokenizer::kRAWTEXTState
                          : HTMLTokenizer::kPLAINTEXTState;
-  if (context_tag.Matches(scriptTag))
+  if (context_tag.Matches(kScriptTag))
     return report_errors ? HTMLTokenizer::kScriptDataState
                          : HTMLTokenizer::kPLAINTEXTState;
-  if (context_tag.Matches(plaintextTag))
+  if (context_tag.Matches(kPlaintextTag))
     return HTMLTokenizer::kPLAINTEXTState;
   return HTMLTokenizer::kDataState;
 }
diff --git a/third_party/blink/renderer/core/html/parser/html_document_parser_loading_test.cc b/third_party/blink/renderer/core/html/parser/html_document_parser_loading_test.cc
index ccbd0f74..2c95e30 100644
--- a/third_party/blink/renderer/core/html/parser/html_document_parser_loading_test.cc
+++ b/third_party/blink/renderer/core/html/parser/html_document_parser_loading_test.cc
@@ -6,7 +6,6 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/renderer/core/dom/document.h"
-#include "third_party/blink/renderer/core/html_names.h"
 #include "third_party/blink/renderer/core/testing/sim/sim_request.h"
 #include "third_party/blink/renderer/core/testing/sim/sim_test.h"
 #include "third_party/blink/renderer/platform/testing/histogram_tester.h"
@@ -14,8 +13,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 class HTMLDocumentParserSimTest : public SimTest {
  protected:
   HTMLDocumentParserSimTest() {
diff --git a/third_party/blink/renderer/core/html/parser/html_element_stack.cc b/third_party/blink/renderer/core/html/parser/html_element_stack.cc
index ed87e39..5b43a33 100644
--- a/third_party/blink/renderer/core/html/parser/html_element_stack.cc
+++ b/third_party/blink/renderer/core/html/parser/html_element_stack.cc
@@ -36,19 +36,19 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 namespace {
 
 inline bool IsRootNode(HTMLStackItem* item) {
-  return item->IsDocumentFragmentNode() || item->HasTagName(htmlTag);
+  return item->IsDocumentFragmentNode() || item->HasTagName(kHTMLTag);
 }
 
 inline bool IsScopeMarker(HTMLStackItem* item) {
-  return item->HasTagName(appletTag) || item->HasTagName(captionTag) ||
-         item->HasTagName(marqueeTag) || item->HasTagName(objectTag) ||
-         item->HasTagName(tableTag) || item->HasTagName(tdTag) ||
-         item->HasTagName(thTag) || item->HasTagName(mathml_names::kMiTag) ||
+  return item->HasTagName(kAppletTag) || item->HasTagName(kCaptionTag) ||
+         item->HasTagName(kMarqueeTag) || item->HasTagName(kObjectTag) ||
+         item->HasTagName(kTableTag) || item->HasTagName(kTdTag) ||
+         item->HasTagName(kThTag) || item->HasTagName(mathml_names::kMiTag) ||
          item->HasTagName(mathml_names::kMoTag) ||
          item->HasTagName(mathml_names::kMnTag) ||
          item->HasTagName(mathml_names::kMsTag) ||
@@ -57,27 +57,27 @@
          item->HasTagName(svg_names::kForeignObjectTag) ||
          item->HasTagName(svg_names::kDescTag) ||
          item->HasTagName(svg_names::kTitleTag) ||
-         item->HasTagName(templateTag) || IsRootNode(item);
+         item->HasTagName(kTemplateTag) || IsRootNode(item);
 }
 
 inline bool IsListItemScopeMarker(HTMLStackItem* item) {
-  return IsScopeMarker(item) || item->HasTagName(olTag) ||
-         item->HasTagName(ulTag);
+  return IsScopeMarker(item) || item->HasTagName(kOlTag) ||
+         item->HasTagName(kUlTag);
 }
 
 inline bool IsTableScopeMarker(HTMLStackItem* item) {
-  return item->HasTagName(tableTag) || item->HasTagName(templateTag) ||
+  return item->HasTagName(kTableTag) || item->HasTagName(kTemplateTag) ||
          IsRootNode(item);
 }
 
 inline bool IsTableBodyScopeMarker(HTMLStackItem* item) {
-  return item->HasTagName(tbodyTag) || item->HasTagName(tfootTag) ||
-         item->HasTagName(theadTag) || item->HasTagName(templateTag) ||
+  return item->HasTagName(kTbodyTag) || item->HasTagName(kTfootTag) ||
+         item->HasTagName(kTheadTag) || item->HasTagName(kTemplateTag) ||
          IsRootNode(item);
 }
 
 inline bool IsTableRowScopeMarker(HTMLStackItem* item) {
-  return item->HasTagName(trTag) || item->HasTagName(templateTag) ||
+  return item->HasTagName(kTrTag) || item->HasTagName(kTemplateTag) ||
          IsRootNode(item);
 }
 
@@ -88,11 +88,11 @@
 }
 
 inline bool IsButtonScopeMarker(HTMLStackItem* item) {
-  return IsScopeMarker(item) || item->HasTagName(buttonTag);
+  return IsScopeMarker(item) || item->HasTagName(kButtonTag);
 }
 
 inline bool IsSelectScopeMarker(HTMLStackItem* item) {
-  return !item->HasTagName(optgroupTag) && !item->HasTagName(optionTag);
+  return !item->HasTagName(kOptgroupTag) && !item->HasTagName(kOptionTag);
 }
 
 }  // namespace
@@ -175,7 +175,7 @@
 }
 
 void HTMLElementStack::Pop() {
-  DCHECK(!TopStackItem()->HasTagName(HTMLNames::headTag));
+  DCHECK(!TopStackItem()->HasTagName(html_names::kHeadTag));
   PopCommon();
 }
 
@@ -266,7 +266,7 @@
 }
 
 void HTMLElementStack::PushHTMLHtmlElement(HTMLStackItem* item) {
-  DCHECK(item->HasTagName(htmlTag));
+  DCHECK(item->HasTagName(kHTMLTag));
   PushRootNodeCommon(item);
 }
 
@@ -278,23 +278,23 @@
 }
 
 void HTMLElementStack::PushHTMLHeadElement(HTMLStackItem* item) {
-  DCHECK(item->HasTagName(HTMLNames::headTag));
+  DCHECK(item->HasTagName(html_names::kHeadTag));
   DCHECK(!head_element_);
   head_element_ = item->GetElement();
   PushCommon(item);
 }
 
 void HTMLElementStack::PushHTMLBodyElement(HTMLStackItem* item) {
-  DCHECK(item->HasTagName(HTMLNames::bodyTag));
+  DCHECK(item->HasTagName(html_names::kBodyTag));
   DCHECK(!body_element_);
   body_element_ = item->GetElement();
   PushCommon(item);
 }
 
 void HTMLElementStack::Push(HTMLStackItem* item) {
-  DCHECK(!item->HasTagName(htmlTag));
-  DCHECK(!item->HasTagName(headTag));
-  DCHECK(!item->HasTagName(bodyTag));
+  DCHECK(!item->HasTagName(kHTMLTag));
+  DCHECK(!item->HasTagName(kHeadTag));
+  DCHECK(!item->HasTagName(kBodyTag));
   DCHECK(root_node_);
   PushCommon(item);
 }
@@ -304,9 +304,9 @@
   DCHECK(item);
   DCHECK(record_below);
   DCHECK(top_);
-  DCHECK(!item->HasTagName(htmlTag));
-  DCHECK(!item->HasTagName(headTag));
-  DCHECK(!item->HasTagName(bodyTag));
+  DCHECK(!item->HasTagName(kHTMLTag));
+  DCHECK(!item->HasTagName(kHeadTag));
+  DCHECK(!item->HasTagName(kBodyTag));
   DCHECK(root_node_);
   if (record_below == top_) {
     Push(item);
@@ -464,7 +464,7 @@
 }
 
 bool HTMLElementStack::HasTemplateInHTMLScope() const {
-  return InScopeCommon<IsRootNode>(top_.Get(), templateTag.LocalName());
+  return InScopeCommon<IsRootNode>(top_.Get(), kTemplateTag.LocalName());
 }
 
 Element* HTMLElementStack::HtmlElement() const {
@@ -495,9 +495,9 @@
 }
 
 void HTMLElementStack::PopCommon() {
-  DCHECK(!TopStackItem()->HasTagName(htmlTag));
-  DCHECK(!TopStackItem()->HasTagName(headTag) || !head_element_);
-  DCHECK(!TopStackItem()->HasTagName(bodyTag) || !body_element_);
+  DCHECK(!TopStackItem()->HasTagName(kHTMLTag));
+  DCHECK(!TopStackItem()->HasTagName(kHeadTag) || !head_element_);
+  DCHECK(!TopStackItem()->HasTagName(kBodyTag) || !body_element_);
   Top()->FinishParsingChildren();
   top_ = top_->ReleaseNext();
 
diff --git a/third_party/blink/renderer/core/html/parser/html_meta_charset_parser.cc b/third_party/blink/renderer/core/html/parser/html_meta_charset_parser.cc
index c6386b81..be893b42 100644
--- a/third_party/blink/renderer/core/html/parser/html_meta_charset_parser.cc
+++ b/third_party/blink/renderer/core/html/parser/html_meta_charset_parser.cc
@@ -34,7 +34,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 HTMLMetaCharsetParser::HTMLMetaCharsetParser()
     : tokenizer_(HTMLTokenizer::Create(HTMLParserOptions(nullptr))),
@@ -94,22 +94,22 @@
           AttemptStaticStringCreation(token_.GetName(), kLikely8Bit);
       if (!end) {
         tokenizer_->UpdateStateFor(tag_name);
-        if (ThreadSafeMatch(tag_name, metaTag) && ProcessMeta()) {
+        if (ThreadSafeMatch(tag_name, kMetaTag) && ProcessMeta()) {
           done_checking_ = true;
           return true;
         }
       }
 
-      if (!ThreadSafeMatch(tag_name, scriptTag) &&
-          !ThreadSafeMatch(tag_name, noscriptTag) &&
-          !ThreadSafeMatch(tag_name, styleTag) &&
-          !ThreadSafeMatch(tag_name, linkTag) &&
-          !ThreadSafeMatch(tag_name, metaTag) &&
-          !ThreadSafeMatch(tag_name, objectTag) &&
-          !ThreadSafeMatch(tag_name, titleTag) &&
-          !ThreadSafeMatch(tag_name, baseTag) &&
-          (end || !ThreadSafeMatch(tag_name, htmlTag)) &&
-          (end || !ThreadSafeMatch(tag_name, headTag))) {
+      if (!ThreadSafeMatch(tag_name, kScriptTag) &&
+          !ThreadSafeMatch(tag_name, kNoscriptTag) &&
+          !ThreadSafeMatch(tag_name, kStyleTag) &&
+          !ThreadSafeMatch(tag_name, kLinkTag) &&
+          !ThreadSafeMatch(tag_name, kMetaTag) &&
+          !ThreadSafeMatch(tag_name, kObjectTag) &&
+          !ThreadSafeMatch(tag_name, kTitleTag) &&
+          !ThreadSafeMatch(tag_name, kBaseTag) &&
+          (end || !ThreadSafeMatch(tag_name, kHTMLTag)) &&
+          (end || !ThreadSafeMatch(tag_name, kHeadTag))) {
         in_head_section_ = false;
       }
     }
diff --git a/third_party/blink/renderer/core/html/parser/html_parser_idioms.cc b/third_party/blink/renderer/core/html/parser/html_parser_idioms.cc
index 0a09f4c..4200c56 100644
--- a/third_party/blink/renderer/core/html/parser/html_parser_idioms.cc
+++ b/third_party/blink/renderer/core/html/parser/html_parser_idioms.cc
@@ -36,7 +36,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 template <typename CharType>
 static String StripLeadingAndTrailingHTMLSpaces(String string,
@@ -380,14 +380,14 @@
     const String& attribute_name = html_attribute.first;
     const AtomicString& attribute_value = AtomicString(html_attribute.second);
 
-    if (ThreadSafeMatch(attribute_name, http_equivAttr)) {
+    if (ThreadSafeMatch(attribute_name, kHttpEquivAttr)) {
       if (DeprecatedEqualIgnoringCase(attribute_value, "content-type"))
         got_pragma = true;
-    } else if (ThreadSafeMatch(attribute_name, charsetAttr)) {
+    } else if (ThreadSafeMatch(attribute_name, kCharsetAttr)) {
       has_charset = true;
       charset = attribute_value;
       mode = MetaAttribute::kCharset;
-    } else if (!has_charset && ThreadSafeMatch(attribute_name, contentAttr)) {
+    } else if (!has_charset && ThreadSafeMatch(attribute_name, kContentAttr)) {
       charset = ExtractCharset(attribute_value);
       if (charset.length())
         mode = MetaAttribute::kPragma;
diff --git a/third_party/blink/renderer/core/html/parser/html_preload_scanner.cc b/third_party/blink/renderer/core/html/parser/html_preload_scanner.cc
index 522568d..e88c031 100644
--- a/third_party/blink/renderer/core/html/parser/html_preload_scanner.cc
+++ b/third_party/blink/renderer/core/html/parser/html_preload_scanner.cc
@@ -62,7 +62,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 static bool Match(const StringImpl* impl, const QualifiedName& q_name) {
   return impl == q_name.LocalName().Impl();
@@ -94,16 +94,16 @@
 
 static String InitiatorFor(const StringImpl* tag_impl) {
   DCHECK(tag_impl);
-  if (Match(tag_impl, imgTag))
-    return imgTag.LocalName();
-  if (Match(tag_impl, inputTag))
-    return inputTag.LocalName();
-  if (Match(tag_impl, linkTag))
-    return linkTag.LocalName();
-  if (Match(tag_impl, scriptTag))
-    return scriptTag.LocalName();
-  if (Match(tag_impl, videoTag))
-    return videoTag.LocalName();
+  if (Match(tag_impl, kImgTag))
+    return kImgTag.LocalName();
+  if (Match(tag_impl, kInputTag))
+    return kInputTag.LocalName();
+  if (Match(tag_impl, kLinkTag))
+    return kLinkTag.LocalName();
+  if (Match(tag_impl, kScriptTag))
+    return kScriptTag.LocalName();
+  if (Match(tag_impl, kVideoTag))
+    return kVideoTag.LocalName();
   NOTREACHED();
   return g_empty_string;
 }
@@ -157,12 +157,12 @@
         width_attr_small_absolute_(false),
         height_attr_small_absolute_(false),
         scanner_type_(scanner_type) {
-    if (Match(tag_impl_, imgTag) || Match(tag_impl_, sourceTag)) {
+    if (Match(tag_impl_, kImgTag) || Match(tag_impl_, kSourceTag)) {
       source_size_ = SizesAttributeParser(media_values_, String()).length();
       return;
     }
-    if (!Match(tag_impl_, inputTag) && !Match(tag_impl_, linkTag) &&
-        !Match(tag_impl_, scriptTag) && !Match(tag_impl_, videoTag))
+    if (!Match(tag_impl_, kInputTag) && !Match(tag_impl_, kLinkTag) &&
+        !Match(tag_impl_, kScriptTag) && !Match(tag_impl_, kVideoTag))
       tag_impl_ = nullptr;
   }
 
@@ -191,14 +191,14 @@
   }
 
   void PostProcessAfterAttributes() {
-    if (Match(tag_impl_, imgTag) ||
+    if (Match(tag_impl_, kImgTag) ||
         (link_is_preload_ && as_attribute_value_ == "image" &&
          RuntimeEnabledFeatures::PreloadImageSrcSetEnabled()))
       SetUrlFromImageAttributes();
   }
 
   void HandlePictureSourceURL(PictureData& picture_data) {
-    if (Match(tag_impl_, sourceTag) && matched_ &&
+    if (Match(tag_impl_, kSourceTag) && matched_ &&
         picture_data.source_url.IsEmpty()) {
       // Must create an IsolatedCopy() since the srcset attribute value will get
       // sent back to the main thread between when we set this, and when we
@@ -210,7 +210,8 @@
       picture_data.source_size_set = source_size_set_;
       picture_data.source_size = source_size_;
       picture_data.picked = true;
-    } else if (Match(tag_impl_, imgTag) && !picture_data.source_url.IsEmpty()) {
+    } else if (Match(tag_impl_, kImgTag) &&
+               !picture_data.source_url.IsEmpty()) {
       SetUrlToLoad(picture_data.source_url, kAllowURLReplacement);
     }
   }
@@ -276,7 +277,7 @@
     if (!request)
       return nullptr;
 
-    if ((Match(tag_impl_, scriptTag) && type_attribute_value_ == "module") ||
+    if ((Match(tag_impl_, kScriptTag) && type_attribute_value_ == "module") ||
         IsLinkRelModulePreload()) {
       request->SetScriptType(ScriptType::kModule);
     }
@@ -297,7 +298,7 @@
 
     // The only link tags that should keep the integrity metadata are
     // stylesheets until crbug.com/677022 is resolved.
-    if (link_is_style_sheet_ || !Match(tag_impl_, linkTag))
+    if (link_is_style_sheet_ || !Match(tag_impl_, kLinkTag))
       request->SetIntegrityMetadata(integrity_metadata_);
 
     if (scanner_type_ == ScannerType::kInsertion)
@@ -311,28 +312,28 @@
   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, kSrcAttr)) {
       SetUrlToLoad(attribute_value, kDisallowURLReplacement);
-    } else if (Match(attribute_name, crossoriginAttr)) {
+    } else if (Match(attribute_name, kCrossoriginAttr)) {
       SetCrossOrigin(attribute_value);
-    } else if (Match(attribute_name, nonceAttr)) {
+    } else if (Match(attribute_name, kNonceAttr)) {
       SetNonce(attribute_value);
-    } else if (Match(attribute_name, asyncAttr)) {
+    } else if (Match(attribute_name, kAsyncAttr)) {
       SetDefer(FetchParameters::kLazyLoad);
-    } else if (Match(attribute_name, deferAttr)) {
+    } else if (Match(attribute_name, kDeferAttr)) {
       SetDefer(FetchParameters::kLazyLoad);
-    } else if (!integrity_attr_set_ && Match(attribute_name, integrityAttr)) {
+    } else if (!integrity_attr_set_ && Match(attribute_name, kIntegrityAttr)) {
       integrity_attr_set_ = true;
       SubresourceIntegrity::ParseIntegrityAttribute(
           attribute_value, integrity_features_, integrity_metadata_);
-    } else if (Match(attribute_name, typeAttr)) {
+    } else if (Match(attribute_name, kTypeAttr)) {
       type_attribute_value_ = attribute_value;
-    } else if (Match(attribute_name, languageAttr)) {
+    } else if (Match(attribute_name, kLanguageAttr)) {
       language_attribute_value_ = attribute_value;
-    } else if (Match(attribute_name, nomoduleAttr)) {
+    } else if (Match(attribute_name, kNomoduleAttr)) {
       nomodule_attribute_value_ = true;
     } else if (!referrer_policy_set_ &&
-               Match(attribute_name, referrerpolicyAttr) &&
+               Match(attribute_name, kReferrerpolicyAttr) &&
                !attribute_value.IsNull()) {
       SetReferrerPolicy(attribute_value,
                         kDoNotSupportReferrerPolicyLegacyKeywords);
@@ -342,34 +343,35 @@
   template <typename NameType>
   void ProcessImgAttribute(const NameType& attribute_name,
                            const String& attribute_value) {
-    if (Match(attribute_name, srcAttr) && img_src_url_.IsNull()) {
+    if (Match(attribute_name, kSrcAttr) && img_src_url_.IsNull()) {
       img_src_url_ = attribute_value;
-    } else if (Match(attribute_name, crossoriginAttr)) {
+    } else if (Match(attribute_name, kCrossoriginAttr)) {
       SetCrossOrigin(attribute_value);
-    } else if (Match(attribute_name, srcsetAttr) &&
+    } else if (Match(attribute_name, kSrcsetAttr) &&
                srcset_attribute_value_.IsNull()) {
       srcset_attribute_value_ = attribute_value;
-    } else if (Match(attribute_name, sizesAttr) && !source_size_set_) {
+    } else if (Match(attribute_name, kSizesAttr) && !source_size_set_) {
       ParseSourceSize(attribute_value);
     } else if (!referrer_policy_set_ &&
-               Match(attribute_name, referrerpolicyAttr) &&
+               Match(attribute_name, kReferrerpolicyAttr) &&
                !attribute_value.IsNull()) {
       SetReferrerPolicy(attribute_value, kSupportReferrerPolicyLegacyKeywords);
-    } else if (!importance_mode_set_ && Match(attribute_name, importanceAttr) &&
+    } else if (!importance_mode_set_ &&
+               Match(attribute_name, kImportanceAttr) &&
                RuntimeEnabledFeatures::PriorityHintsEnabled()) {
       SetImportance(attribute_value);
     } else if (!lazyload_attr_set_to_off_ &&
-               Match(attribute_name, lazyloadAttr) &&
+               Match(attribute_name, kLazyloadAttr) &&
                RuntimeEnabledFeatures::LazyImageLoadingEnabled() &&
                EqualIgnoringASCIICase(attribute_value, "off")) {
       lazyload_attr_set_to_off_ = true;
     } else if (!width_attr_small_absolute_ &&
-               Match(attribute_name, widthAttr) &&
+               Match(attribute_name, kWidthAttr) &&
                RuntimeEnabledFeatures::LazyImageLoadingEnabled()) {
       width_attr_small_absolute_ =
           IsDimensionSmallAndAbsoluteForLazyLoad(attribute_value);
     } else if (!height_attr_small_absolute_ &&
-               Match(attribute_name, heightAttr) &&
+               Match(attribute_name, kHeightAttr) &&
                RuntimeEnabledFeatures::LazyImageLoadingEnabled()) {
       height_attr_small_absolute_ =
           IsDimensionSmallAndAbsoluteForLazyLoad(attribute_value);
@@ -390,11 +392,11 @@
   void ProcessLinkAttribute(const NameType& attribute_name,
                             const String& attribute_value) {
     // FIXME - Don't set rel/media/crossorigin multiple times.
-    if (Match(attribute_name, hrefAttr)) {
+    if (Match(attribute_name, kHrefAttr)) {
       SetUrlToLoad(attribute_value, kDisallowURLReplacement);
       // Used in SetUrlFromImageAttributes() when as=image.
       img_src_url_ = attribute_value;
-    } else if (Match(attribute_name, relAttr)) {
+    } else if (Match(attribute_name, kRelAttr)) {
       LinkRelAttribute rel(attribute_value);
       link_is_style_sheet_ = rel.IsStyleSheet() && !rel.IsAlternate() &&
                              rel.GetIconType() == kInvalidIcon &&
@@ -403,31 +405,32 @@
       link_is_preload_ = rel.IsLinkPreload();
       link_is_modulepreload_ = rel.IsModulePreload();
       link_is_import_ = rel.IsImport();
-    } else if (Match(attribute_name, mediaAttr)) {
+    } else if (Match(attribute_name, kMediaAttr)) {
       matched_ &= MediaAttributeMatches(*media_values_, attribute_value);
-    } else if (Match(attribute_name, crossoriginAttr)) {
+    } else if (Match(attribute_name, kCrossoriginAttr)) {
       SetCrossOrigin(attribute_value);
-    } else if (Match(attribute_name, nonceAttr)) {
+    } else if (Match(attribute_name, kNonceAttr)) {
       SetNonce(attribute_value);
-    } else if (Match(attribute_name, asAttr)) {
+    } else if (Match(attribute_name, kAsAttr)) {
       as_attribute_value_ = attribute_value.DeprecatedLower();
-    } else if (Match(attribute_name, typeAttr)) {
+    } else if (Match(attribute_name, kTypeAttr)) {
       type_attribute_value_ = attribute_value;
     } else if (!referrer_policy_set_ &&
-               Match(attribute_name, referrerpolicyAttr) &&
+               Match(attribute_name, kReferrerpolicyAttr) &&
                !attribute_value.IsNull()) {
       SetReferrerPolicy(attribute_value,
                         kDoNotSupportReferrerPolicyLegacyKeywords);
-    } else if (!integrity_attr_set_ && Match(attribute_name, integrityAttr)) {
+    } else if (!integrity_attr_set_ && Match(attribute_name, kIntegrityAttr)) {
       integrity_attr_set_ = true;
       SubresourceIntegrity::ParseIntegrityAttribute(
           attribute_value, integrity_features_, integrity_metadata_);
-    } else if (Match(attribute_name, srcsetAttr) &&
+    } else if (Match(attribute_name, kSrcsetAttr) &&
                srcset_attribute_value_.IsNull()) {
       srcset_attribute_value_ = attribute_value;
-    } else if (Match(attribute_name, imgsizesAttr) && !source_size_set_) {
+    } else if (Match(attribute_name, kImgsizesAttr) && !source_size_set_) {
       ParseSourceSize(attribute_value);
-    } else if (!importance_mode_set_ && Match(attribute_name, importanceAttr) &&
+    } else if (!importance_mode_set_ &&
+               Match(attribute_name, kImportanceAttr) &&
                RuntimeEnabledFeatures::PriorityHintsEnabled()) {
       SetImportance(attribute_value);
     }
@@ -437,33 +440,33 @@
   void ProcessInputAttribute(const NameType& attribute_name,
                              const String& attribute_value) {
     // FIXME - Don't set type multiple times.
-    if (Match(attribute_name, srcAttr)) {
+    if (Match(attribute_name, kSrcAttr)) {
       SetUrlToLoad(attribute_value, kDisallowURLReplacement);
-    } else if (Match(attribute_name, typeAttr)) {
-      input_is_image_ =
-          DeprecatedEqualIgnoringCase(attribute_value, InputTypeNames::image);
+    } else if (Match(attribute_name, kTypeAttr)) {
+      input_is_image_ = DeprecatedEqualIgnoringCase(attribute_value,
+                                                    input_type_names::kImage);
     }
   }
 
   template <typename NameType>
   void ProcessSourceAttribute(const NameType& attribute_name,
                               const String& attribute_value) {
-    if (Match(attribute_name, srcsetAttr) &&
+    if (Match(attribute_name, kSrcsetAttr) &&
         srcset_image_candidate_.IsEmpty()) {
       srcset_attribute_value_ = attribute_value;
       srcset_image_candidate_ = BestFitSourceForSrcsetAttribute(
           media_values_->DevicePixelRatio(), source_size_, attribute_value);
-    } else if (Match(attribute_name, sizesAttr) && !source_size_set_) {
+    } else if (Match(attribute_name, kSizesAttr) && !source_size_set_) {
       ParseSourceSize(attribute_value);
       if (!srcset_image_candidate_.IsEmpty()) {
         srcset_image_candidate_ = BestFitSourceForSrcsetAttribute(
             media_values_->DevicePixelRatio(), source_size_,
             srcset_attribute_value_);
       }
-    } else if (Match(attribute_name, mediaAttr)) {
+    } else if (Match(attribute_name, kMediaAttr)) {
       // FIXME - Don't match media multiple times.
       matched_ &= MediaAttributeMatches(*media_values_, attribute_value);
-    } else if (Match(attribute_name, typeAttr)) {
+    } else if (Match(attribute_name, kTypeAttr)) {
       matched_ &= MIMETypeRegistry::IsSupportedImagePrefixedMIMEType(
           ContentType(attribute_value).GetType());
     }
@@ -472,29 +475,29 @@
   template <typename NameType>
   void ProcessVideoAttribute(const NameType& attribute_name,
                              const String& attribute_value) {
-    if (Match(attribute_name, posterAttr))
+    if (Match(attribute_name, kPosterAttr))
       SetUrlToLoad(attribute_value, kDisallowURLReplacement);
-    else if (Match(attribute_name, crossoriginAttr))
+    else if (Match(attribute_name, kCrossoriginAttr))
       SetCrossOrigin(attribute_value);
   }
 
   template <typename NameType>
   void ProcessAttribute(const NameType& attribute_name,
                         const String& attribute_value) {
-    if (Match(attribute_name, charsetAttr))
+    if (Match(attribute_name, kCharsetAttr))
       charset_ = attribute_value;
 
-    if (Match(tag_impl_, scriptTag))
+    if (Match(tag_impl_, kScriptTag))
       ProcessScriptAttribute(attribute_name, attribute_value);
-    else if (Match(tag_impl_, imgTag))
+    else if (Match(tag_impl_, kImgTag))
       ProcessImgAttribute(attribute_name, attribute_value);
-    else if (Match(tag_impl_, linkTag))
+    else if (Match(tag_impl_, kLinkTag))
       ProcessLinkAttribute(attribute_name, attribute_value);
-    else if (Match(tag_impl_, inputTag))
+    else if (Match(tag_impl_, kInputTag))
       ProcessInputAttribute(attribute_name, attribute_value);
-    else if (Match(tag_impl_, sourceTag))
+    else if (Match(tag_impl_, kSourceTag))
       ProcessSourceAttribute(attribute_name, attribute_value);
-    else if (Match(tag_impl_, videoTag))
+    else if (Match(tag_impl_, kVideoTag))
       ProcessVideoAttribute(attribute_name, attribute_value);
   }
 
@@ -512,7 +515,7 @@
   const String& Charset() const {
     // FIXME: Its not clear that this if is needed, the loader probably ignores
     // charset for image requests anyway.
-    if (Match(tag_impl_, imgTag) || Match(tag_impl_, videoTag))
+    if (Match(tag_impl_, kImgTag) || Match(tag_impl_, kVideoTag))
       return g_empty_string;
     return charset_;
   }
@@ -523,34 +526,33 @@
   }
 
   ResourceType GetResourceType() const {
-    if (Match(tag_impl_, scriptTag)) {
+    if (Match(tag_impl_, kScriptTag))
       return ResourceType::kScript;
-    } else if (Match(tag_impl_, imgTag) || Match(tag_impl_, videoTag) ||
-               (Match(tag_impl_, inputTag) && input_is_image_)) {
+    if (Match(tag_impl_, kImgTag) || Match(tag_impl_, kVideoTag) ||
+        (Match(tag_impl_, kInputTag) && input_is_image_))
       return ResourceType::kImage;
-    } else if (Match(tag_impl_, linkTag) && link_is_style_sheet_) {
+    if (Match(tag_impl_, kLinkTag) && link_is_style_sheet_)
       return ResourceType::kCSSStyleSheet;
-    } else if (link_is_preconnect_) {
+    if (link_is_preconnect_)
       return ResourceType::kRaw;
-    } else if (Match(tag_impl_, linkTag) && link_is_import_) {
+    if (Match(tag_impl_, kLinkTag) && link_is_import_)
       return ResourceType::kImportResource;
-    }
     NOTREACHED();
     return ResourceType::kRaw;
   }
 
   bool ShouldPreconnect() const {
-    return Match(tag_impl_, linkTag) && link_is_preconnect_ &&
+    return Match(tag_impl_, kLinkTag) && link_is_preconnect_ &&
            !url_to_load_.IsEmpty();
   }
 
   bool IsLinkRelPreload() const {
-    return Match(tag_impl_, linkTag) && link_is_preload_ &&
+    return Match(tag_impl_, kLinkTag) && link_is_preload_ &&
            !url_to_load_.IsEmpty();
   }
 
   bool IsLinkRelModulePreload() const {
-    return Match(tag_impl_, linkTag) && link_is_modulepreload_ &&
+    return Match(tag_impl_, kLinkTag) && link_is_modulepreload_ &&
            !url_to_load_.IsEmpty();
   }
 
@@ -587,11 +589,11 @@
       return false;
     if (!matched_)
       return false;
-    if (Match(tag_impl_, linkTag))
+    if (Match(tag_impl_, kLinkTag))
       return ShouldPreloadLink(type);
-    if (Match(tag_impl_, inputTag) && !input_is_image_)
+    if (Match(tag_impl_, kInputTag) && !input_is_image_)
       return false;
-    if (Match(tag_impl_, scriptTag)) {
+    if (Match(tag_impl_, kScriptTag)) {
       ScriptType script_type = ScriptType::kClassic;
       if (!ScriptLoader::IsValidScriptTypeAndLanguage(
               type_attribute_value_, language_attribute_value_,
@@ -777,13 +779,13 @@
     CSSPreloadScanner* css_scanner,
     ViewportDescriptionWrapper* viewport) {
   const typename Token::Attribute* name_attribute =
-      token.GetAttributeItem(nameAttr);
+      token.GetAttributeItem(kNameAttr);
   if (!name_attribute)
     return;
 
   String name_attribute_value(name_attribute->Value());
   const typename Token::Attribute* content_attribute =
-      token.GetAttributeItem(contentAttr);
+      token.GetAttributeItem(kContentAttr);
   if (!content_attribute)
     return;
 
@@ -819,22 +821,22 @@
     }
     case HTMLToken::kEndTag: {
       const StringImpl* tag_impl = TagImplFor(token.Data());
-      if (Match(tag_impl, templateTag)) {
+      if (Match(tag_impl, kTemplateTag)) {
         if (template_count_)
           --template_count_;
         return;
       }
-      if (Match(tag_impl, styleTag)) {
+      if (Match(tag_impl, kStyleTag)) {
         if (in_style_)
           css_scanner_.Reset();
         in_style_ = false;
         return;
       }
-      if (Match(tag_impl, scriptTag)) {
+      if (Match(tag_impl, kScriptTag)) {
         in_script_ = false;
         return;
       }
-      if (Match(tag_impl, pictureTag)) {
+      if (Match(tag_impl, kPictureTag)) {
         in_picture_ = false;
         picture_data_.picked = false;
       }
@@ -844,29 +846,29 @@
       if (template_count_)
         return;
       const StringImpl* tag_impl = TagImplFor(token.Data());
-      if (Match(tag_impl, templateTag)) {
+      if (Match(tag_impl, kTemplateTag)) {
         ++template_count_;
         return;
       }
-      if (Match(tag_impl, styleTag)) {
+      if (Match(tag_impl, kStyleTag)) {
         in_style_ = true;
         return;
       }
       // Don't early return, because the StartTagScanner needs to look at these
       // too.
-      if (Match(tag_impl, scriptTag)) {
+      if (Match(tag_impl, kScriptTag)) {
         in_script_ = true;
       }
-      if (Match(tag_impl, baseTag)) {
+      if (Match(tag_impl, kBaseTag)) {
         // The first <base> element is the one that wins.
         if (!predicted_base_element_url_.IsEmpty())
           return;
         UpdatePredictedBaseURL(token);
         return;
       }
-      if (Match(tag_impl, metaTag)) {
+      if (Match(tag_impl, kMetaTag)) {
         const typename Token::Attribute* equiv_attribute =
-            token.GetAttributeItem(http_equivAttr);
+            token.GetAttributeItem(kHttpEquivAttr);
         if (equiv_attribute) {
           String equiv_attribute_value(equiv_attribute->Value());
           if (DeprecatedEqualIgnoringCase(equiv_attribute_value,
@@ -875,7 +877,7 @@
           } else if (DeprecatedEqualIgnoringCase(equiv_attribute_value,
                                                  "accept-ch")) {
             const typename Token::Attribute* content_attribute =
-                token.GetAttributeItem(contentAttr);
+                token.GetAttributeItem(kContentAttr);
             if (content_attribute) {
               client_hints_preferences_.UpdateFromAcceptClientHintsHeader(
                   content_attribute->Value(), document_url_, nullptr);
@@ -888,7 +890,7 @@
                                 media_values_.Get(), &css_scanner_, viewport);
       }
 
-      if (Match(tag_impl, pictureTag)) {
+      if (Match(tag_impl, kPictureTag)) {
         in_picture_ = true;
         picture_data_ = PictureData();
         return;
@@ -918,7 +920,7 @@
 void TokenPreloadScanner::UpdatePredictedBaseURL(const Token& token) {
   DCHECK(predicted_base_element_url_.IsEmpty());
   if (const typename Token::Attribute* href_attribute =
-          token.GetAttributeItem(hrefAttr)) {
+          token.GetAttributeItem(kHrefAttr)) {
     KURL url(document_url_, StripLeadingAndTrailingHTMLSpaces(
                                 href_attribute->Value8BitIfNecessary()));
     predicted_base_element_url_ =
diff --git a/third_party/blink/renderer/core/html/parser/html_stack_item.h b/third_party/blink/renderer/core/html/parser/html_stack_item.h
index d92c673..0aaf674 100644
--- a/third_party/blink/renderer/core/html/parser/html_stack_item.h
+++ b/third_party/blink/renderer/core/html/parser/html_stack_item.h
@@ -50,7 +50,7 @@
   static HTMLStackItem* Create(
       ContainerNode* node,
       AtomicHTMLToken* token,
-      const AtomicString& namespace_uri = HTMLNames::xhtmlNamespaceURI) {
+      const AtomicString& namespace_uri = html_names::xhtmlNamespaceURI) {
     return new HTMLStackItem(node, token, namespace_uri);
   }
 
@@ -82,36 +82,38 @@
 
   bool MatchesHTMLTag(const AtomicString& name) const {
     return token_local_name_ == name &&
-           namespace_uri_ == HTMLNames::xhtmlNamespaceURI;
+           namespace_uri_ == html_names::xhtmlNamespaceURI;
   }
   bool MatchesHTMLTag(const QualifiedName& name) const {
     return token_local_name_ == name &&
-           namespace_uri_ == HTMLNames::xhtmlNamespaceURI;
+           namespace_uri_ == html_names::xhtmlNamespaceURI;
   }
 
   bool CausesFosterParenting() {
-    return HasTagName(HTMLNames::tableTag) || HasTagName(HTMLNames::tbodyTag) ||
-           HasTagName(HTMLNames::tfootTag) || HasTagName(HTMLNames::theadTag) ||
-           HasTagName(HTMLNames::trTag);
+    return HasTagName(html_names::kTableTag) ||
+           HasTagName(html_names::kTbodyTag) ||
+           HasTagName(html_names::kTfootTag) ||
+           HasTagName(html_names::kTheadTag) || HasTagName(html_names::kTrTag);
   }
 
   bool IsInHTMLNamespace() const {
     // A DocumentFragment takes the place of the document element when parsing
     // fragments and should be considered in the HTML namespace.
-    return NamespaceURI() == HTMLNames::xhtmlNamespaceURI ||
+    return NamespaceURI() == html_names::xhtmlNamespaceURI ||
            IsDocumentFragmentNode();  // FIXME: Does this also apply to
                                       // ShadowRoot?
   }
 
   bool IsNumberedHeaderElement() const {
-    return HasTagName(HTMLNames::h1Tag) || HasTagName(HTMLNames::h2Tag) ||
-           HasTagName(HTMLNames::h3Tag) || HasTagName(HTMLNames::h4Tag) ||
-           HasTagName(HTMLNames::h5Tag) || HasTagName(HTMLNames::h6Tag);
+    return HasTagName(html_names::kH1Tag) || HasTagName(html_names::kH2Tag) ||
+           HasTagName(html_names::kH3Tag) || HasTagName(html_names::kH4Tag) ||
+           HasTagName(html_names::kH5Tag) || HasTagName(html_names::kH6Tag);
   }
 
   bool IsTableBodyContextElement() const {
-    return HasTagName(HTMLNames::tbodyTag) || HasTagName(HTMLNames::tfootTag) ||
-           HasTagName(HTMLNames::theadTag);
+    return HasTagName(html_names::kTbodyTag) ||
+           HasTagName(html_names::kTfootTag) ||
+           HasTagName(html_names::kTheadTag);
   }
 
   // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#special
@@ -128,55 +130,69 @@
     if (!IsInHTMLNamespace())
       return false;
     const AtomicString& tag_name = LocalName();
-    return tag_name == HTMLNames::addressTag ||
-           tag_name == HTMLNames::areaTag || tag_name == HTMLNames::appletTag ||
-           tag_name == HTMLNames::articleTag ||
-           tag_name == HTMLNames::asideTag || tag_name == HTMLNames::baseTag ||
-           tag_name == HTMLNames::basefontTag ||
-           tag_name == HTMLNames::bgsoundTag ||
-           tag_name == HTMLNames::blockquoteTag ||
-           tag_name == HTMLNames::bodyTag || tag_name == HTMLNames::brTag ||
-           tag_name == HTMLNames::buttonTag ||
-           tag_name == HTMLNames::captionTag ||
-           tag_name == HTMLNames::centerTag || tag_name == HTMLNames::colTag ||
-           tag_name == HTMLNames::colgroupTag ||
-           tag_name == HTMLNames::commandTag || tag_name == HTMLNames::ddTag ||
-           tag_name == HTMLNames::detailsTag || tag_name == HTMLNames::dirTag ||
-           tag_name == HTMLNames::divTag || tag_name == HTMLNames::dlTag ||
-           tag_name == HTMLNames::dtTag || tag_name == HTMLNames::embedTag ||
-           tag_name == HTMLNames::fieldsetTag ||
-           tag_name == HTMLNames::figcaptionTag ||
-           tag_name == HTMLNames::figureTag ||
-           tag_name == HTMLNames::footerTag || tag_name == HTMLNames::formTag ||
-           tag_name == HTMLNames::frameTag ||
-           tag_name == HTMLNames::framesetTag || IsNumberedHeaderElement() ||
-           tag_name == HTMLNames::headTag || tag_name == HTMLNames::headerTag ||
-           tag_name == HTMLNames::hgroupTag || tag_name == HTMLNames::hrTag ||
-           tag_name == HTMLNames::htmlTag || tag_name == HTMLNames::iframeTag ||
-           tag_name == HTMLNames::imgTag || tag_name == HTMLNames::inputTag ||
-           tag_name == HTMLNames::liTag || tag_name == HTMLNames::linkTag ||
-           tag_name == HTMLNames::listingTag ||
-           tag_name == HTMLNames::mainTag ||
-           tag_name == HTMLNames::marqueeTag ||
-           tag_name == HTMLNames::menuTag ||
-           tag_name == HTMLNames::metaTag || tag_name == HTMLNames::navTag ||
-           tag_name == HTMLNames::noembedTag ||
-           tag_name == HTMLNames::noframesTag ||
-           tag_name == HTMLNames::noscriptTag ||
-           tag_name == HTMLNames::objectTag || tag_name == HTMLNames::olTag ||
-           tag_name == HTMLNames::pTag || tag_name == HTMLNames::paramTag ||
-           tag_name == HTMLNames::plaintextTag ||
-           tag_name == HTMLNames::preTag || tag_name == HTMLNames::scriptTag ||
-           tag_name == HTMLNames::sectionTag ||
-           tag_name == HTMLNames::selectTag ||
-           tag_name == HTMLNames::styleTag ||
-           tag_name == HTMLNames::summaryTag ||
-           tag_name == HTMLNames::tableTag || IsTableBodyContextElement() ||
-           tag_name == HTMLNames::tdTag || tag_name == HTMLNames::templateTag ||
-           tag_name == HTMLNames::textareaTag || tag_name == HTMLNames::thTag ||
-           tag_name == HTMLNames::titleTag || tag_name == HTMLNames::trTag ||
-           tag_name == HTMLNames::ulTag || tag_name == HTMLNames::wbrTag ||
-           tag_name == HTMLNames::xmpTag;
+    return tag_name == html_names::kAddressTag ||
+           tag_name == html_names::kAreaTag ||
+           tag_name == html_names::kAppletTag ||
+           tag_name == html_names::kArticleTag ||
+           tag_name == html_names::kAsideTag ||
+           tag_name == html_names::kBaseTag ||
+           tag_name == html_names::kBasefontTag ||
+           tag_name == html_names::kBgsoundTag ||
+           tag_name == html_names::kBlockquoteTag ||
+           tag_name == html_names::kBodyTag || tag_name == html_names::kBrTag ||
+           tag_name == html_names::kButtonTag ||
+           tag_name == html_names::kCaptionTag ||
+           tag_name == html_names::kCenterTag ||
+           tag_name == html_names::kColTag ||
+           tag_name == html_names::kColgroupTag ||
+           tag_name == html_names::kCommandTag ||
+           tag_name == html_names::kDdTag ||
+           tag_name == html_names::kDetailsTag ||
+           tag_name == html_names::kDirTag || tag_name == html_names::kDivTag ||
+           tag_name == html_names::kDlTag || tag_name == html_names::kDtTag ||
+           tag_name == html_names::kEmbedTag ||
+           tag_name == html_names::kFieldsetTag ||
+           tag_name == html_names::kFigcaptionTag ||
+           tag_name == html_names::kFigureTag ||
+           tag_name == html_names::kFooterTag ||
+           tag_name == html_names::kFormTag ||
+           tag_name == html_names::kFrameTag ||
+           tag_name == html_names::kFramesetTag || IsNumberedHeaderElement() ||
+           tag_name == html_names::kHeadTag ||
+           tag_name == html_names::kHeaderTag ||
+           tag_name == html_names::kHgroupTag ||
+           tag_name == html_names::kHrTag || tag_name == html_names::kHTMLTag ||
+           tag_name == html_names::kIFrameTag ||
+           tag_name == html_names::kImgTag ||
+           tag_name == html_names::kInputTag ||
+           tag_name == html_names::kLiTag || tag_name == html_names::kLinkTag ||
+           tag_name == html_names::kListingTag ||
+           tag_name == html_names::kMainTag ||
+           tag_name == html_names::kMarqueeTag ||
+           tag_name == html_names::kMenuTag ||
+           tag_name == html_names::kMetaTag ||
+           tag_name == html_names::kNavTag ||
+           tag_name == html_names::kNoembedTag ||
+           tag_name == html_names::kNoframesTag ||
+           tag_name == html_names::kNoscriptTag ||
+           tag_name == html_names::kObjectTag ||
+           tag_name == html_names::kOlTag || tag_name == html_names::kPTag ||
+           tag_name == html_names::kParamTag ||
+           tag_name == html_names::kPlaintextTag ||
+           tag_name == html_names::kPreTag ||
+           tag_name == html_names::kScriptTag ||
+           tag_name == html_names::kSectionTag ||
+           tag_name == html_names::kSelectTag ||
+           tag_name == html_names::kStyleTag ||
+           tag_name == html_names::kSummaryTag ||
+           tag_name == html_names::kTableTag || IsTableBodyContextElement() ||
+           tag_name == html_names::kTdTag ||
+           tag_name == html_names::kTemplateTag ||
+           tag_name == html_names::kTextareaTag ||
+           tag_name == html_names::kThTag ||
+           tag_name == html_names::kTitleTag ||
+           tag_name == html_names::kTrTag || tag_name == html_names::kUlTag ||
+           tag_name == html_names::kWbrTag || tag_name == html_names::kXmpTag;
   }
 
   void Trace(blink::Visitor* visitor) { visitor->Trace(node_); }
@@ -198,7 +214,7 @@
   HTMLStackItem(
       ContainerNode* node,
       AtomicHTMLToken* token,
-      const AtomicString& namespace_uri = HTMLNames::xhtmlNamespaceURI)
+      const AtomicString& namespace_uri = html_names::xhtmlNamespaceURI)
       : node_(node),
         token_local_name_(token->GetName()),
         token_attributes_(token->Attributes()),
diff --git a/third_party/blink/renderer/core/html/parser/html_tokenizer.cc b/third_party/blink/renderer/core/html/parser/html_tokenizer.cc
index 83353e4..9a1cbe2e 100644
--- a/third_party/blink/renderer/core/html/parser/html_tokenizer.cc
+++ b/third_party/blink/renderer/core/html/parser/html_tokenizer.cc
@@ -38,7 +38,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 static inline UChar ToLowerCase(UChar cc) {
   DCHECK(IsASCIIAlpha(cc));
@@ -603,7 +603,7 @@
     HTML_BEGIN_STATE(kScriptDataDoubleEscapeStartState) {
       if (IsTokenizerWhitespace(cc) || cc == '/' || cc == '>') {
         BufferCharacter(cc);
-        if (TemporaryBufferIs(scriptTag.LocalName()))
+        if (TemporaryBufferIs(kScriptTag.LocalName()))
           HTML_ADVANCE_TO(kScriptDataDoubleEscapedState);
         else
           HTML_ADVANCE_TO(kScriptDataEscapedState);
@@ -683,7 +683,7 @@
     HTML_BEGIN_STATE(kScriptDataDoubleEscapeEndState) {
       if (IsTokenizerWhitespace(cc) || cc == '/' || cc == '>') {
         BufferCharacter(cc);
-        if (TemporaryBufferIs(scriptTag.LocalName()))
+        if (TemporaryBufferIs(kScriptTag.LocalName()))
           HTML_ADVANCE_TO(kScriptDataEscapedState);
         else
           HTML_ADVANCE_TO(kScriptDataDoubleEscapedState);
@@ -1454,20 +1454,20 @@
 }
 
 void HTMLTokenizer::UpdateStateFor(const String& tag_name) {
-  if (ThreadSafeMatch(tag_name, textareaTag) ||
-      ThreadSafeMatch(tag_name, titleTag))
+  if (ThreadSafeMatch(tag_name, kTextareaTag) ||
+      ThreadSafeMatch(tag_name, kTitleTag))
     SetState(HTMLTokenizer::kRCDATAState);
-  else if (ThreadSafeMatch(tag_name, plaintextTag))
+  else if (ThreadSafeMatch(tag_name, kPlaintextTag))
     SetState(HTMLTokenizer::kPLAINTEXTState);
-  else if (ThreadSafeMatch(tag_name, scriptTag))
+  else if (ThreadSafeMatch(tag_name, kScriptTag))
     SetState(HTMLTokenizer::kScriptDataState);
-  else if (ThreadSafeMatch(tag_name, styleTag) ||
-           ThreadSafeMatch(tag_name, iframeTag) ||
-           ThreadSafeMatch(tag_name, xmpTag) ||
-           (ThreadSafeMatch(tag_name, noembedTag) &&
+  else if (ThreadSafeMatch(tag_name, kStyleTag) ||
+           ThreadSafeMatch(tag_name, kIFrameTag) ||
+           ThreadSafeMatch(tag_name, kXmpTag) ||
+           (ThreadSafeMatch(tag_name, kNoembedTag) &&
             options_.plugins_enabled) ||
-           ThreadSafeMatch(tag_name, noframesTag) ||
-           (ThreadSafeMatch(tag_name, noscriptTag) && options_.script_enabled))
+           ThreadSafeMatch(tag_name, kNoframesTag) ||
+           (ThreadSafeMatch(tag_name, kNoscriptTag) && options_.script_enabled))
     SetState(HTMLTokenizer::kRAWTEXTState);
 }
 
diff --git a/third_party/blink/renderer/core/html/parser/html_tree_builder.cc b/third_party/blink/renderer/core/html/parser/html_tree_builder.cc
index 157195f..4d0b1346 100644
--- a/third_party/blink/renderer/core/html/parser/html_tree_builder.cc
+++ b/third_party/blink/renderer/core/html/parser/html_tree_builder.cc
@@ -56,7 +56,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 namespace {
 
@@ -81,37 +81,38 @@
 }
 
 static bool IsNumberedHeaderTag(const AtomicString& tag_name) {
-  return tag_name == h1Tag || tag_name == h2Tag || tag_name == h3Tag ||
-         tag_name == h4Tag || tag_name == h5Tag || tag_name == h6Tag;
+  return tag_name == kH1Tag || tag_name == kH2Tag || tag_name == kH3Tag ||
+         tag_name == kH4Tag || tag_name == kH5Tag || tag_name == kH6Tag;
 }
 
 static bool IsCaptionColOrColgroupTag(const AtomicString& tag_name) {
-  return tag_name == captionTag || tag_name == colTag ||
-         tag_name == colgroupTag;
+  return tag_name == kCaptionTag || tag_name == kColTag ||
+         tag_name == kColgroupTag;
 }
 
 static bool IsTableCellContextTag(const AtomicString& tag_name) {
-  return tag_name == thTag || tag_name == tdTag;
+  return tag_name == kThTag || tag_name == kTdTag;
 }
 
 static bool IsTableBodyContextTag(const AtomicString& tag_name) {
-  return tag_name == tbodyTag || tag_name == tfootTag || tag_name == theadTag;
+  return tag_name == kTbodyTag || tag_name == kTfootTag ||
+         tag_name == kTheadTag;
 }
 
 static bool IsNonAnchorNonNobrFormattingTag(const AtomicString& tag_name) {
-  return tag_name == bTag || tag_name == bigTag || tag_name == codeTag ||
-         tag_name == emTag || tag_name == fontTag || tag_name == iTag ||
-         tag_name == sTag || tag_name == smallTag || tag_name == strikeTag ||
-         tag_name == strongTag || tag_name == ttTag || tag_name == uTag;
+  return tag_name == kBTag || tag_name == kBigTag || tag_name == kCodeTag ||
+         tag_name == kEmTag || tag_name == kFontTag || tag_name == kITag ||
+         tag_name == kSTag || tag_name == kSmallTag || tag_name == kStrikeTag ||
+         tag_name == kStrongTag || tag_name == kTtTag || tag_name == kUTag;
 }
 
 static bool IsNonAnchorFormattingTag(const AtomicString& tag_name) {
-  return tag_name == nobrTag || IsNonAnchorNonNobrFormattingTag(tag_name);
+  return tag_name == kNobrTag || IsNonAnchorNonNobrFormattingTag(tag_name);
 }
 
 // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#formatting
 static bool IsFormattingTag(const AtomicString& tag_name) {
-  return tag_name == aTag || IsNonAnchorFormattingTag(tag_name);
+  return tag_name == kATag || IsNonAnchorFormattingTag(tag_name);
 }
 
 class HTMLTreeBuilder::CharacterTokenBuffer {
@@ -403,20 +404,20 @@
 }
 
 void HTMLTreeBuilder::ProcessFakePEndTagIfPInButtonScope() {
-  if (!tree_.OpenElements()->InButtonScope(pTag.LocalName()))
+  if (!tree_.OpenElements()->InButtonScope(kPTag.LocalName()))
     return;
-  AtomicHTMLToken end_p(HTMLToken::kEndTag, pTag.LocalName());
+  AtomicHTMLToken end_p(HTMLToken::kEndTag, kPTag.LocalName());
   ProcessEndTag(&end_p);
 }
 
 namespace {
 
 bool IsLi(const HTMLStackItem* item) {
-  return item->HasTagName(liTag);
+  return item->HasTagName(kLiTag);
 }
 
 bool IsDdOrDt(const HTMLStackItem* item) {
-  return item->HasTagName(ddTag) || item->HasTagName(dtTag);
+  return item->HasTagName(kDdTag) || item->HasTagName(kDtTag);
 }
 
 }  // namespace
@@ -433,8 +434,8 @@
       ProcessFakeEndTag(item->LocalName());
       break;
     }
-    if (item->IsSpecialNode() && !item->HasTagName(addressTag) &&
-        !item->HasTagName(divTag) && !item->HasTagName(pTag))
+    if (item->IsSpecialNode() && !item->HasTagName(kAddressTag) &&
+        !item->HasTagName(kDivTag) && !item->HasTagName(kPTag))
       break;
     node_record = node_record->Next();
   }
@@ -540,21 +541,21 @@
 
 void HTMLTreeBuilder::ProcessStartTagForInBody(AtomicHTMLToken* token) {
   DCHECK_EQ(token->GetType(), HTMLToken::kStartTag);
-  if (token->GetName() == htmlTag) {
+  if (token->GetName() == kHTMLTag) {
     ProcessHtmlStartTagForInBody(token);
     return;
   }
-  if (token->GetName() == baseTag || token->GetName() == basefontTag ||
-      token->GetName() == bgsoundTag || token->GetName() == commandTag ||
-      token->GetName() == linkTag || token->GetName() == metaTag ||
-      token->GetName() == noframesTag || token->GetName() == scriptTag ||
-      token->GetName() == styleTag || token->GetName() == titleTag ||
-      token->GetName() == templateTag) {
+  if (token->GetName() == kBaseTag || token->GetName() == kBasefontTag ||
+      token->GetName() == kBgsoundTag || token->GetName() == kCommandTag ||
+      token->GetName() == kLinkTag || token->GetName() == kMetaTag ||
+      token->GetName() == kNoframesTag || token->GetName() == kScriptTag ||
+      token->GetName() == kStyleTag || token->GetName() == kTitleTag ||
+      token->GetName() == kTemplateTag) {
     bool did_process = ProcessStartTagForInHead(token);
     DCHECK(did_process);
     return;
   }
-  if (token->GetName() == bodyTag) {
+  if (token->GetName() == kBodyTag) {
     ParseError(token);
     if (!tree_.OpenElements()->SecondElementIsHTMLBodyElement() ||
         tree_.OpenElements()->HasOnlyOneElement() ||
@@ -566,7 +567,7 @@
     tree_.InsertHTMLBodyStartTagInBody(token);
     return;
   }
-  if (token->GetName() == framesetTag) {
+  if (token->GetName() == kFramesetTag) {
     ParseError(token);
     if (!tree_.OpenElements()->SecondElementIsHTMLBodyElement() ||
         tree_.OpenElements()->HasOnlyOneElement()) {
@@ -590,18 +591,18 @@
     SetInsertionMode(kInFramesetMode);
     return;
   }
-  if (token->GetName() == addressTag || token->GetName() == articleTag ||
-      token->GetName() == asideTag || token->GetName() == blockquoteTag ||
-      token->GetName() == centerTag || token->GetName() == detailsTag ||
-      token->GetName() == dirTag || token->GetName() == divTag ||
-      token->GetName() == dlTag || token->GetName() == fieldsetTag ||
-      token->GetName() == figcaptionTag || token->GetName() == figureTag ||
-      token->GetName() == footerTag || token->GetName() == headerTag ||
-      token->GetName() == hgroupTag || token->GetName() == mainTag ||
-      token->GetName() == menuTag || token->GetName() == navTag ||
-      token->GetName() == olTag || token->GetName() == pTag ||
-      token->GetName() == sectionTag || token->GetName() == summaryTag ||
-      token->GetName() == ulTag) {
+  if (token->GetName() == kAddressTag || token->GetName() == kArticleTag ||
+      token->GetName() == kAsideTag || token->GetName() == kBlockquoteTag ||
+      token->GetName() == kCenterTag || token->GetName() == kDetailsTag ||
+      token->GetName() == kDirTag || token->GetName() == kDivTag ||
+      token->GetName() == kDlTag || token->GetName() == kFieldsetTag ||
+      token->GetName() == kFigcaptionTag || token->GetName() == kFigureTag ||
+      token->GetName() == kFooterTag || token->GetName() == kHeaderTag ||
+      token->GetName() == kHgroupTag || token->GetName() == kMainTag ||
+      token->GetName() == kMenuTag || token->GetName() == kNavTag ||
+      token->GetName() == kOlTag || token->GetName() == kPTag ||
+      token->GetName() == kSectionTag || token->GetName() == kSummaryTag ||
+      token->GetName() == kUlTag) {
     ProcessFakePEndTagIfPInButtonScope();
     tree_.InsertHTMLElement(token);
     return;
@@ -615,14 +616,14 @@
     tree_.InsertHTMLElement(token);
     return;
   }
-  if (token->GetName() == preTag || token->GetName() == listingTag) {
+  if (token->GetName() == kPreTag || token->GetName() == kListingTag) {
     ProcessFakePEndTagIfPInButtonScope();
     tree_.InsertHTMLElement(token);
     should_skip_leading_newline_ = true;
     frameset_ok_ = false;
     return;
   }
-  if (token->GetName() == formTag) {
+  if (token->GetName() == kFormTag) {
     if (tree_.IsFormElementPointerNonNull() && !IsParsingTemplateContents()) {
       ParseError(token);
       UseCounter::Count(tree_.CurrentNode()->GetDocument(),
@@ -633,25 +634,25 @@
     tree_.InsertHTMLFormElement(token);
     return;
   }
-  if (token->GetName() == liTag) {
+  if (token->GetName() == kLiTag) {
     ProcessCloseWhenNestedTag<IsLi>(token);
     return;
   }
-  if (token->GetName() == ddTag || token->GetName() == dtTag) {
+  if (token->GetName() == kDdTag || token->GetName() == kDtTag) {
     ProcessCloseWhenNestedTag<IsDdOrDt>(token);
     return;
   }
-  if (token->GetName() == plaintextTag) {
+  if (token->GetName() == kPlaintextTag) {
     ProcessFakePEndTagIfPInButtonScope();
     tree_.InsertHTMLElement(token);
     if (parser_->Tokenizer())
       parser_->Tokenizer()->SetState(HTMLTokenizer::kPLAINTEXTState);
     return;
   }
-  if (token->GetName() == buttonTag) {
-    if (tree_.OpenElements()->InScope(buttonTag)) {
+  if (token->GetName() == kButtonTag) {
+    if (tree_.OpenElements()->InScope(kButtonTag)) {
       ParseError(token);
-      ProcessFakeEndTag(buttonTag);
+      ProcessFakeEndTag(kButtonTag);
       ProcessStartTag(token);  // FIXME: Could we just fall through here?
       return;
     }
@@ -660,13 +661,13 @@
     frameset_ok_ = false;
     return;
   }
-  if (token->GetName() == aTag) {
+  if (token->GetName() == kATag) {
     Element* active_a_tag =
         tree_.ActiveFormattingElements()->ClosestElementInScopeWithName(
-            aTag.LocalName());
+            kATag.LocalName());
     if (active_a_tag) {
       ParseError(token);
-      ProcessFakeEndTag(aTag);
+      ProcessFakeEndTag(kATag);
       tree_.ActiveFormattingElements()->Remove(active_a_tag);
       if (tree_.OpenElements()->Contains(active_a_tag))
         tree_.OpenElements()->Remove(active_a_tag);
@@ -680,56 +681,56 @@
     tree_.InsertFormattingElement(token);
     return;
   }
-  if (token->GetName() == nobrTag) {
+  if (token->GetName() == kNobrTag) {
     tree_.ReconstructTheActiveFormattingElements();
-    if (tree_.OpenElements()->InScope(nobrTag)) {
+    if (tree_.OpenElements()->InScope(kNobrTag)) {
       ParseError(token);
-      ProcessFakeEndTag(nobrTag);
+      ProcessFakeEndTag(kNobrTag);
       tree_.ReconstructTheActiveFormattingElements();
     }
     tree_.InsertFormattingElement(token);
     return;
   }
-  if (token->GetName() == appletTag || token->GetName() == embedTag ||
-      token->GetName() == objectTag) {
+  if (token->GetName() == kAppletTag || token->GetName() == kEmbedTag ||
+      token->GetName() == kObjectTag) {
     if (!PluginContentIsAllowed(tree_.GetParserContentPolicy()))
       return;
   }
-  if (token->GetName() == appletTag || token->GetName() == marqueeTag ||
-      token->GetName() == objectTag) {
+  if (token->GetName() == kAppletTag || token->GetName() == kMarqueeTag ||
+      token->GetName() == kObjectTag) {
     tree_.ReconstructTheActiveFormattingElements();
     tree_.InsertHTMLElement(token);
     tree_.ActiveFormattingElements()->AppendMarker();
     frameset_ok_ = false;
     return;
   }
-  if (token->GetName() == tableTag) {
-    if (!tree_.InQuirksMode() && tree_.OpenElements()->InButtonScope(pTag))
-      ProcessFakeEndTag(pTag);
+  if (token->GetName() == kTableTag) {
+    if (!tree_.InQuirksMode() && tree_.OpenElements()->InButtonScope(kPTag))
+      ProcessFakeEndTag(kPTag);
     tree_.InsertHTMLElement(token);
     frameset_ok_ = false;
     SetInsertionMode(kInTableMode);
     return;
   }
-  if (token->GetName() == imageTag) {
+  if (token->GetName() == kImageTag) {
     ParseError(token);
     // Apparently we're not supposed to ask.
-    token->SetName(imgTag.LocalName());
-    // Note the fall through to the imgTag handling below!
+    token->SetName(kImgTag.LocalName());
+    // Note the fall through to the kImgTag handling below!
   }
-  if (token->GetName() == areaTag || token->GetName() == brTag ||
-      token->GetName() == embedTag || token->GetName() == imgTag ||
-      token->GetName() == keygenTag || token->GetName() == wbrTag) {
+  if (token->GetName() == kAreaTag || token->GetName() == kBrTag ||
+      token->GetName() == kEmbedTag || token->GetName() == kImgTag ||
+      token->GetName() == kKeygenTag || token->GetName() == kWbrTag) {
     tree_.ReconstructTheActiveFormattingElements();
     tree_.InsertSelfClosingHTMLElementDestroyingToken(token);
     frameset_ok_ = false;
     return;
   }
-  if (token->GetName() == inputTag) {
+  if (token->GetName() == kInputTag) {
     // Per spec https://html.spec.whatwg.org/#parsing-main-inbody,
     // section "A start tag whose tag name is "input""
 
-    Attribute* type_attribute = token->GetAttributeItem(typeAttr);
+    Attribute* type_attribute = token->GetAttributeItem(kTypeAttr);
     bool disable_frameset =
         !type_attribute ||
         !DeprecatedEqualIgnoringCase(type_attribute->Value(), "hidden");
@@ -741,18 +742,18 @@
       frameset_ok_ = false;
     return;
   }
-  if (token->GetName() == paramTag || token->GetName() == sourceTag ||
-      token->GetName() == trackTag) {
+  if (token->GetName() == kParamTag || token->GetName() == kSourceTag ||
+      token->GetName() == kTrackTag) {
     tree_.InsertSelfClosingHTMLElementDestroyingToken(token);
     return;
   }
-  if (token->GetName() == hrTag) {
+  if (token->GetName() == kHrTag) {
     ProcessFakePEndTagIfPInButtonScope();
     tree_.InsertSelfClosingHTMLElementDestroyingToken(token);
     frameset_ok_ = false;
     return;
   }
-  if (token->GetName() == textareaTag) {
+  if (token->GetName() == kTextareaTag) {
     tree_.InsertHTMLElement(token);
     should_skip_leading_newline_ = true;
     if (parser_->Tokenizer())
@@ -762,27 +763,27 @@
     SetInsertionMode(kTextMode);
     return;
   }
-  if (token->GetName() == xmpTag) {
+  if (token->GetName() == kXmpTag) {
     ProcessFakePEndTagIfPInButtonScope();
     tree_.ReconstructTheActiveFormattingElements();
     frameset_ok_ = false;
     ProcessGenericRawTextStartTag(token);
     return;
   }
-  if (token->GetName() == iframeTag) {
+  if (token->GetName() == kIFrameTag) {
     frameset_ok_ = false;
     ProcessGenericRawTextStartTag(token);
     return;
   }
-  if (token->GetName() == noembedTag && options_.plugins_enabled) {
+  if (token->GetName() == kNoembedTag && options_.plugins_enabled) {
     ProcessGenericRawTextStartTag(token);
     return;
   }
-  if (token->GetName() == noscriptTag && options_.script_enabled) {
+  if (token->GetName() == kNoscriptTag && options_.script_enabled) {
     ProcessGenericRawTextStartTag(token);
     return;
   }
-  if (token->GetName() == selectTag) {
+  if (token->GetName() == kSelectTag) {
     tree_.ReconstructTheActiveFormattingElements();
     tree_.InsertHTMLElement(token);
     frameset_ok_ = false;
@@ -795,29 +796,29 @@
       SetInsertionMode(kInSelectMode);
     return;
   }
-  if (token->GetName() == optgroupTag || token->GetName() == optionTag) {
-    if (tree_.CurrentStackItem()->HasTagName(optionTag)) {
-      AtomicHTMLToken end_option(HTMLToken::kEndTag, optionTag.LocalName());
+  if (token->GetName() == kOptgroupTag || token->GetName() == kOptionTag) {
+    if (tree_.CurrentStackItem()->HasTagName(kOptionTag)) {
+      AtomicHTMLToken end_option(HTMLToken::kEndTag, kOptionTag.LocalName());
       ProcessEndTag(&end_option);
     }
     tree_.ReconstructTheActiveFormattingElements();
     tree_.InsertHTMLElement(token);
     return;
   }
-  if (token->GetName() == rbTag || token->GetName() == rtcTag) {
-    if (tree_.OpenElements()->InScope(rubyTag.LocalName())) {
+  if (token->GetName() == kRbTag || token->GetName() == kRTCTag) {
+    if (tree_.OpenElements()->InScope(kRubyTag.LocalName())) {
       tree_.GenerateImpliedEndTags();
-      if (!tree_.CurrentStackItem()->HasTagName(rubyTag))
+      if (!tree_.CurrentStackItem()->HasTagName(kRubyTag))
         ParseError(token);
     }
     tree_.InsertHTMLElement(token);
     return;
   }
-  if (token->GetName() == rtTag || token->GetName() == rpTag) {
-    if (tree_.OpenElements()->InScope(rubyTag.LocalName())) {
-      tree_.GenerateImpliedEndTagsWithExclusion(rtcTag.LocalName());
-      if (!tree_.CurrentStackItem()->HasTagName(rubyTag) &&
-          !tree_.CurrentStackItem()->HasTagName(rtcTag))
+  if (token->GetName() == kRtTag || token->GetName() == kRpTag) {
+    if (tree_.OpenElements()->InScope(kRubyTag.LocalName())) {
+      tree_.GenerateImpliedEndTagsWithExclusion(kRTCTag.LocalName());
+      if (!tree_.CurrentStackItem()->HasTagName(kRubyTag) &&
+          !tree_.CurrentStackItem()->HasTagName(kRTCTag))
         ParseError(token);
     }
     tree_.InsertHTMLElement(token);
@@ -838,9 +839,9 @@
     return;
   }
   if (IsCaptionColOrColgroupTag(token->GetName()) ||
-      token->GetName() == frameTag || token->GetName() == headTag ||
+      token->GetName() == kFrameTag || token->GetName() == kHeadTag ||
       IsTableBodyContextTag(token->GetName()) ||
-      IsTableCellContextTag(token->GetName()) || token->GetName() == trTag) {
+      IsTableCellContextTag(token->GetName()) || token->GetName() == kTrTag) {
     ParseError(token);
     return;
   }
@@ -857,7 +858,7 @@
 }
 
 bool HTMLTreeBuilder::ProcessTemplateEndTag(AtomicHTMLToken* token) {
-  DCHECK_EQ(token->GetName(), templateTag.LocalName());
+  DCHECK_EQ(token->GetName(), kTemplateTag.LocalName());
   if (!tree_.OpenElements()->HasTemplateInHTMLScope()) {
     DCHECK(template_insertion_modes_.IsEmpty() ||
            (template_insertion_modes_.size() == 1 &&
@@ -866,9 +867,9 @@
     return false;
   }
   tree_.GenerateImpliedEndTags();
-  if (!tree_.CurrentStackItem()->HasTagName(templateTag))
+  if (!tree_.CurrentStackItem()->HasTagName(kTemplateTag))
     ParseError(token);
-  tree_.OpenElements()->PopUntilPopped(templateTag);
+  tree_.OpenElements()->PopUntilPopped(kTemplateTag);
   tree_.ActiveFormattingElements()->ClearToLastMarker();
   template_insertion_modes_.pop_back();
   ResetInsertionModeAppropriately();
@@ -877,7 +878,7 @@
 
 bool HTMLTreeBuilder::ProcessEndOfFileForInTemplateContents(
     AtomicHTMLToken* token) {
-  AtomicHTMLToken end_template(HTMLToken::kEndTag, templateTag.LocalName());
+  AtomicHTMLToken end_template(HTMLToken::kEndTag, kTemplateTag.LocalName());
   if (!ProcessTemplateEndTag(&end_template))
     return false;
 
@@ -909,33 +910,33 @@
 // http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#close-the-cell
 void HTMLTreeBuilder::CloseTheCell() {
   DCHECK_EQ(GetInsertionMode(), kInCellMode);
-  if (tree_.OpenElements()->InTableScope(tdTag)) {
-    DCHECK(!tree_.OpenElements()->InTableScope(thTag));
-    ProcessFakeEndTag(tdTag);
+  if (tree_.OpenElements()->InTableScope(kTdTag)) {
+    DCHECK(!tree_.OpenElements()->InTableScope(kThTag));
+    ProcessFakeEndTag(kTdTag);
     return;
   }
-  DCHECK(tree_.OpenElements()->InTableScope(thTag));
-  ProcessFakeEndTag(thTag);
+  DCHECK(tree_.OpenElements()->InTableScope(kThTag));
+  ProcessFakeEndTag(kThTag);
   DCHECK_EQ(GetInsertionMode(), kInRowMode);
 }
 
 void HTMLTreeBuilder::ProcessStartTagForInTable(AtomicHTMLToken* token) {
   DCHECK_EQ(token->GetType(), HTMLToken::kStartTag);
-  if (token->GetName() == captionTag) {
+  if (token->GetName() == kCaptionTag) {
     tree_.OpenElements()->PopUntilTableScopeMarker();
     tree_.ActiveFormattingElements()->AppendMarker();
     tree_.InsertHTMLElement(token);
     SetInsertionMode(kInCaptionMode);
     return;
   }
-  if (token->GetName() == colgroupTag) {
+  if (token->GetName() == kColgroupTag) {
     tree_.OpenElements()->PopUntilTableScopeMarker();
     tree_.InsertHTMLElement(token);
     SetInsertionMode(kInColumnGroupMode);
     return;
   }
-  if (token->GetName() == colTag) {
-    ProcessFakeStartTag(colgroupTag);
+  if (token->GetName() == kColTag) {
+    ProcessFakeStartTag(kColgroupTag);
     DCHECK(kInColumnGroupMode);
     ProcessStartTag(token);
     return;
@@ -946,13 +947,13 @@
     SetInsertionMode(kInTableBodyMode);
     return;
   }
-  if (IsTableCellContextTag(token->GetName()) || token->GetName() == trTag) {
-    ProcessFakeStartTag(tbodyTag);
+  if (IsTableCellContextTag(token->GetName()) || token->GetName() == kTrTag) {
+    ProcessFakeStartTag(kTbodyTag);
     DCHECK_EQ(GetInsertionMode(), kInTableBodyMode);
     ProcessStartTag(token);
     return;
   }
-  if (token->GetName() == tableTag) {
+  if (token->GetName() == kTableTag) {
     ParseError(token);
     if (!ProcessTableEndTagForInTable()) {
       DCHECK(IsParsingFragmentOrTemplateContents());
@@ -961,12 +962,12 @@
     ProcessStartTag(token);
     return;
   }
-  if (token->GetName() == styleTag || token->GetName() == scriptTag) {
+  if (token->GetName() == kStyleTag || token->GetName() == kScriptTag) {
     ProcessStartTagForInHead(token);
     return;
   }
-  if (token->GetName() == inputTag) {
-    Attribute* type_attribute = token->GetAttributeItem(typeAttr);
+  if (token->GetName() == kInputTag) {
+    Attribute* type_attribute = token->GetAttributeItem(kTypeAttr);
     if (type_attribute &&
         DeprecatedEqualIgnoringCase(type_attribute->Value(), "hidden")) {
       ParseError(token);
@@ -975,7 +976,7 @@
     }
     // Fall through to "anything else" case.
   }
-  if (token->GetName() == formTag) {
+  if (token->GetName() == kFormTag) {
     ParseError(token);
     if (tree_.IsFormElementPointerNonNull() && !IsParsingTemplateContents())
       return;
@@ -983,7 +984,7 @@
     tree_.OpenElements()->Pop();
     return;
   }
-  if (token->GetName() == templateTag) {
+  if (token->GetName() == kTemplateTag) {
     ProcessTemplateStartTag(token);
     return;
   }
@@ -1001,7 +1002,7 @@
       FALLTHROUGH;
     case kBeforeHTMLMode:
       DCHECK_EQ(GetInsertionMode(), kBeforeHTMLMode);
-      if (token->GetName() == htmlTag) {
+      if (token->GetName() == kHTMLTag) {
         tree_.InsertHTMLHtmlStartTagBeforeHTML(token);
         SetInsertionMode(kBeforeHeadMode);
         return;
@@ -1010,11 +1011,11 @@
       FALLTHROUGH;
     case kBeforeHeadMode:
       DCHECK_EQ(GetInsertionMode(), kBeforeHeadMode);
-      if (token->GetName() == htmlTag) {
+      if (token->GetName() == kHTMLTag) {
         ProcessHtmlStartTagForInBody(token);
         return;
       }
-      if (token->GetName() == headTag) {
+      if (token->GetName() == kHeadTag) {
         tree_.InsertHTMLHeadElement(token);
         SetInsertionMode(kInHeadMode);
         return;
@@ -1029,26 +1030,26 @@
       FALLTHROUGH;
     case kAfterHeadMode:
       DCHECK_EQ(GetInsertionMode(), kAfterHeadMode);
-      if (token->GetName() == htmlTag) {
+      if (token->GetName() == kHTMLTag) {
         ProcessHtmlStartTagForInBody(token);
         return;
       }
-      if (token->GetName() == bodyTag) {
+      if (token->GetName() == kBodyTag) {
         frameset_ok_ = false;
         tree_.InsertHTMLBodyElement(token);
         SetInsertionMode(kInBodyMode);
         return;
       }
-      if (token->GetName() == framesetTag) {
+      if (token->GetName() == kFramesetTag) {
         tree_.InsertHTMLElement(token);
         SetInsertionMode(kInFramesetMode);
         return;
       }
-      if (token->GetName() == baseTag || token->GetName() == basefontTag ||
-          token->GetName() == bgsoundTag || token->GetName() == linkTag ||
-          token->GetName() == metaTag || token->GetName() == noframesTag ||
-          token->GetName() == scriptTag || token->GetName() == styleTag ||
-          token->GetName() == templateTag || token->GetName() == titleTag) {
+      if (token->GetName() == kBaseTag || token->GetName() == kBasefontTag ||
+          token->GetName() == kBgsoundTag || token->GetName() == kLinkTag ||
+          token->GetName() == kMetaTag || token->GetName() == kNoframesTag ||
+          token->GetName() == kScriptTag || token->GetName() == kStyleTag ||
+          token->GetName() == kTemplateTag || token->GetName() == kTitleTag) {
         ParseError(token);
         DCHECK(tree_.Head());
         tree_.OpenElements()->PushHTMLHeadElement(tree_.HeadStackItem());
@@ -1056,7 +1057,7 @@
         tree_.OpenElements()->RemoveHTMLHeadElement(tree_.Head());
         return;
       }
-      if (token->GetName() == headTag) {
+      if (token->GetName() == kHeadTag) {
         ParseError(token);
         return;
       }
@@ -1075,7 +1076,7 @@
       if (IsCaptionColOrColgroupTag(token->GetName()) ||
           IsTableBodyContextTag(token->GetName()) ||
           IsTableCellContextTag(token->GetName()) ||
-          token->GetName() == trTag) {
+          token->GetName() == kTrTag) {
         ParseError(token);
         if (!ProcessCaptionEndTagForInCaption()) {
           DCHECK(IsParsingFragment());
@@ -1088,15 +1089,15 @@
       break;
     case kInColumnGroupMode:
       DCHECK_EQ(GetInsertionMode(), kInColumnGroupMode);
-      if (token->GetName() == htmlTag) {
+      if (token->GetName() == kHTMLTag) {
         ProcessHtmlStartTagForInBody(token);
         return;
       }
-      if (token->GetName() == colTag) {
+      if (token->GetName() == kColTag) {
         tree_.InsertSelfClosingHTMLElementDestroyingToken(token);
         return;
       }
-      if (token->GetName() == templateTag) {
+      if (token->GetName() == kTemplateTag) {
         ProcessTemplateStartTag(token);
         return;
       }
@@ -1108,7 +1109,7 @@
       break;
     case kInTableBodyMode:
       DCHECK_EQ(GetInsertionMode(), kInTableBodyMode);
-      if (token->GetName() == trTag) {
+      if (token->GetName() == kTrTag) {
         // How is there ever anything to pop?
         tree_.OpenElements()->PopUntilTableBodyScopeMarker();
         tree_.InsertHTMLElement(token);
@@ -1117,7 +1118,7 @@
       }
       if (IsTableCellContextTag(token->GetName())) {
         ParseError(token);
-        ProcessFakeStartTag(trTag);
+        ProcessFakeStartTag(kTrTag);
         DCHECK_EQ(GetInsertionMode(), kInRowMode);
         ProcessStartTag(token);
         return;
@@ -1125,9 +1126,9 @@
       if (IsCaptionColOrColgroupTag(token->GetName()) ||
           IsTableBodyContextTag(token->GetName())) {
         // FIXME: This is slow.
-        if (!tree_.OpenElements()->InTableScope(tbodyTag) &&
-            !tree_.OpenElements()->InTableScope(theadTag) &&
-            !tree_.OpenElements()->InTableScope(tfootTag)) {
+        if (!tree_.OpenElements()->InTableScope(kTbodyTag) &&
+            !tree_.OpenElements()->InTableScope(kTheadTag) &&
+            !tree_.OpenElements()->InTableScope(kTfootTag)) {
           DCHECK(IsParsingFragmentOrTemplateContents());
           ParseError(token);
           return;
@@ -1149,7 +1150,7 @@
         tree_.ActiveFormattingElements()->AppendMarker();
         return;
       }
-      if (token->GetName() == trTag ||
+      if (token->GetName() == kTrTag ||
           IsCaptionColOrColgroupTag(token->GetName()) ||
           IsTableBodyContextTag(token->GetName())) {
         if (!ProcessTrEndTagForInRow()) {
@@ -1166,11 +1167,11 @@
       DCHECK_EQ(GetInsertionMode(), kInCellMode);
       if (IsCaptionColOrColgroupTag(token->GetName()) ||
           IsTableCellContextTag(token->GetName()) ||
-          token->GetName() == trTag ||
+          token->GetName() == kTrTag ||
           IsTableBodyContextTag(token->GetName())) {
         // FIXME: This could be more efficient.
-        if (!tree_.OpenElements()->InTableScope(tdTag) &&
-            !tree_.OpenElements()->InTableScope(thTag)) {
+        if (!tree_.OpenElements()->InTableScope(kTdTag) &&
+            !tree_.OpenElements()->InTableScope(kThTag)) {
           DCHECK(IsParsingFragment());
           ParseError(token);
           return;
@@ -1185,7 +1186,7 @@
     case kAfterAfterBodyMode:
       DCHECK(GetInsertionMode() == kAfterBodyMode ||
              GetInsertionMode() == kAfterAfterBodyMode);
-      if (token->GetName() == htmlTag) {
+      if (token->GetName() == kHTMLTag) {
         ProcessHtmlStartTagForInBody(token);
         return;
       }
@@ -1194,18 +1195,18 @@
       break;
     case kInHeadNoscriptMode:
       DCHECK_EQ(GetInsertionMode(), kInHeadNoscriptMode);
-      if (token->GetName() == htmlTag) {
+      if (token->GetName() == kHTMLTag) {
         ProcessHtmlStartTagForInBody(token);
         return;
       }
-      if (token->GetName() == basefontTag || token->GetName() == bgsoundTag ||
-          token->GetName() == linkTag || token->GetName() == metaTag ||
-          token->GetName() == noframesTag || token->GetName() == styleTag) {
+      if (token->GetName() == kBasefontTag || token->GetName() == kBgsoundTag ||
+          token->GetName() == kLinkTag || token->GetName() == kMetaTag ||
+          token->GetName() == kNoframesTag || token->GetName() == kStyleTag) {
         bool did_process = ProcessStartTagForInHead(token);
         DCHECK(did_process);
         return;
       }
-      if (token->GetName() == htmlTag || token->GetName() == noscriptTag) {
+      if (token->GetName() == kHTMLTag || token->GetName() == kNoscriptTag) {
         ParseError(token);
         return;
       }
@@ -1214,19 +1215,19 @@
       break;
     case kInFramesetMode:
       DCHECK_EQ(GetInsertionMode(), kInFramesetMode);
-      if (token->GetName() == htmlTag) {
+      if (token->GetName() == kHTMLTag) {
         ProcessHtmlStartTagForInBody(token);
         return;
       }
-      if (token->GetName() == framesetTag) {
+      if (token->GetName() == kFramesetTag) {
         tree_.InsertHTMLElement(token);
         return;
       }
-      if (token->GetName() == frameTag) {
+      if (token->GetName() == kFrameTag) {
         tree_.InsertSelfClosingHTMLElementDestroyingToken(token);
         return;
       }
-      if (token->GetName() == noframesTag) {
+      if (token->GetName() == kNoframesTag) {
         ProcessStartTagForInHead(token);
         return;
       }
@@ -1236,11 +1237,11 @@
     case kAfterAfterFramesetMode:
       DCHECK(GetInsertionMode() == kAfterFramesetMode ||
              GetInsertionMode() == kAfterAfterFramesetMode);
-      if (token->GetName() == htmlTag) {
+      if (token->GetName() == kHTMLTag) {
         ProcessHtmlStartTagForInBody(token);
         return;
       }
-      if (token->GetName() == noframesTag) {
+      if (token->GetName() == kNoframesTag) {
         ProcessStartTagForInHead(token);
         return;
       }
@@ -1248,12 +1249,12 @@
       break;
     case kInSelectInTableMode:
       DCHECK_EQ(GetInsertionMode(), kInSelectInTableMode);
-      if (token->GetName() == captionTag || token->GetName() == tableTag ||
+      if (token->GetName() == kCaptionTag || token->GetName() == kTableTag ||
           IsTableBodyContextTag(token->GetName()) ||
-          token->GetName() == trTag ||
+          token->GetName() == kTrTag ||
           IsTableCellContextTag(token->GetName())) {
         ParseError(token);
-        AtomicHTMLToken end_select(HTMLToken::kEndTag, selectTag.LocalName());
+        AtomicHTMLToken end_select(HTMLToken::kEndTag, kSelectTag.LocalName());
         ProcessEndTag(&end_select);
         ProcessStartTag(token);
         return;
@@ -1262,55 +1263,57 @@
     case kInSelectMode:
       DCHECK(GetInsertionMode() == kInSelectMode ||
              GetInsertionMode() == kInSelectInTableMode);
-      if (token->GetName() == htmlTag) {
+      if (token->GetName() == kHTMLTag) {
         ProcessHtmlStartTagForInBody(token);
         return;
       }
-      if (token->GetName() == optionTag) {
-        if (tree_.CurrentStackItem()->HasTagName(optionTag)) {
-          AtomicHTMLToken end_option(HTMLToken::kEndTag, optionTag.LocalName());
+      if (token->GetName() == kOptionTag) {
+        if (tree_.CurrentStackItem()->HasTagName(kOptionTag)) {
+          AtomicHTMLToken end_option(HTMLToken::kEndTag,
+                                     kOptionTag.LocalName());
           ProcessEndTag(&end_option);
         }
         tree_.InsertHTMLElement(token);
         return;
       }
-      if (token->GetName() == optgroupTag) {
-        if (tree_.CurrentStackItem()->HasTagName(optionTag)) {
-          AtomicHTMLToken end_option(HTMLToken::kEndTag, optionTag.LocalName());
+      if (token->GetName() == kOptgroupTag) {
+        if (tree_.CurrentStackItem()->HasTagName(kOptionTag)) {
+          AtomicHTMLToken end_option(HTMLToken::kEndTag,
+                                     kOptionTag.LocalName());
           ProcessEndTag(&end_option);
         }
-        if (tree_.CurrentStackItem()->HasTagName(optgroupTag)) {
+        if (tree_.CurrentStackItem()->HasTagName(kOptgroupTag)) {
           AtomicHTMLToken end_optgroup(HTMLToken::kEndTag,
-                                       optgroupTag.LocalName());
+                                       kOptgroupTag.LocalName());
           ProcessEndTag(&end_optgroup);
         }
         tree_.InsertHTMLElement(token);
         return;
       }
-      if (token->GetName() == selectTag) {
+      if (token->GetName() == kSelectTag) {
         ParseError(token);
-        AtomicHTMLToken end_select(HTMLToken::kEndTag, selectTag.LocalName());
+        AtomicHTMLToken end_select(HTMLToken::kEndTag, kSelectTag.LocalName());
         ProcessEndTag(&end_select);
         return;
       }
-      if (token->GetName() == inputTag || token->GetName() == keygenTag ||
-          token->GetName() == textareaTag) {
+      if (token->GetName() == kInputTag || token->GetName() == kKeygenTag ||
+          token->GetName() == kTextareaTag) {
         ParseError(token);
-        if (!tree_.OpenElements()->InSelectScope(selectTag)) {
+        if (!tree_.OpenElements()->InSelectScope(kSelectTag)) {
           DCHECK(IsParsingFragment());
           return;
         }
-        AtomicHTMLToken end_select(HTMLToken::kEndTag, selectTag.LocalName());
+        AtomicHTMLToken end_select(HTMLToken::kEndTag, kSelectTag.LocalName());
         ProcessEndTag(&end_select);
         ProcessStartTag(token);
         return;
       }
-      if (token->GetName() == scriptTag) {
+      if (token->GetName() == kScriptTag) {
         bool did_process = ProcessStartTagForInHead(token);
         DCHECK(did_process);
         return;
       }
-      if (token->GetName() == templateTag) {
+      if (token->GetName() == kTemplateTag) {
         ProcessTemplateStartTag(token);
         return;
       }
@@ -1323,24 +1326,24 @@
       NOTREACHED();
       break;
     case kTemplateContentsMode:
-      if (token->GetName() == templateTag) {
+      if (token->GetName() == kTemplateTag) {
         ProcessTemplateStartTag(token);
         return;
       }
 
-      if (token->GetName() == linkTag || token->GetName() == scriptTag ||
-          token->GetName() == styleTag || token->GetName() == metaTag) {
+      if (token->GetName() == kLinkTag || token->GetName() == kScriptTag ||
+          token->GetName() == kStyleTag || token->GetName() == kMetaTag) {
         ProcessStartTagForInHead(token);
         return;
       }
 
       InsertionMode insertion_mode = kTemplateContentsMode;
-      if (token->GetName() == colTag)
+      if (token->GetName() == kColTag)
         insertion_mode = kInColumnGroupMode;
       else if (IsCaptionColOrColgroupTag(token->GetName()) ||
                IsTableBodyContextTag(token->GetName()))
         insertion_mode = kInTableMode;
-      else if (token->GetName() == trTag)
+      else if (token->GetName() == kTrTag)
         insertion_mode = kInTableBodyMode;
       else if (IsTableCellContextTag(token->GetName()))
         insertion_mode = kInRowMode;
@@ -1368,8 +1371,8 @@
 
 bool HTMLTreeBuilder::ProcessBodyEndTagForInBody(AtomicHTMLToken* token) {
   DCHECK_EQ(token->GetType(), HTMLToken::kEndTag);
-  DCHECK(token->GetName() == bodyTag);
-  if (!tree_.OpenElements()->InScope(bodyTag.LocalName())) {
+  DCHECK(token->GetName() == kBodyTag);
+  if (!tree_.OpenElements()->InScope(kBodyTag.LocalName())) {
     ParseError(token);
     return false;
   }
@@ -1521,46 +1524,46 @@
       if (IsParsingFragment())
         item = fragment_context_.ContextElementStackItem();
     }
-    if (item->HasTagName(templateTag))
+    if (item->HasTagName(kTemplateTag))
       return SetInsertionMode(template_insertion_modes_.back());
-    if (item->HasTagName(selectTag)) {
+    if (item->HasTagName(kSelectTag)) {
       if (!last) {
         while (item->GetNode() != tree_.OpenElements()->RootNode() &&
-               !item->HasTagName(templateTag)) {
+               !item->HasTagName(kTemplateTag)) {
           node_record = node_record->Next();
           item = node_record->StackItem();
-          if (item->HasTagName(tableTag))
+          if (item->HasTagName(kTableTag))
             return SetInsertionMode(kInSelectInTableMode);
         }
       }
       return SetInsertionMode(kInSelectMode);
     }
-    if (item->HasTagName(tdTag) || item->HasTagName(thTag))
+    if (item->HasTagName(kTdTag) || item->HasTagName(kThTag))
       return SetInsertionMode(kInCellMode);
-    if (item->HasTagName(trTag))
+    if (item->HasTagName(kTrTag))
       return SetInsertionMode(kInRowMode);
-    if (item->HasTagName(tbodyTag) || item->HasTagName(theadTag) ||
-        item->HasTagName(tfootTag))
+    if (item->HasTagName(kTbodyTag) || item->HasTagName(kTheadTag) ||
+        item->HasTagName(kTfootTag))
       return SetInsertionMode(kInTableBodyMode);
-    if (item->HasTagName(captionTag))
+    if (item->HasTagName(kCaptionTag))
       return SetInsertionMode(kInCaptionMode);
-    if (item->HasTagName(colgroupTag)) {
+    if (item->HasTagName(kColgroupTag)) {
       return SetInsertionMode(kInColumnGroupMode);
     }
-    if (item->HasTagName(tableTag))
+    if (item->HasTagName(kTableTag))
       return SetInsertionMode(kInTableMode);
-    if (item->HasTagName(headTag)) {
+    if (item->HasTagName(kHeadTag)) {
       if (!fragment_context_.Fragment() ||
           fragment_context_.ContextElement() != item->GetNode())
         return SetInsertionMode(kInHeadMode);
       return SetInsertionMode(kInBodyMode);
     }
-    if (item->HasTagName(bodyTag))
+    if (item->HasTagName(kBodyTag))
       return SetInsertionMode(kInBodyMode);
-    if (item->HasTagName(framesetTag)) {
+    if (item->HasTagName(kFramesetTag)) {
       return SetInsertionMode(kInFramesetMode);
     }
-    if (item->HasTagName(htmlTag)) {
+    if (item->HasTagName(kHTMLTag)) {
       if (tree_.HeadStackItem())
         return SetInsertionMode(kAfterHeadMode);
 
@@ -1587,11 +1590,11 @@
     SetInsertionMode(kInTableMode);
     return;
   }
-  if (token->GetName() == tableTag) {
+  if (token->GetName() == kTableTag) {
     // FIXME: This is slow.
-    if (!tree_.OpenElements()->InTableScope(tbodyTag) &&
-        !tree_.OpenElements()->InTableScope(theadTag) &&
-        !tree_.OpenElements()->InTableScope(tfootTag)) {
+    if (!tree_.OpenElements()->InTableScope(kTbodyTag) &&
+        !tree_.OpenElements()->InTableScope(kTheadTag) &&
+        !tree_.OpenElements()->InTableScope(kTfootTag)) {
       DCHECK(IsParsingFragmentOrTemplateContents());
       ParseError(token);
       return;
@@ -1602,10 +1605,10 @@
     ProcessEndTag(token);
     return;
   }
-  if (token->GetName() == bodyTag ||
+  if (token->GetName() == kBodyTag ||
       IsCaptionColOrColgroupTag(token->GetName()) ||
-      token->GetName() == htmlTag || IsTableCellContextTag(token->GetName()) ||
-      token->GetName() == trTag) {
+      token->GetName() == kHTMLTag || IsTableCellContextTag(token->GetName()) ||
+      token->GetName() == kTrTag) {
     ParseError(token);
     return;
   }
@@ -1614,11 +1617,11 @@
 
 void HTMLTreeBuilder::ProcessEndTagForInRow(AtomicHTMLToken* token) {
   DCHECK_EQ(token->GetType(), HTMLToken::kEndTag);
-  if (token->GetName() == trTag) {
+  if (token->GetName() == kTrTag) {
     ProcessTrEndTagForInRow();
     return;
   }
-  if (token->GetName() == tableTag) {
+  if (token->GetName() == kTableTag) {
     if (!ProcessTrEndTagForInRow()) {
       DCHECK(IsParsingFragmentOrTemplateContents());
       return;
@@ -1632,14 +1635,14 @@
       ParseError(token);
       return;
     }
-    ProcessFakeEndTag(trTag);
+    ProcessFakeEndTag(kTrTag);
     DCHECK_EQ(GetInsertionMode(), kInTableBodyMode);
     ProcessEndTag(token);
     return;
   }
-  if (token->GetName() == bodyTag ||
+  if (token->GetName() == kBodyTag ||
       IsCaptionColOrColgroupTag(token->GetName()) ||
-      token->GetName() == htmlTag || IsTableCellContextTag(token->GetName())) {
+      token->GetName() == kHTMLTag || IsTableCellContextTag(token->GetName())) {
     ParseError(token);
     return;
   }
@@ -1661,17 +1664,17 @@
     SetInsertionMode(kInRowMode);
     return;
   }
-  if (token->GetName() == bodyTag ||
+  if (token->GetName() == kBodyTag ||
       IsCaptionColOrColgroupTag(token->GetName()) ||
-      token->GetName() == htmlTag) {
+      token->GetName() == kHTMLTag) {
     ParseError(token);
     return;
   }
-  if (token->GetName() == tableTag || token->GetName() == trTag ||
+  if (token->GetName() == kTableTag || token->GetName() == kTrTag ||
       IsTableBodyContextTag(token->GetName())) {
     if (!tree_.OpenElements()->InTableScope(token->GetName())) {
       DCHECK(IsTableBodyContextTag(token->GetName()) ||
-             tree_.OpenElements()->InTableScope(templateTag) ||
+             tree_.OpenElements()->InTableScope(kTemplateTag) ||
              IsParsingFragment());
       ParseError(token);
       return;
@@ -1685,29 +1688,29 @@
 
 void HTMLTreeBuilder::ProcessEndTagForInBody(AtomicHTMLToken* token) {
   DCHECK_EQ(token->GetType(), HTMLToken::kEndTag);
-  if (token->GetName() == bodyTag) {
+  if (token->GetName() == kBodyTag) {
     ProcessBodyEndTagForInBody(token);
     return;
   }
-  if (token->GetName() == htmlTag) {
-    AtomicHTMLToken end_body(HTMLToken::kEndTag, bodyTag.LocalName());
+  if (token->GetName() == kHTMLTag) {
+    AtomicHTMLToken end_body(HTMLToken::kEndTag, kBodyTag.LocalName());
     if (ProcessBodyEndTagForInBody(&end_body))
       ProcessEndTag(token);
     return;
   }
-  if (token->GetName() == addressTag || token->GetName() == articleTag ||
-      token->GetName() == asideTag || token->GetName() == blockquoteTag ||
-      token->GetName() == buttonTag || token->GetName() == centerTag ||
-      token->GetName() == detailsTag || token->GetName() == dirTag ||
-      token->GetName() == divTag || token->GetName() == dlTag ||
-      token->GetName() == fieldsetTag || token->GetName() == figcaptionTag ||
-      token->GetName() == figureTag || token->GetName() == footerTag ||
-      token->GetName() == headerTag || token->GetName() == hgroupTag ||
-      token->GetName() == listingTag || token->GetName() == mainTag ||
-      token->GetName() == menuTag || token->GetName() == navTag ||
-      token->GetName() == olTag || token->GetName() == preTag ||
-      token->GetName() == sectionTag || token->GetName() == summaryTag ||
-      token->GetName() == ulTag) {
+  if (token->GetName() == kAddressTag || token->GetName() == kArticleTag ||
+      token->GetName() == kAsideTag || token->GetName() == kBlockquoteTag ||
+      token->GetName() == kButtonTag || token->GetName() == kCenterTag ||
+      token->GetName() == kDetailsTag || token->GetName() == kDirTag ||
+      token->GetName() == kDivTag || token->GetName() == kDlTag ||
+      token->GetName() == kFieldsetTag || token->GetName() == kFigcaptionTag ||
+      token->GetName() == kFigureTag || token->GetName() == kFooterTag ||
+      token->GetName() == kHeaderTag || token->GetName() == kHgroupTag ||
+      token->GetName() == kListingTag || token->GetName() == kMainTag ||
+      token->GetName() == kMenuTag || token->GetName() == kNavTag ||
+      token->GetName() == kOlTag || token->GetName() == kPreTag ||
+      token->GetName() == kSectionTag || token->GetName() == kSummaryTag ||
+      token->GetName() == kUlTag) {
     if (!tree_.OpenElements()->InScope(token->GetName())) {
       ParseError(token);
       return;
@@ -1718,7 +1721,7 @@
     tree_.OpenElements()->PopUntilPopped(token->GetName());
     return;
   }
-  if (token->GetName() == formTag && !IsParsingTemplateContents()) {
+  if (token->GetName() == kFormTag && !IsParsingTemplateContents()) {
     Element* node = tree_.TakeForm();
     if (!node || !tree_.OpenElements()->InScope(node)) {
       ParseError(token);
@@ -1729,10 +1732,10 @@
       ParseError(token);
     tree_.OpenElements()->Remove(node);
   }
-  if (token->GetName() == pTag) {
+  if (token->GetName() == kPTag) {
     if (!tree_.OpenElements()->InButtonScope(token->GetName())) {
       ParseError(token);
-      ProcessFakeStartTag(pTag);
+      ProcessFakeStartTag(kPTag);
       DCHECK(tree_.OpenElements()->InScope(token->GetName()));
       ProcessEndTag(token);
       return;
@@ -1743,7 +1746,7 @@
     tree_.OpenElements()->PopUntilPopped(token->GetName());
     return;
   }
-  if (token->GetName() == liTag) {
+  if (token->GetName() == kLiTag) {
     if (!tree_.OpenElements()->InListItemScope(token->GetName())) {
       ParseError(token);
       return;
@@ -1754,7 +1757,7 @@
     tree_.OpenElements()->PopUntilPopped(token->GetName());
     return;
   }
-  if (token->GetName() == ddTag || token->GetName() == dtTag) {
+  if (token->GetName() == kDdTag || token->GetName() == kDtTag) {
     if (!tree_.OpenElements()->InScope(token->GetName())) {
       ParseError(token);
       return;
@@ -1780,8 +1783,8 @@
     CallTheAdoptionAgency(token);
     return;
   }
-  if (token->GetName() == appletTag || token->GetName() == marqueeTag ||
-      token->GetName() == objectTag) {
+  if (token->GetName() == kAppletTag || token->GetName() == kMarqueeTag ||
+      token->GetName() == kObjectTag) {
     if (!tree_.OpenElements()->InScope(token->GetName())) {
       ParseError(token);
       return;
@@ -1793,12 +1796,12 @@
     tree_.ActiveFormattingElements()->ClearToLastMarker();
     return;
   }
-  if (token->GetName() == brTag) {
+  if (token->GetName() == kBrTag) {
     ParseError(token);
-    ProcessFakeStartTag(brTag);
+    ProcessFakeStartTag(kBrTag);
     return;
   }
-  if (token->GetName() == templateTag) {
+  if (token->GetName() == kTemplateTag) {
     ProcessTemplateEndTag(token);
     return;
   }
@@ -1806,53 +1809,53 @@
 }
 
 bool HTMLTreeBuilder::ProcessCaptionEndTagForInCaption() {
-  if (!tree_.OpenElements()->InTableScope(captionTag.LocalName())) {
+  if (!tree_.OpenElements()->InTableScope(kCaptionTag.LocalName())) {
     DCHECK(IsParsingFragment());
     // FIXME: parse error
     return false;
   }
   tree_.GenerateImpliedEndTags();
-  // FIXME: parse error if (!tree_.CurrentStackItem()->HasTagName(captionTag))
-  tree_.OpenElements()->PopUntilPopped(captionTag.LocalName());
+  // FIXME: parse error if (!tree_.CurrentStackItem()->HasTagName(kCaptionTag))
+  tree_.OpenElements()->PopUntilPopped(kCaptionTag.LocalName());
   tree_.ActiveFormattingElements()->ClearToLastMarker();
   SetInsertionMode(kInTableMode);
   return true;
 }
 
 bool HTMLTreeBuilder::ProcessTrEndTagForInRow() {
-  if (!tree_.OpenElements()->InTableScope(trTag)) {
+  if (!tree_.OpenElements()->InTableScope(kTrTag)) {
     DCHECK(IsParsingFragmentOrTemplateContents());
     // FIXME: parse error
     return false;
   }
   tree_.OpenElements()->PopUntilTableRowScopeMarker();
-  DCHECK(tree_.CurrentStackItem()->HasTagName(trTag));
+  DCHECK(tree_.CurrentStackItem()->HasTagName(kTrTag));
   tree_.OpenElements()->Pop();
   SetInsertionMode(kInTableBodyMode);
   return true;
 }
 
 bool HTMLTreeBuilder::ProcessTableEndTagForInTable() {
-  if (!tree_.OpenElements()->InTableScope(tableTag)) {
+  if (!tree_.OpenElements()->InTableScope(kTableTag)) {
     DCHECK(IsParsingFragmentOrTemplateContents());
     // FIXME: parse error.
     return false;
   }
-  tree_.OpenElements()->PopUntilPopped(tableTag.LocalName());
+  tree_.OpenElements()->PopUntilPopped(kTableTag.LocalName());
   ResetInsertionModeAppropriately();
   return true;
 }
 
 void HTMLTreeBuilder::ProcessEndTagForInTable(AtomicHTMLToken* token) {
   DCHECK_EQ(token->GetType(), HTMLToken::kEndTag);
-  if (token->GetName() == tableTag) {
+  if (token->GetName() == kTableTag) {
     ProcessTableEndTagForInTable();
     return;
   }
-  if (token->GetName() == bodyTag ||
+  if (token->GetName() == kBodyTag ||
       IsCaptionColOrColgroupTag(token->GetName()) ||
-      token->GetName() == htmlTag || IsTableBodyContextTag(token->GetName()) ||
-      IsTableCellContextTag(token->GetName()) || token->GetName() == trTag) {
+      token->GetName() == kHTMLTag || IsTableBodyContextTag(token->GetName()) ||
+      IsTableCellContextTag(token->GetName()) || token->GetName() == kTrTag) {
     ParseError(token);
     return;
   }
@@ -1871,8 +1874,8 @@
       FALLTHROUGH;
     case kBeforeHTMLMode:
       DCHECK_EQ(GetInsertionMode(), kBeforeHTMLMode);
-      if (token->GetName() != headTag && token->GetName() != bodyTag &&
-          token->GetName() != htmlTag && token->GetName() != brTag) {
+      if (token->GetName() != kHeadTag && token->GetName() != kBodyTag &&
+          token->GetName() != kHTMLTag && token->GetName() != kBrTag) {
         ParseError(token);
         return;
       }
@@ -1880,8 +1883,8 @@
       FALLTHROUGH;
     case kBeforeHeadMode:
       DCHECK_EQ(GetInsertionMode(), kBeforeHeadMode);
-      if (token->GetName() != headTag && token->GetName() != bodyTag &&
-          token->GetName() != htmlTag && token->GetName() != brTag) {
+      if (token->GetName() != kHeadTag && token->GetName() != kBodyTag &&
+          token->GetName() != kHTMLTag && token->GetName() != kBrTag) {
         ParseError(token);
         return;
       }
@@ -1893,17 +1896,17 @@
       // because other end tag cases now refer to it ("process the token for
       // using the rules of the "in head" insertion mode"). but because the
       // logic falls through to AfterHeadMode, that gets a little messy.
-      if (token->GetName() == templateTag) {
+      if (token->GetName() == kTemplateTag) {
         ProcessTemplateEndTag(token);
         return;
       }
-      if (token->GetName() == headTag) {
+      if (token->GetName() == kHeadTag) {
         tree_.OpenElements()->PopHTMLHeadElement();
         SetInsertionMode(kAfterHeadMode);
         return;
       }
-      if (token->GetName() != bodyTag && token->GetName() != htmlTag &&
-          token->GetName() != brTag) {
+      if (token->GetName() != kBodyTag && token->GetName() != kHTMLTag &&
+          token->GetName() != kBrTag) {
         ParseError(token);
         return;
       }
@@ -1911,8 +1914,8 @@
       FALLTHROUGH;
     case kAfterHeadMode:
       DCHECK_EQ(GetInsertionMode(), kAfterHeadMode);
-      if (token->GetName() != bodyTag && token->GetName() != htmlTag &&
-          token->GetName() != brTag) {
+      if (token->GetName() != kBodyTag && token->GetName() != kHTMLTag &&
+          token->GetName() != kBrTag) {
         ParseError(token);
         return;
       }
@@ -1928,11 +1931,11 @@
       break;
     case kInCaptionMode:
       DCHECK_EQ(GetInsertionMode(), kInCaptionMode);
-      if (token->GetName() == captionTag) {
+      if (token->GetName() == kCaptionTag) {
         ProcessCaptionEndTagForInCaption();
         return;
       }
-      if (token->GetName() == tableTag) {
+      if (token->GetName() == kTableTag) {
         ParseError(token);
         if (!ProcessCaptionEndTagForInCaption()) {
           DCHECK(IsParsingFragment());
@@ -1941,11 +1944,11 @@
         ProcessEndTag(token);
         return;
       }
-      if (token->GetName() == bodyTag || token->GetName() == colTag ||
-          token->GetName() == colgroupTag || token->GetName() == htmlTag ||
+      if (token->GetName() == kBodyTag || token->GetName() == kColTag ||
+          token->GetName() == kColgroupTag || token->GetName() == kHTMLTag ||
           IsTableBodyContextTag(token->GetName()) ||
           IsTableCellContextTag(token->GetName()) ||
-          token->GetName() == trTag) {
+          token->GetName() == kTrTag) {
         ParseError(token);
         return;
       }
@@ -1953,15 +1956,15 @@
       break;
     case kInColumnGroupMode:
       DCHECK_EQ(GetInsertionMode(), kInColumnGroupMode);
-      if (token->GetName() == colgroupTag) {
+      if (token->GetName() == kColgroupTag) {
         ProcessColgroupEndTagForInColumnGroup();
         return;
       }
-      if (token->GetName() == colTag) {
+      if (token->GetName() == kColTag) {
         ParseError(token);
         return;
       }
-      if (token->GetName() == templateTag) {
+      if (token->GetName() == kTemplateTag) {
         ProcessTemplateEndTag(token);
         return;
       }
@@ -1985,7 +1988,7 @@
       break;
     case kAfterBodyMode:
       DCHECK_EQ(GetInsertionMode(), kAfterBodyMode);
-      if (token->GetName() == htmlTag) {
+      if (token->GetName() == kHTMLTag) {
         if (IsParsingFragment()) {
           ParseError(token);
           return;
@@ -2003,14 +2006,14 @@
       break;
     case kInHeadNoscriptMode:
       DCHECK_EQ(GetInsertionMode(), kInHeadNoscriptMode);
-      if (token->GetName() == noscriptTag) {
-        DCHECK(tree_.CurrentStackItem()->HasTagName(noscriptTag));
+      if (token->GetName() == kNoscriptTag) {
+        DCHECK(tree_.CurrentStackItem()->HasTagName(kNoscriptTag));
         tree_.OpenElements()->Pop();
-        DCHECK(tree_.CurrentStackItem()->HasTagName(headTag));
+        DCHECK(tree_.CurrentStackItem()->HasTagName(kHeadTag));
         SetInsertionMode(kInHeadMode);
         return;
       }
-      if (token->GetName() != brTag) {
+      if (token->GetName() != kBrTag) {
         ParseError(token);
         return;
       }
@@ -2018,8 +2021,8 @@
       ProcessToken(token);
       break;
     case kTextMode:
-      if (token->GetName() == scriptTag &&
-          tree_.CurrentStackItem()->HasTagName(scriptTag)) {
+      if (token->GetName() == kScriptTag &&
+          tree_.CurrentStackItem()->HasTagName(kScriptTag)) {
         // Pause ourselves so that parsing stops until the script can be
         // processed by the caller.
         if (ScriptingContentIsAllowed(tree_.GetParserContentPolicy()))
@@ -2039,7 +2042,7 @@
       break;
     case kInFramesetMode:
       DCHECK_EQ(GetInsertionMode(), kInFramesetMode);
-      if (token->GetName() == framesetTag) {
+      if (token->GetName() == kFramesetTag) {
         bool ignore_frameset_for_fragment_parsing = tree_.CurrentIsRootNode();
         ignore_frameset_for_fragment_parsing =
             ignore_frameset_for_fragment_parsing ||
@@ -2051,14 +2054,14 @@
         }
         tree_.OpenElements()->Pop();
         if (!IsParsingFragment() &&
-            !tree_.CurrentStackItem()->HasTagName(framesetTag))
+            !tree_.CurrentStackItem()->HasTagName(kFramesetTag))
           SetInsertionMode(kAfterFramesetMode);
         return;
       }
       break;
     case kAfterFramesetMode:
       DCHECK_EQ(GetInsertionMode(), kAfterFramesetMode);
-      if (token->GetName() == htmlTag) {
+      if (token->GetName() == kHTMLTag) {
         SetInsertionMode(kAfterAfterFramesetMode);
         return;
       }
@@ -2070,13 +2073,14 @@
       break;
     case kInSelectInTableMode:
       DCHECK(GetInsertionMode() == kInSelectInTableMode);
-      if (token->GetName() == captionTag || token->GetName() == tableTag ||
+      if (token->GetName() == kCaptionTag || token->GetName() == kTableTag ||
           IsTableBodyContextTag(token->GetName()) ||
-          token->GetName() == trTag ||
+          token->GetName() == kTrTag ||
           IsTableCellContextTag(token->GetName())) {
         ParseError(token);
         if (tree_.OpenElements()->InTableScope(token->GetName())) {
-          AtomicHTMLToken end_select(HTMLToken::kEndTag, selectTag.LocalName());
+          AtomicHTMLToken end_select(HTMLToken::kEndTag,
+                                     kSelectTag.LocalName());
           ProcessEndTag(&end_select);
           ProcessEndTag(token);
         }
@@ -2086,36 +2090,37 @@
     case kInSelectMode:
       DCHECK(GetInsertionMode() == kInSelectMode ||
              GetInsertionMode() == kInSelectInTableMode);
-      if (token->GetName() == optgroupTag) {
-        if (tree_.CurrentStackItem()->HasTagName(optionTag) &&
-            tree_.OneBelowTop() && tree_.OneBelowTop()->HasTagName(optgroupTag))
-          ProcessFakeEndTag(optionTag);
-        if (tree_.CurrentStackItem()->HasTagName(optgroupTag)) {
+      if (token->GetName() == kOptgroupTag) {
+        if (tree_.CurrentStackItem()->HasTagName(kOptionTag) &&
+            tree_.OneBelowTop() &&
+            tree_.OneBelowTop()->HasTagName(kOptgroupTag))
+          ProcessFakeEndTag(kOptionTag);
+        if (tree_.CurrentStackItem()->HasTagName(kOptgroupTag)) {
           tree_.OpenElements()->Pop();
           return;
         }
         ParseError(token);
         return;
       }
-      if (token->GetName() == optionTag) {
-        if (tree_.CurrentStackItem()->HasTagName(optionTag)) {
+      if (token->GetName() == kOptionTag) {
+        if (tree_.CurrentStackItem()->HasTagName(kOptionTag)) {
           tree_.OpenElements()->Pop();
           return;
         }
         ParseError(token);
         return;
       }
-      if (token->GetName() == selectTag) {
+      if (token->GetName() == kSelectTag) {
         if (!tree_.OpenElements()->InSelectScope(token->GetName())) {
           DCHECK(IsParsingFragment());
           ParseError(token);
           return;
         }
-        tree_.OpenElements()->PopUntilPopped(selectTag.LocalName());
+        tree_.OpenElements()->PopUntilPopped(kSelectTag.LocalName());
         ResetInsertionModeAppropriately();
         return;
       }
-      if (token->GetName() == templateTag) {
+      if (token->GetName() == kTemplateTag) {
         ProcessTemplateEndTag(token);
         return;
       }
@@ -2125,7 +2130,7 @@
       ProcessEndTag(token);
       break;
     case kTemplateContentsMode:
-      if (token->GetName() == templateTag) {
+      if (token->GetName() == kTemplateTag) {
         ProcessTemplateEndTag(token);
         return;
       }
@@ -2247,11 +2252,11 @@
              GetInsertionMode() == kInRowMode);
       DCHECK(pending_table_characters_.IsEmpty());
       if (tree_.CurrentStackItem()->IsElementNode() &&
-          (tree_.CurrentStackItem()->HasTagName(tableTag) ||
-           tree_.CurrentStackItem()->HasTagName(tbodyTag) ||
-           tree_.CurrentStackItem()->HasTagName(tfootTag) ||
-           tree_.CurrentStackItem()->HasTagName(theadTag) ||
-           tree_.CurrentStackItem()->HasTagName(trTag))) {
+          (tree_.CurrentStackItem()->HasTagName(kTableTag) ||
+           tree_.CurrentStackItem()->HasTagName(kTbodyTag) ||
+           tree_.CurrentStackItem()->HasTagName(kTfootTag) ||
+           tree_.CurrentStackItem()->HasTagName(kTheadTag) ||
+           tree_.CurrentStackItem()->HasTagName(kTrTag))) {
         original_insertion_mode_ = insertion_mode_;
         SetInsertionMode(kInTableTextMode);
         // Note that we fall through to the InTableTextMode case below.
@@ -2404,7 +2409,7 @@
         DCHECK(IsParsingFragment());
         return;  // FIXME: Should we break here instead of returning?
       }
-      DCHECK(tree_.CurrentNode()->HasTagName(colgroupTag) ||
+      DCHECK(tree_.CurrentNode()->HasTagName(kColgroupTag) ||
              IsHTMLTemplateElement(tree_.CurrentNode()));
       ProcessColgroupEndTagForInColumnGroup();
       FALLTHROUGH;
@@ -2431,7 +2436,7 @@
       return;
     case kTextMode: {
       ParseError(token);
-      if (tree_.CurrentStackItem()->HasTagName(scriptTag)) {
+      if (tree_.CurrentStackItem()->HasTagName(kScriptTag)) {
         // Mark the script element as "already started".
         DVLOG(1) << "Not implemented.";
       }
@@ -2460,28 +2465,28 @@
 }
 
 void HTMLTreeBuilder::DefaultForBeforeHTML() {
-  AtomicHTMLToken start_html(HTMLToken::kStartTag, htmlTag.LocalName());
+  AtomicHTMLToken start_html(HTMLToken::kStartTag, kHTMLTag.LocalName());
   tree_.InsertHTMLHtmlStartTagBeforeHTML(&start_html);
   SetInsertionMode(kBeforeHeadMode);
 }
 
 void HTMLTreeBuilder::DefaultForBeforeHead() {
-  AtomicHTMLToken start_head(HTMLToken::kStartTag, headTag.LocalName());
+  AtomicHTMLToken start_head(HTMLToken::kStartTag, kHeadTag.LocalName());
   ProcessStartTag(&start_head);
 }
 
 void HTMLTreeBuilder::DefaultForInHead() {
-  AtomicHTMLToken end_head(HTMLToken::kEndTag, headTag.LocalName());
+  AtomicHTMLToken end_head(HTMLToken::kEndTag, kHeadTag.LocalName());
   ProcessEndTag(&end_head);
 }
 
 void HTMLTreeBuilder::DefaultForInHeadNoscript() {
-  AtomicHTMLToken end_noscript(HTMLToken::kEndTag, noscriptTag.LocalName());
+  AtomicHTMLToken end_noscript(HTMLToken::kEndTag, kNoscriptTag.LocalName());
   ProcessEndTag(&end_noscript);
 }
 
 void HTMLTreeBuilder::DefaultForAfterHead() {
-  AtomicHTMLToken start_body(HTMLToken::kStartTag, bodyTag.LocalName());
+  AtomicHTMLToken start_body(HTMLToken::kStartTag, kBodyTag.LocalName());
   ProcessStartTag(&start_body);
   frameset_ok_ = true;
 }
@@ -2504,23 +2509,23 @@
 
 bool HTMLTreeBuilder::ProcessStartTagForInHead(AtomicHTMLToken* token) {
   DCHECK_EQ(token->GetType(), HTMLToken::kStartTag);
-  if (token->GetName() == htmlTag) {
+  if (token->GetName() == kHTMLTag) {
     ProcessHtmlStartTagForInBody(token);
     return true;
   }
-  if (token->GetName() == baseTag || token->GetName() == basefontTag ||
-      token->GetName() == bgsoundTag || token->GetName() == commandTag ||
-      token->GetName() == linkTag || token->GetName() == metaTag) {
+  if (token->GetName() == kBaseTag || token->GetName() == kBasefontTag ||
+      token->GetName() == kBgsoundTag || token->GetName() == kCommandTag ||
+      token->GetName() == kLinkTag || token->GetName() == kMetaTag) {
     tree_.InsertSelfClosingHTMLElementDestroyingToken(token);
     // Note: The custom processing for the <meta> tag is done in
     // HTMLMetaElement::process().
     return true;
   }
-  if (token->GetName() == titleTag) {
+  if (token->GetName() == kTitleTag) {
     ProcessGenericRCDATAStartTag(token);
     return true;
   }
-  if (token->GetName() == noscriptTag) {
+  if (token->GetName() == kNoscriptTag) {
     if (options_.script_enabled) {
       ProcessGenericRawTextStartTag(token);
       return true;
@@ -2529,19 +2534,19 @@
     SetInsertionMode(kInHeadNoscriptMode);
     return true;
   }
-  if (token->GetName() == noframesTag || token->GetName() == styleTag) {
+  if (token->GetName() == kNoframesTag || token->GetName() == kStyleTag) {
     ProcessGenericRawTextStartTag(token);
     return true;
   }
-  if (token->GetName() == scriptTag) {
+  if (token->GetName() == kScriptTag) {
     ProcessScriptStartTag(token);
     return true;
   }
-  if (token->GetName() == templateTag) {
+  if (token->GetName() == kTemplateTag) {
     ProcessTemplateStartTag(token);
     return true;
   }
-  if (token->GetName() == headTag) {
+  if (token->GetName() == kHeadTag) {
     ParseError(token);
     return true;
   }
@@ -2632,38 +2637,38 @@
       ParseError(token);
       break;
     case HTMLToken::kStartTag: {
-      if (token->GetName() == bTag || token->GetName() == bigTag ||
-          token->GetName() == blockquoteTag || token->GetName() == bodyTag ||
-          token->GetName() == brTag || token->GetName() == centerTag ||
-          token->GetName() == codeTag || token->GetName() == ddTag ||
-          token->GetName() == divTag || token->GetName() == dlTag ||
-          token->GetName() == dtTag || token->GetName() == emTag ||
-          token->GetName() == embedTag ||
+      if (token->GetName() == kBTag || token->GetName() == kBigTag ||
+          token->GetName() == kBlockquoteTag || token->GetName() == kBodyTag ||
+          token->GetName() == kBrTag || token->GetName() == kCenterTag ||
+          token->GetName() == kCodeTag || token->GetName() == kDdTag ||
+          token->GetName() == kDivTag || token->GetName() == kDlTag ||
+          token->GetName() == kDtTag || token->GetName() == kEmTag ||
+          token->GetName() == kEmbedTag ||
           IsNumberedHeaderTag(token->GetName()) ||
-          token->GetName() == headTag || token->GetName() == hrTag ||
-          token->GetName() == iTag || token->GetName() == imgTag ||
-          token->GetName() == liTag || token->GetName() == listingTag ||
-          token->GetName() == menuTag || token->GetName() == metaTag ||
-          token->GetName() == nobrTag || token->GetName() == olTag ||
-          token->GetName() == pTag || token->GetName() == preTag ||
-          token->GetName() == rubyTag || token->GetName() == sTag ||
-          token->GetName() == smallTag || token->GetName() == spanTag ||
-          token->GetName() == strongTag || token->GetName() == strikeTag ||
-          token->GetName() == subTag || token->GetName() == supTag ||
-          token->GetName() == tableTag || token->GetName() == ttTag ||
-          token->GetName() == uTag || token->GetName() == ulTag ||
-          token->GetName() == varTag ||
-          (token->GetName() == fontTag &&
-           (token->GetAttributeItem(colorAttr) ||
-            token->GetAttributeItem(faceAttr) ||
-            token->GetAttributeItem(sizeAttr)))) {
+          token->GetName() == kHeadTag || token->GetName() == kHrTag ||
+          token->GetName() == kITag || token->GetName() == kImgTag ||
+          token->GetName() == kLiTag || token->GetName() == kListingTag ||
+          token->GetName() == kMenuTag || token->GetName() == kMetaTag ||
+          token->GetName() == kNobrTag || token->GetName() == kOlTag ||
+          token->GetName() == kPTag || token->GetName() == kPreTag ||
+          token->GetName() == kRubyTag || token->GetName() == kSTag ||
+          token->GetName() == kSmallTag || token->GetName() == kSpanTag ||
+          token->GetName() == kStrongTag || token->GetName() == kStrikeTag ||
+          token->GetName() == kSubTag || token->GetName() == kSupTag ||
+          token->GetName() == kTableTag || token->GetName() == kTtTag ||
+          token->GetName() == kUTag || token->GetName() == kUlTag ||
+          token->GetName() == kVarTag ||
+          (token->GetName() == kFontTag &&
+           (token->GetAttributeItem(kColorAttr) ||
+            token->GetAttributeItem(kFaceAttr) ||
+            token->GetAttributeItem(kSizeAttr)))) {
         ParseError(token);
         tree_.OpenElements()->PopUntilForeignContentScopeMarker();
         ProcessStartTag(token);
         return;
-      } else if (token->GetName() == scriptTag) {
-        script_to_process_start_position_ = parser_->GetTextPosition();
       }
+      if (token->GetName() == kScriptTag)
+        script_to_process_start_position_ = parser_->GetTextPosition();
       const AtomicString& current_namespace =
           adjusted_current_node->NamespaceURI();
       if (current_namespace == mathml_names::kNamespaceURI)
diff --git a/third_party/blink/renderer/core/html/parser/html_tree_builder_simulator.cc b/third_party/blink/renderer/core/html/parser/html_tree_builder_simulator.cc
index b99fee50..21a28c7 100644
--- a/third_party/blink/renderer/core/html/parser/html_tree_builder_simulator.cc
+++ b/third_party/blink/renderer/core/html/parser/html_tree_builder_simulator.cc
@@ -35,52 +35,60 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 static bool TokenExitsForeignContent(const CompactHTMLToken& token) {
   // FIXME: This is copied from HTMLTreeBuilder::processTokenInForeignContent
   // and changed to use threadSafeHTMLNamesMatch.
   const String& tag_name = token.Data();
-  return ThreadSafeMatch(tag_name, bTag) || ThreadSafeMatch(tag_name, bigTag) ||
-         ThreadSafeMatch(tag_name, blockquoteTag) ||
-         ThreadSafeMatch(tag_name, bodyTag) ||
-         ThreadSafeMatch(tag_name, brTag) ||
-         ThreadSafeMatch(tag_name, centerTag) ||
-         ThreadSafeMatch(tag_name, codeTag) ||
-         ThreadSafeMatch(tag_name, ddTag) ||
-         ThreadSafeMatch(tag_name, divTag) ||
-         ThreadSafeMatch(tag_name, dlTag) || ThreadSafeMatch(tag_name, dtTag) ||
-         ThreadSafeMatch(tag_name, emTag) ||
-         ThreadSafeMatch(tag_name, embedTag) ||
-         ThreadSafeMatch(tag_name, h1Tag) || ThreadSafeMatch(tag_name, h2Tag) ||
-         ThreadSafeMatch(tag_name, h3Tag) || ThreadSafeMatch(tag_name, h4Tag) ||
-         ThreadSafeMatch(tag_name, h5Tag) || ThreadSafeMatch(tag_name, h6Tag) ||
-         ThreadSafeMatch(tag_name, headTag) ||
-         ThreadSafeMatch(tag_name, hrTag) || ThreadSafeMatch(tag_name, iTag) ||
-         ThreadSafeMatch(tag_name, imgTag) ||
-         ThreadSafeMatch(tag_name, liTag) ||
-         ThreadSafeMatch(tag_name, listingTag) ||
-         ThreadSafeMatch(tag_name, menuTag) ||
-         ThreadSafeMatch(tag_name, metaTag) ||
-         ThreadSafeMatch(tag_name, nobrTag) ||
-         ThreadSafeMatch(tag_name, olTag) || ThreadSafeMatch(tag_name, pTag) ||
-         ThreadSafeMatch(tag_name, preTag) ||
-         ThreadSafeMatch(tag_name, rubyTag) ||
-         ThreadSafeMatch(tag_name, sTag) ||
-         ThreadSafeMatch(tag_name, smallTag) ||
-         ThreadSafeMatch(tag_name, spanTag) ||
-         ThreadSafeMatch(tag_name, strongTag) ||
-         ThreadSafeMatch(tag_name, strikeTag) ||
-         ThreadSafeMatch(tag_name, subTag) ||
-         ThreadSafeMatch(tag_name, supTag) ||
-         ThreadSafeMatch(tag_name, tableTag) ||
-         ThreadSafeMatch(tag_name, ttTag) || ThreadSafeMatch(tag_name, uTag) ||
-         ThreadSafeMatch(tag_name, ulTag) ||
-         ThreadSafeMatch(tag_name, varTag) ||
-         (ThreadSafeMatch(tag_name, fontTag) &&
-          (token.GetAttributeItem(colorAttr) ||
-           token.GetAttributeItem(faceAttr) ||
-           token.GetAttributeItem(sizeAttr)));
+  return ThreadSafeMatch(tag_name, kBTag) ||
+         ThreadSafeMatch(tag_name, kBigTag) ||
+         ThreadSafeMatch(tag_name, kBlockquoteTag) ||
+         ThreadSafeMatch(tag_name, kBodyTag) ||
+         ThreadSafeMatch(tag_name, kBrTag) ||
+         ThreadSafeMatch(tag_name, kCenterTag) ||
+         ThreadSafeMatch(tag_name, kCodeTag) ||
+         ThreadSafeMatch(tag_name, kDdTag) ||
+         ThreadSafeMatch(tag_name, kDivTag) ||
+         ThreadSafeMatch(tag_name, kDlTag) ||
+         ThreadSafeMatch(tag_name, kDtTag) ||
+         ThreadSafeMatch(tag_name, kEmTag) ||
+         ThreadSafeMatch(tag_name, kEmbedTag) ||
+         ThreadSafeMatch(tag_name, kH1Tag) ||
+         ThreadSafeMatch(tag_name, kH2Tag) ||
+         ThreadSafeMatch(tag_name, kH3Tag) ||
+         ThreadSafeMatch(tag_name, kH4Tag) ||
+         ThreadSafeMatch(tag_name, kH5Tag) ||
+         ThreadSafeMatch(tag_name, kH6Tag) ||
+         ThreadSafeMatch(tag_name, kHeadTag) ||
+         ThreadSafeMatch(tag_name, kHrTag) ||
+         ThreadSafeMatch(tag_name, kITag) ||
+         ThreadSafeMatch(tag_name, kImgTag) ||
+         ThreadSafeMatch(tag_name, kLiTag) ||
+         ThreadSafeMatch(tag_name, kListingTag) ||
+         ThreadSafeMatch(tag_name, kMenuTag) ||
+         ThreadSafeMatch(tag_name, kMetaTag) ||
+         ThreadSafeMatch(tag_name, kNobrTag) ||
+         ThreadSafeMatch(tag_name, kOlTag) ||
+         ThreadSafeMatch(tag_name, kPTag) ||
+         ThreadSafeMatch(tag_name, kPreTag) ||
+         ThreadSafeMatch(tag_name, kRubyTag) ||
+         ThreadSafeMatch(tag_name, kSTag) ||
+         ThreadSafeMatch(tag_name, kSmallTag) ||
+         ThreadSafeMatch(tag_name, kSpanTag) ||
+         ThreadSafeMatch(tag_name, kStrongTag) ||
+         ThreadSafeMatch(tag_name, kStrikeTag) ||
+         ThreadSafeMatch(tag_name, kSubTag) ||
+         ThreadSafeMatch(tag_name, kSupTag) ||
+         ThreadSafeMatch(tag_name, kTableTag) ||
+         ThreadSafeMatch(tag_name, kTtTag) ||
+         ThreadSafeMatch(tag_name, kUTag) ||
+         ThreadSafeMatch(tag_name, kUlTag) ||
+         ThreadSafeMatch(tag_name, kVarTag) ||
+         (ThreadSafeMatch(tag_name, kFontTag) &&
+          (token.GetAttributeItem(kColorAttr) ||
+           token.GetAttributeItem(kFaceAttr) ||
+           token.GetAttributeItem(kSizeAttr)));
 }
 
 static bool TokenExitsMath(const CompactHTMLToken& token) {
@@ -97,9 +105,9 @@
 static bool TokenExitsInSelect(const CompactHTMLToken& token) {
   // https://html.spec.whatwg.org/#parsing-main-inselect
   const String& tag_name = token.Data();
-  return ThreadSafeMatch(tag_name, inputTag) ||
-         ThreadSafeMatch(tag_name, keygenTag) ||
-         ThreadSafeMatch(tag_name, textareaTag);
+  return ThreadSafeMatch(tag_name, kInputTag) ||
+         ThreadSafeMatch(tag_name, kKeygenTag) ||
+         ThreadSafeMatch(tag_name, kTextareaTag);
 }
 
 HTMLTreeBuilderSimulator::HTMLTreeBuilderSimulator(
@@ -148,19 +156,19 @@
     } else if (!InForeignContent()) {
       // FIXME: This is just a copy of Tokenizer::updateStateFor which uses
       // threadSafeMatches.
-      if (ThreadSafeMatch(tag_name, textareaTag) ||
-          ThreadSafeMatch(tag_name, titleTag)) {
+      if (ThreadSafeMatch(tag_name, kTextareaTag) ||
+          ThreadSafeMatch(tag_name, kTitleTag)) {
         tokenizer->SetState(HTMLTokenizer::kRCDATAState);
-      } else if (ThreadSafeMatch(tag_name, scriptTag)) {
+      } else if (ThreadSafeMatch(tag_name, kScriptTag)) {
         tokenizer->SetState(HTMLTokenizer::kScriptDataState);
 
         String type_attribute_value;
-        if (auto* item = token.GetAttributeItem(typeAttr)) {
+        if (auto* item = token.GetAttributeItem(kTypeAttr)) {
           type_attribute_value = item->Value();
         }
 
         String language_attribute_value;
-        if (auto* item = token.GetAttributeItem(languageAttr)) {
+        if (auto* item = token.GetAttributeItem(kLanguageAttr)) {
           language_attribute_value = item->Value();
         }
 
@@ -170,22 +178,22 @@
                 ScriptLoader::kAllowLegacyTypeInTypeAttribute, script_type)) {
           simulated_token = kValidScriptStart;
         }
-      } else if (ThreadSafeMatch(tag_name, linkTag)) {
+      } else if (ThreadSafeMatch(tag_name, kLinkTag)) {
         simulated_token = kLink;
       } else if (!in_select_insertion_mode_) {
         // If we're in the "in select" insertion mode, all of these tags are
         // ignored, so we shouldn't change the tokenizer state:
         // https://html.spec.whatwg.org/#parsing-main-inselect
-        if (ThreadSafeMatch(tag_name, plaintextTag) &&
+        if (ThreadSafeMatch(tag_name, kPlaintextTag) &&
             !in_select_insertion_mode_) {
           tokenizer->SetState(HTMLTokenizer::kPLAINTEXTState);
-        } else if (ThreadSafeMatch(tag_name, styleTag) ||
-                   ThreadSafeMatch(tag_name, iframeTag) ||
-                   ThreadSafeMatch(tag_name, xmpTag) ||
-                   (ThreadSafeMatch(tag_name, noembedTag) &&
+        } else if (ThreadSafeMatch(tag_name, kStyleTag) ||
+                   ThreadSafeMatch(tag_name, kIFrameTag) ||
+                   ThreadSafeMatch(tag_name, kXmpTag) ||
+                   (ThreadSafeMatch(tag_name, kNoembedTag) &&
                     options_.plugins_enabled) ||
-                   ThreadSafeMatch(tag_name, noframesTag) ||
-                   (ThreadSafeMatch(tag_name, noscriptTag) &&
+                   ThreadSafeMatch(tag_name, kNoframesTag) ||
+                   (ThreadSafeMatch(tag_name, kNoscriptTag) &&
                     options_.script_enabled)) {
           tokenizer->SetState(HTMLTokenizer::kRAWTEXTState);
         }
@@ -197,7 +205,7 @@
       // textual content.
       //
       // https://html.spec.whatwg.org/#parsing-main-inselect
-      if (ThreadSafeMatch(tag_name, selectTag)) {
+      if (ThreadSafeMatch(tag_name, kSelectTag)) {
         in_select_insertion_mode_ = true;
       } else if (in_select_insertion_mode_ && TokenExitsInSelect(token)) {
         in_select_insertion_mode_ = false;
@@ -218,14 +226,14 @@
          namespace_stack_.back() == HTML && TokenExitsMath(token))) {
       namespace_stack_.pop_back();
     }
-    if (ThreadSafeMatch(tag_name, scriptTag)) {
+    if (ThreadSafeMatch(tag_name, kScriptTag)) {
       if (!InForeignContent())
         tokenizer->SetState(HTMLTokenizer::kDataState);
       return kScriptEnd;
-    } else if (ThreadSafeMatch(tag_name, selectTag)) {
-      in_select_insertion_mode_ = false;
     }
-    if (ThreadSafeMatch(tag_name, styleTag))
+    if (ThreadSafeMatch(tag_name, kSelectTag))
+      in_select_insertion_mode_ = false;
+    if (ThreadSafeMatch(tag_name, kStyleTag))
       simulated_token = kStyleEnd;
   }
 
diff --git a/third_party/blink/renderer/core/html/parser/text_document_parser.cc b/third_party/blink/renderer/core/html/parser/text_document_parser.cc
index 65d99315..56b282b 100644
--- a/third_party/blink/renderer/core/html/parser/text_document_parser.cc
+++ b/third_party/blink/renderer/core/html/parser/text_document_parser.cc
@@ -30,7 +30,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 TextDocumentParser::TextDocumentParser(HTMLDocument& document,
                                        ParserSynchronizationPolicy sync_policy)
@@ -56,8 +56,8 @@
   // line/column number calculations.
   Vector<Attribute> attributes;
   attributes.push_back(
-      Attribute(styleAttr, "word-wrap: break-word; white-space: pre-wrap;"));
-  AtomicHTMLToken fake_pre(HTMLToken::kStartTag, preTag.LocalName(),
+      Attribute(kStyleAttr, "word-wrap: break-word; white-space: pre-wrap;"));
+  AtomicHTMLToken fake_pre(HTMLToken::kStartTag, kPreTag.LocalName(),
                            attributes);
   TreeBuilder()->ConstructTree(&fake_pre);
 
diff --git a/third_party/blink/renderer/core/html/parser/text_resource_decoder.cc b/third_party/blink/renderer/core/html/parser/text_resource_decoder.cc
index 23d1073a..8ff95d8 100644
--- a/third_party/blink/renderer/core/html/parser/text_resource_decoder.cc
+++ b/third_party/blink/renderer/core/html/parser/text_resource_decoder.cc
@@ -24,7 +24,6 @@
 
 #include "third_party/blink/renderer/core/dom/dom_implementation.h"
 #include "third_party/blink/renderer/core/html/parser/html_meta_charset_parser.h"
-#include "third_party/blink/renderer/core/html_names.h"
 #include "third_party/blink/renderer/platform/text/text_encoding_detector.h"
 #include "third_party/blink/renderer/platform/wtf/string_extras.h"
 #include "third_party/blink/renderer/platform/wtf/text/text_codec.h"
@@ -32,8 +31,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 const int kMinimumLengthOfXMLDeclaration = 8;
 
 static inline bool BytesEqual(const char* p,
diff --git a/third_party/blink/renderer/core/html/parser/xss_auditor.cc b/third_party/blink/renderer/core/html/parser/xss_auditor.cc
index b0b92b01..2abfec8 100644
--- a/third_party/blink/renderer/core/html/parser/xss_auditor.cc
+++ b/third_party/blink/renderer/core/html/parser/xss_auditor.cc
@@ -60,7 +60,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 static bool IsNonCanonicalCharacter(UChar c) {
   // We remove all non-ASCII characters, including non-printable ASCII
@@ -520,30 +520,30 @@
   state_ = kFilteringTokens;
   bool did_block_script = EraseDangerousAttributesIfInjected(request);
 
-  if (HasName(request.token, scriptTag)) {
+  if (HasName(request.token, kScriptTag)) {
     did_block_script |= FilterScriptToken(request);
     DCHECK(request.should_allow_cdata || !script_tag_nesting_level_);
     script_tag_nesting_level_++;
-  } else if (HasName(request.token, objectTag))
+  } else if (HasName(request.token, kObjectTag))
     did_block_script |= FilterObjectToken(request);
-  else if (HasName(request.token, paramTag))
+  else if (HasName(request.token, kParamTag))
     did_block_script |= FilterParamToken(request);
-  else if (HasName(request.token, embedTag))
+  else if (HasName(request.token, kEmbedTag))
     did_block_script |= FilterEmbedToken(request);
-  else if (HasName(request.token, iframeTag) ||
-           HasName(request.token, frameTag))
+  else if (HasName(request.token, kIFrameTag) ||
+           HasName(request.token, kFrameTag))
     did_block_script |= FilterFrameToken(request);
-  else if (HasName(request.token, metaTag))
+  else if (HasName(request.token, kMetaTag))
     did_block_script |= FilterMetaToken(request);
-  else if (HasName(request.token, baseTag))
+  else if (HasName(request.token, kBaseTag))
     did_block_script |= FilterBaseToken(request);
-  else if (HasName(request.token, formTag))
+  else if (HasName(request.token, kFormTag))
     did_block_script |= FilterFormToken(request);
-  else if (HasName(request.token, inputTag))
+  else if (HasName(request.token, kInputTag))
     did_block_script |= FilterInputToken(request);
-  else if (HasName(request.token, buttonTag))
+  else if (HasName(request.token, kButtonTag))
     did_block_script |= FilterButtonToken(request);
-  else if (HasName(request.token, linkTag))
+  else if (HasName(request.token, kLinkTag))
     did_block_script |= FilterLinkToken(request);
 
   return did_block_script;
@@ -552,7 +552,7 @@
 void XSSAuditor::FilterEndToken(const FilterTokenRequest& request) {
   DCHECK(script_tag_nesting_level_);
   state_ = kFilteringTokens;
-  if (HasName(request.token, scriptTag)) {
+  if (HasName(request.token, kScriptTag)) {
     script_tag_nesting_level_--;
     DCHECK(request.should_allow_cdata || !script_tag_nesting_level_);
   }
@@ -582,14 +582,14 @@
 
 bool XSSAuditor::FilterScriptToken(const FilterTokenRequest& request) {
   DCHECK_EQ(request.token.GetType(), HTMLToken::kStartTag);
-  DCHECK(HasName(request.token, scriptTag));
+  DCHECK(HasName(request.token, kScriptTag));
 
   bool did_block_script = false;
   script_tag_found_in_request_ =
       IsContainedInRequest(CanonicalizedSnippetForTagName(request));
   if (script_tag_found_in_request_) {
     did_block_script |= EraseAttributeIfInjected(
-        request, srcAttr, BlankURL().GetString(), kSrcLikeAttributeTruncation);
+        request, kSrcAttr, BlankURL().GetString(), kSrcLikeAttributeTruncation);
     did_block_script |= EraseAttributeIfInjected(request, svg_names::kHrefAttr,
                                                  BlankURL().GetString(),
                                                  kSrcLikeAttributeTruncation);
@@ -602,24 +602,25 @@
 
 bool XSSAuditor::FilterObjectToken(const FilterTokenRequest& request) {
   DCHECK_EQ(request.token.GetType(), HTMLToken::kStartTag);
-  DCHECK(HasName(request.token, objectTag));
+  DCHECK(HasName(request.token, kObjectTag));
 
   bool did_block_script = false;
   if (IsContainedInRequest(CanonicalizedSnippetForTagName(request))) {
-    did_block_script |= EraseAttributeIfInjected(
-        request, dataAttr, BlankURL().GetString(), kSrcLikeAttributeTruncation);
-    did_block_script |= EraseAttributeIfInjected(request, typeAttr);
-    did_block_script |= EraseAttributeIfInjected(request, classidAttr);
+    did_block_script |=
+        EraseAttributeIfInjected(request, kDataAttr, BlankURL().GetString(),
+                                 kSrcLikeAttributeTruncation);
+    did_block_script |= EraseAttributeIfInjected(request, kTypeAttr);
+    did_block_script |= EraseAttributeIfInjected(request, kClassidAttr);
   }
   return did_block_script;
 }
 
 bool XSSAuditor::FilterParamToken(const FilterTokenRequest& request) {
   DCHECK_EQ(request.token.GetType(), HTMLToken::kStartTag);
-  DCHECK(HasName(request.token, paramTag));
+  DCHECK(HasName(request.token, kParamTag));
 
   wtf_size_t index_of_name_attribute;
-  if (!FindAttributeWithName(request.token, nameAttr, index_of_name_attribute))
+  if (!FindAttributeWithName(request.token, kNameAttr, index_of_name_attribute))
     return false;
 
   const HTMLToken::Attribute& name_attribute =
@@ -627,33 +628,34 @@
   if (!HTMLParamElement::IsURLParameter(name_attribute.Value()))
     return false;
 
-  return EraseAttributeIfInjected(request, valueAttr, BlankURL().GetString(),
+  return EraseAttributeIfInjected(request, kValueAttr, BlankURL().GetString(),
                                   kSrcLikeAttributeTruncation);
 }
 
 bool XSSAuditor::FilterEmbedToken(const FilterTokenRequest& request) {
   DCHECK_EQ(request.token.GetType(), HTMLToken::kStartTag);
-  DCHECK(HasName(request.token, embedTag));
+  DCHECK(HasName(request.token, kEmbedTag));
 
   bool did_block_script = false;
   if (IsContainedInRequest(CanonicalizedSnippetForTagName(request))) {
-    did_block_script |= EraseAttributeIfInjected(request, codeAttr, String(),
+    did_block_script |= EraseAttributeIfInjected(request, kCodeAttr, String(),
                                                  kSrcLikeAttributeTruncation);
     did_block_script |= EraseAttributeIfInjected(
-        request, srcAttr, BlankURL().GetString(), kSrcLikeAttributeTruncation);
-    did_block_script |= EraseAttributeIfInjected(request, typeAttr);
+        request, kSrcAttr, BlankURL().GetString(), kSrcLikeAttributeTruncation);
+    did_block_script |= EraseAttributeIfInjected(request, kTypeAttr);
   }
   return did_block_script;
 }
 
 bool XSSAuditor::FilterFrameToken(const FilterTokenRequest& request) {
   DCHECK_EQ(request.token.GetType(), HTMLToken::kStartTag);
-  DCHECK(HasName(request.token, iframeTag) || HasName(request.token, frameTag));
+  DCHECK(HasName(request.token, kIFrameTag) ||
+         HasName(request.token, kFrameTag));
 
   bool did_block_script = EraseAttributeIfInjected(
-      request, srcdocAttr, String(), kScriptLikeAttributeTruncation);
+      request, kSrcdocAttr, String(), kScriptLikeAttributeTruncation);
   if (IsContainedInRequest(CanonicalizedSnippetForTagName(request)))
-    did_block_script |= EraseAttributeIfInjected(request, srcAttr, String(),
+    did_block_script |= EraseAttributeIfInjected(request, kSrcAttr, String(),
                                                  kSrcLikeAttributeTruncation);
 
   return did_block_script;
@@ -661,49 +663,51 @@
 
 bool XSSAuditor::FilterMetaToken(const FilterTokenRequest& request) {
   DCHECK_EQ(request.token.GetType(), HTMLToken::kStartTag);
-  DCHECK(HasName(request.token, metaTag));
+  DCHECK(HasName(request.token, kMetaTag));
 
-  return EraseAttributeIfInjected(request, http_equivAttr);
+  return EraseAttributeIfInjected(request, kHttpEquivAttr);
 }
 
 bool XSSAuditor::FilterBaseToken(const FilterTokenRequest& request) {
   DCHECK_EQ(request.token.GetType(), HTMLToken::kStartTag);
-  DCHECK(HasName(request.token, baseTag));
+  DCHECK(HasName(request.token, kBaseTag));
 
-  return EraseAttributeIfInjected(request, hrefAttr, String(),
+  return EraseAttributeIfInjected(request, kHrefAttr, String(),
                                   kSrcLikeAttributeTruncation);
 }
 
 bool XSSAuditor::FilterFormToken(const FilterTokenRequest& request) {
   DCHECK_EQ(request.token.GetType(), HTMLToken::kStartTag);
-  DCHECK(HasName(request.token, formTag));
+  DCHECK(HasName(request.token, kFormTag));
 
-  return EraseAttributeIfInjected(request, actionAttr, kURLWithUniqueOrigin,
+  return EraseAttributeIfInjected(request, kActionAttr, kURLWithUniqueOrigin,
                                   kSrcLikeAttributeTruncation);
 }
 
 bool XSSAuditor::FilterInputToken(const FilterTokenRequest& request) {
   DCHECK_EQ(request.token.GetType(), HTMLToken::kStartTag);
-  DCHECK(HasName(request.token, inputTag));
+  DCHECK(HasName(request.token, kInputTag));
 
-  return EraseAttributeIfInjected(request, formactionAttr, kURLWithUniqueOrigin,
+  return EraseAttributeIfInjected(request, kFormactionAttr,
+                                  kURLWithUniqueOrigin,
                                   kSrcLikeAttributeTruncation);
 }
 
 bool XSSAuditor::FilterButtonToken(const FilterTokenRequest& request) {
   DCHECK_EQ(request.token.GetType(), HTMLToken::kStartTag);
-  DCHECK(HasName(request.token, buttonTag));
+  DCHECK(HasName(request.token, kButtonTag));
 
-  return EraseAttributeIfInjected(request, formactionAttr, kURLWithUniqueOrigin,
+  return EraseAttributeIfInjected(request, kFormactionAttr,
+                                  kURLWithUniqueOrigin,
                                   kSrcLikeAttributeTruncation);
 }
 
 bool XSSAuditor::FilterLinkToken(const FilterTokenRequest& request) {
   DCHECK_EQ(request.token.GetType(), HTMLToken::kStartTag);
-  DCHECK(HasName(request.token, linkTag));
+  DCHECK(HasName(request.token, kLinkTag));
 
   wtf_size_t index_of_attribute = 0;
-  if (!FindAttributeWithName(request.token, relAttr, index_of_attribute))
+  if (!FindAttributeWithName(request.token, kRelAttr, index_of_attribute))
     return false;
 
   const HTMLToken::Attribute& attribute =
@@ -712,7 +716,7 @@
   if (!parsed_attribute.IsImport())
     return false;
 
-  return EraseAttributeIfInjected(request, hrefAttr, kURLWithUniqueOrigin,
+  return EraseAttributeIfInjected(request, kHrefAttr, kURLWithUniqueOrigin,
                                   kSrcLikeAttributeTruncation,
                                   kAllowSameOriginHref);
 }
@@ -772,12 +776,12 @@
           Canonicalize(SnippetFromAttribute(request, attribute), treatment)))
     return false;
 
-  if (ThreadSafeMatch(attribute_name, srcAttr) ||
+  if (ThreadSafeMatch(attribute_name, kSrcAttr) ||
       (restriction == kAllowSameOriginHref &&
-       ThreadSafeMatch(attribute_name, hrefAttr))) {
+       ThreadSafeMatch(attribute_name, kHrefAttr))) {
     if (IsLikelySafeResource(attribute.Value()))
       return false;
-  } else if (ThreadSafeMatch(attribute_name, http_equivAttr)) {
+  } else if (ThreadSafeMatch(attribute_name, kHttpEquivAttr)) {
     if (!IsDangerousHTTPEquiv(attribute.Value()))
       return false;
   }
diff --git a/third_party/blink/renderer/core/html/plugin_document.cc b/third_party/blink/renderer/core/html/plugin_document.cc
index 9c5746d..3a7aa2b 100644
--- a/third_party/blink/renderer/core/html/plugin_document.cc
+++ b/third_party/blink/renderer/core/html/plugin_document.cc
@@ -47,7 +47,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 class PluginDocument::BeforeUnloadEventListener : public EventListener {
  public:
@@ -136,7 +136,7 @@
     return;  // runScriptsAtDocumentElementAvailable can detach the frame.
 
   HTMLBodyElement* body = HTMLBodyElement::Create(*GetDocument());
-  body->setAttribute(styleAttr,
+  body->setAttribute(kStyleAttr,
                      "height: 100%; width: 100%; overflow: hidden; margin: 0");
   body->SetInlineStyleProperty(
       CSSPropertyBackgroundColor,
@@ -149,13 +149,13 @@
   }
 
   embed_element_ = HTMLEmbedElement::Create(*GetDocument());
-  embed_element_->setAttribute(widthAttr, "100%");
-  embed_element_->setAttribute(heightAttr, "100%");
-  embed_element_->setAttribute(nameAttr, "plugin");
-  embed_element_->setAttribute(idAttr, "plugin");
-  embed_element_->setAttribute(srcAttr,
+  embed_element_->setAttribute(kWidthAttr, "100%");
+  embed_element_->setAttribute(kHeightAttr, "100%");
+  embed_element_->setAttribute(kNameAttr, "plugin");
+  embed_element_->setAttribute(kIdAttr, "plugin");
+  embed_element_->setAttribute(kSrcAttr,
                                AtomicString(GetDocument()->Url().GetString()));
-  embed_element_->setAttribute(typeAttr, GetDocument()->Loader()->MimeType());
+  embed_element_->setAttribute(kTypeAttr, GetDocument()->Loader()->MimeType());
   body->AppendChild(embed_element_);
   if (IsStopped()) {
     // Possibly detached by a mutation event listener installed in
diff --git a/third_party/blink/renderer/core/html/portal/html_portal_element.cc b/third_party/blink/renderer/core/html/portal/html_portal_element.cc
index 47dc3b9..0604735 100644
--- a/third_party/blink/renderer/core/html/portal/html_portal_element.cc
+++ b/third_party/blink/renderer/core/html/portal/html_portal_element.cc
@@ -22,18 +22,18 @@
 namespace blink {
 
 HTMLPortalElement::HTMLPortalElement(Document& document)
-    : HTMLFrameOwnerElement(HTMLNames::portalTag, document) {}
+    : HTMLFrameOwnerElement(html_names::kPortalTag, document) {}
 
 HTMLPortalElement::~HTMLPortalElement() {}
 
 HTMLElement* HTMLPortalElement::Create(Document& document) {
   if (RuntimeEnabledFeatures::PortalsEnabled())
     return new HTMLPortalElement(document);
-  return HTMLUnknownElement::Create(HTMLNames::portalTag, document);
+  return HTMLUnknownElement::Create(html_names::kPortalTag, document);
 }
 
 void HTMLPortalElement::Navigate() {
-  KURL url = GetNonEmptyURLAttribute(HTMLNames::srcAttr);
+  KURL url = GetNonEmptyURLAttribute(html_names::kSrcAttr);
   if (!url.IsEmpty() && portal_ptr_) {
     portal_ptr_->Navigate(url);
   }
@@ -104,7 +104,7 @@
 }
 
 bool HTMLPortalElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName() == HTMLNames::srcAttr ||
+  return attribute.GetName() == html_names::kSrcAttr ||
          HTMLFrameOwnerElement::IsURLAttribute(attribute);
 }
 
@@ -112,7 +112,7 @@
     const AttributeModificationParams& params) {
   HTMLFrameOwnerElement::ParseAttribute(params);
 
-  if (params.name == HTMLNames::srcAttr)
+  if (params.name == html_names::kSrcAttr)
     Navigate();
 }
 
diff --git a/third_party/blink/renderer/core/html/rel_list.cc b/third_party/blink/renderer/core/html/rel_list.cc
index 4bcce39..2401cf8 100644
--- a/third_party/blink/renderer/core/html/rel_list.cc
+++ b/third_party/blink/renderer/core/html/rel_list.cc
@@ -15,7 +15,7 @@
 namespace blink {
 
 RelList::RelList(Element* element)
-    : DOMTokenList(*element, HTMLNames::relAttr) {}
+    : DOMTokenList(*element, html_names::kRelAttr) {}
 
 static HashSet<AtomicString>& SupportedTokensLink() {
   DEFINE_STATIC_LOCAL(
@@ -41,14 +41,14 @@
 bool RelList::ValidateTokenValue(const AtomicString& token_value,
                                  ExceptionState&) const {
   //  https://html.spec.whatwg.org/multipage/links.html#linkTypes
-  if (GetElement().HasTagName(HTMLNames::linkTag)) {
+  if (GetElement().HasTagName(html_names::kLinkTag)) {
     if (SupportedTokensLink().Contains(token_value) ||
         (RuntimeEnabledFeatures::ModulePreloadEnabled() &&
          token_value == "modulepreload")) {
       return true;
     }
-  } else if ((GetElement().HasTagName(HTMLNames::aTag) ||
-              GetElement().HasTagName(HTMLNames::areaTag)) &&
+  } else if ((GetElement().HasTagName(html_names::kATag) ||
+              GetElement().HasTagName(html_names::kAreaTag)) &&
              SupportedTokensAnchorAndArea().Contains(token_value)) {
     return true;
   }
diff --git a/third_party/blink/renderer/core/html/shadow/details_marker_control.cc b/third_party/blink/renderer/core/html/shadow/details_marker_control.cc
index b60bd08..a57b5ce 100644
--- a/third_party/blink/renderer/core/html/shadow/details_marker_control.cc
+++ b/third_party/blink/renderer/core/html/shadow/details_marker_control.cc
@@ -31,13 +31,10 @@
 #include "third_party/blink/renderer/core/html/shadow/details_marker_control.h"
 
 #include "third_party/blink/renderer/core/html/html_summary_element.h"
-#include "third_party/blink/renderer/core/html_names.h"
 #include "third_party/blink/renderer/core/layout/layout_details_marker.h"
 
 namespace blink {
 
-using namespace HTMLNames;
-
 DetailsMarkerControl::DetailsMarkerControl(Document& document)
     : HTMLDivElement(document) {}
 
diff --git a/third_party/blink/renderer/core/html/shadow/progress_shadow_element.cc b/third_party/blink/renderer/core/html/shadow/progress_shadow_element.cc
index a59576cf..0532db1 100644
--- a/third_party/blink/renderer/core/html/shadow/progress_shadow_element.cc
+++ b/third_party/blink/renderer/core/html/shadow/progress_shadow_element.cc
@@ -32,12 +32,9 @@
 
 #include "third_party/blink/renderer/core/dom/node_computed_style.h"
 #include "third_party/blink/renderer/core/html/html_progress_element.h"
-#include "third_party/blink/renderer/core/html_names.h"
 
 namespace blink {
 
-using namespace HTMLNames;
-
 ProgressShadowElement::ProgressShadowElement(Document& document)
     : HTMLDivElement(document) {}
 
diff --git a/third_party/blink/renderer/core/html/track/html_track_element.cc b/third_party/blink/renderer/core/html/track/html_track_element.cc
index ba60beff..d85a147 100644
--- a/third_party/blink/renderer/core/html/track/html_track_element.cc
+++ b/third_party/blink/renderer/core/html/track/html_track_element.cc
@@ -38,7 +38,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 static String UrlForLoggingTrack(const KURL& url) {
   static const unsigned kMaximumURLLengthForLogging = 128;
@@ -49,7 +49,7 @@
 }
 
 inline HTMLTrackElement::HTMLTrackElement(Document& document)
-    : HTMLElement(trackTag, document),
+    : HTMLElement(kTrackTag, document),
       load_timer_(document.GetTaskRunner(TaskType::kNetworking),
                   this,
                   &HTMLTrackElement::LoadTimerFired) {
@@ -89,13 +89,13 @@
 void HTMLTrackElement::ParseAttribute(
     const AttributeModificationParams& params) {
   const QualifiedName& name = params.name;
-  if (name == srcAttr) {
+  if (name == kSrcAttr) {
     ScheduleLoad();
 
     // 4.8.10.12.3 Sourcing out-of-band text tracks
     // As the kind, label, and srclang attributes are set, changed, or removed,
     // the text track must update accordingly...
-  } else if (name == kindAttr) {
+  } else if (name == kKindAttr) {
     AtomicString lower_case_value = params.new_value.LowerASCII();
     // 'missing value default' ("subtitles")
     if (lower_case_value.IsNull())
@@ -105,11 +105,11 @@
       lower_case_value = TextTrack::MetadataKeyword();
 
     track()->SetKind(lower_case_value);
-  } else if (name == labelAttr) {
+  } else if (name == kLabelAttr) {
     track()->SetLabel(params.new_value);
-  } else if (name == srclangAttr) {
+  } else if (name == kSrclangAttr) {
     track()->SetLanguage(params.new_value);
-  } else if (name == idAttr) {
+  } else if (name == kIdAttr) {
     track()->SetId(params.new_value);
   }
 
@@ -121,7 +121,7 @@
 }
 
 void HTMLTrackElement::setKind(const AtomicString& kind) {
-  setAttribute(kindAttr, kind);
+  setAttribute(kKindAttr, kind);
 }
 
 LoadableTextTrack* HTMLTrackElement::EnsureTrack() {
@@ -137,7 +137,7 @@
 }
 
 bool HTMLTrackElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName() == srcAttr ||
+  return attribute.GetName() == kSrcAttr ||
          HTMLElement::IsURLAttribute(attribute);
 }
 
@@ -175,7 +175,7 @@
   DVLOG(TRACK_LOG_LEVEL) << "loadTimerFired";
 
   // 7. [X] Let URL be the track URL of the track element.
-  KURL url = GetNonEmptyURLAttribute(srcAttr);
+  KURL url = GetNonEmptyURLAttribute(kSrcAttr);
 
   // Whenever a track element has its src attribute set, changed,
   // or removed, the user agent must immediately empty the
@@ -327,7 +327,7 @@
 
 const AtomicString& HTMLTrackElement::MediaElementCrossOriginAttribute() const {
   if (HTMLMediaElement* parent = MediaElement())
-    return parent->FastGetAttribute(HTMLNames::crossoriginAttr);
+    return parent->FastGetAttribute(html_names::kCrossoriginAttr);
 
   return g_null_atom;
 }
diff --git a/third_party/blink/renderer/core/html/track/loadable_text_track.cc b/third_party/blink/renderer/core/html/track/loadable_text_track.cc
index 5cc4303..adc5bf3e8 100644
--- a/third_party/blink/renderer/core/html/track/loadable_text_track.cc
+++ b/third_party/blink/renderer/core/html/track/loadable_text_track.cc
@@ -43,7 +43,7 @@
 LoadableTextTrack::~LoadableTextTrack() = default;
 
 bool LoadableTextTrack::IsDefault() const {
-  return track_element_->FastHasAttribute(HTMLNames::defaultAttr);
+  return track_element_->FastHasAttribute(html_names::kDefaultAttr);
 }
 
 void LoadableTextTrack::setMode(const AtomicString& mode) {
diff --git a/third_party/blink/renderer/core/html/track/vtt/vtt_element.cc b/third_party/blink/renderer/core/html/track/vtt/vtt_element.cc
index a8e21ff1..7ce52ef 100644
--- a/third_party/blink/renderer/core/html/track/vtt/vtt_element.cc
+++ b/third_party/blink/renderer/core/html/track/vtt/vtt_element.cc
@@ -88,39 +88,39 @@
     case kVTTNodeTypeClass:
     case kVTTNodeTypeLanguage:
     case kVTTNodeTypeVoice:
-      html_element = document.CreateRawElement(HTMLNames::spanTag,
+      html_element = document.CreateRawElement(html_names::kSpanTag,
                                                CreateElementFlags::ByParser());
-      html_element->setAttribute(HTMLNames::titleAttr,
+      html_element->setAttribute(html_names::kTitleAttr,
                                  getAttribute(VoiceAttributeName()));
-      html_element->setAttribute(HTMLNames::langAttr,
+      html_element->setAttribute(html_names::kLangAttr,
                                  getAttribute(LangAttributeName()));
       break;
     case kVTTNodeTypeItalic:
-      html_element = document.CreateRawElement(HTMLNames::iTag,
+      html_element = document.CreateRawElement(html_names::kITag,
                                                CreateElementFlags::ByParser());
       break;
     case kVTTNodeTypeBold:
-      html_element = document.CreateRawElement(HTMLNames::bTag,
+      html_element = document.CreateRawElement(html_names::kBTag,
                                                CreateElementFlags::ByParser());
       break;
     case kVTTNodeTypeUnderline:
-      html_element = document.CreateRawElement(HTMLNames::uTag,
+      html_element = document.CreateRawElement(html_names::kUTag,
                                                CreateElementFlags::ByParser());
       break;
     case kVTTNodeTypeRuby:
-      html_element = document.CreateRawElement(HTMLNames::rubyTag,
+      html_element = document.CreateRawElement(html_names::kRubyTag,
                                                CreateElementFlags::ByParser());
       break;
     case kVTTNodeTypeRubyText:
-      html_element = document.CreateRawElement(HTMLNames::rtTag,
+      html_element = document.CreateRawElement(html_names::kRtTag,
                                                CreateElementFlags::ByParser());
       break;
     default:
       NOTREACHED();
   }
 
-  html_element->setAttribute(HTMLNames::classAttr,
-                             getAttribute(HTMLNames::classAttr));
+  html_element->setAttribute(html_names::kClassAttr,
+                             getAttribute(html_names::kClassAttr));
   return ToHTMLElement(html_element);
 }
 
diff --git a/third_party/blink/renderer/core/html/track/vtt/vtt_parser.cc b/third_party/blink/renderer/core/html/track/vtt/vtt_parser.cc
index 4a36c646..42c9381 100644
--- a/third_party/blink/renderer/core/html/track/vtt/vtt_parser.cc
+++ b/third_party/blink/renderer/core/html/track/vtt/vtt_parser.cc
@@ -45,7 +45,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 const unsigned kFileIdentifierLength = 6;
 const unsigned kRegionIdentifierLength = 6;
@@ -542,7 +542,7 @@
 
       VTTElement* child = VTTElement::Create(node_type, &document);
       if (!token_.Classes().IsEmpty())
-        child->setAttribute(classAttr, token_.Classes());
+        child->setAttribute(kClassAttr, token_.Classes());
 
       if (node_type == kVTTNodeTypeVoice) {
         child->setAttribute(VTTElement::VoiceAttributeName(),
diff --git a/third_party/blink/renderer/core/html/track/vtt/vtt_parser.h b/third_party/blink/renderer/core/html/track/vtt/vtt_parser.h
index e3ef84fd..79450cf 100644
--- a/third_party/blink/renderer/core/html/track/vtt/vtt_parser.h
+++ b/third_party/blink/renderer/core/html/track/vtt/vtt_parser.h
@@ -76,9 +76,9 @@
   ~VTTParser() = default;
 
   static inline bool IsRecognizedTag(const AtomicString& tag_name) {
-    return tag_name == HTMLNames::iTag || tag_name == HTMLNames::bTag ||
-           tag_name == HTMLNames::uTag || tag_name == HTMLNames::rubyTag ||
-           tag_name == HTMLNames::rtTag;
+    return tag_name == html_names::kITag || tag_name == html_names::kBTag ||
+           tag_name == html_names::kUTag || tag_name == html_names::kRubyTag ||
+           tag_name == html_names::kRtTag;
   }
   static inline bool IsASpace(UChar c) {
     // WebVTT space characters are U+0020 SPACE, U+0009 CHARACTER
diff --git a/third_party/blink/renderer/core/input/event_handler.cc b/third_party/blink/renderer/core/input/event_handler.cc
index 7209318..b3418b9d 100644
--- a/third_party/blink/renderer/core/input/event_handler.cc
+++ b/third_party/blink/renderer/core/input/event_handler.cc
@@ -65,7 +65,6 @@
 #include "third_party/blink/renderer/core/html/html_dialog_element.h"
 #include "third_party/blink/renderer/core/html/html_frame_element_base.h"
 #include "third_party/blink/renderer/core/html/html_frame_set_element.h"
-#include "third_party/blink/renderer/core/html_names.h"
 #include "third_party/blink/renderer/core/input/event_handling_util.h"
 #include "third_party/blink/renderer/core/input/input_device_capabilities.h"
 #include "third_party/blink/renderer/core/input/touch_action_util.h"
@@ -123,8 +122,6 @@
 
 }  // namespace
 
-using namespace HTMLNames;
-
 // The amount of time to wait for a cursor update on style and layout changes
 // Set to 50Hz, no need to be faster than common screen refresh rate
 static constexpr TimeDelta kCursorUpdateInterval =
@@ -336,7 +333,7 @@
 
 static bool IsSubmitImage(Node* node) {
   return IsHTMLInputElement(node) &&
-         ToHTMLInputElement(node)->type() == InputTypeNames::image;
+         ToHTMLInputElement(node)->type() == input_type_names::kImage;
 }
 
 bool EventHandler::UseHandCursor(Node* node, bool is_over_link) {
diff --git a/third_party/blink/renderer/core/input/event_handler_test.cc b/third_party/blink/renderer/core/input/event_handler_test.cc
index 2e76026..817172d 100644
--- a/third_party/blink/renderer/core/input/event_handler_test.cc
+++ b/third_party/blink/renderer/core/input/event_handler_test.cc
@@ -596,7 +596,7 @@
       "<style>*:hover { color: red; }</style>"
       "<div>foo</div>");
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.addEventListener('contextmenu', event => "
       "event.preventDefault());");
@@ -1026,7 +1026,7 @@
 TEST_F(EventHandlerNavigationTest, MouseButtonsDontNavigate) {
   SetHtmlInnerHTML("<div>");
   GetDocument().GetSettings()->SetScriptEnabled(true);
-  Element* script = GetDocument().CreateRawElement(HTMLNames::scriptTag);
+  Element* script = GetDocument().CreateRawElement(html_names::kScriptTag);
   script->SetInnerHTMLFromString(
       "document.addEventListener('mouseup', event => "
       "event.preventDefault());");
diff --git a/third_party/blink/renderer/core/input/scroll_manager.cc b/third_party/blink/renderer/core/input/scroll_manager.cc
index d4798092..ec6763f 100644
--- a/third_party/blink/renderer/core/input/scroll_manager.cc
+++ b/third_party/blink/renderer/core/input/scroll_manager.cc
@@ -87,14 +87,14 @@
 void ScrollManager::Trace(blink::Visitor* visitor) {
   visitor->Trace(frame_);
   visitor->Trace(scroll_gesture_handling_node_);
-  visitor->Trace(previous_gesture_scrolled_node_);
+  visitor->Trace(previous_gesture_scrolled_element_);
   visitor->Trace(scrollbar_handling_scroll_gesture_);
   visitor->Trace(resize_scrollable_area_);
 }
 
 void ScrollManager::ClearGestureScrollState() {
   scroll_gesture_handling_node_ = nullptr;
-  previous_gesture_scrolled_node_ = nullptr;
+  previous_gesture_scrolled_element_ = nullptr;
   delta_consumed_for_scroll_sequence_ = false;
   did_scroll_x_for_scroll_gesture_ = false;
   did_scroll_y_for_scroll_gesture_ = false;
@@ -128,8 +128,9 @@
   return nullptr;
 }
 
-static bool CanPropagate(const ScrollState& scroll_state, const Node& node) {
-  ScrollableArea* scrollable_area = node.GetLayoutBox()->GetScrollableArea();
+static bool CanPropagate(const ScrollState& scroll_state,
+                         const Element& element) {
+  ScrollableArea* scrollable_area = element.GetLayoutBox()->GetScrollableArea();
   if (!scrollable_area)
     return true;
 
@@ -138,10 +139,10 @@
     return true;
 
   return (scroll_state.deltaXHint() == 0 ||
-          node.GetComputedStyle()->OverscrollBehaviorX() ==
+          element.GetComputedStyle()->OverscrollBehaviorX() ==
               EOverscrollBehavior::kAuto) &&
          (scroll_state.deltaYHint() == 0 ||
-          node.GetComputedStyle()->OverscrollBehaviorY() ==
+          element.GetComputedStyle()->OverscrollBehaviorY() ==
               EOverscrollBehavior::kAuto);
 }
 
@@ -153,27 +154,38 @@
 
   DCHECK(start_node.GetLayoutObject());
   LayoutBox* cur_box = start_node.GetLayoutObject()->EnclosingBox();
+  Element* document_element = frame_->GetDocument()->documentElement();
 
   // Scrolling propagates along the containing block chain and ends at the
-  // RootScroller node. The RootScroller node will have a custom applyScroll
-  // callback that performs scrolling as well as associated "root" actions like
-  // browser control movement and overscroll glow.
+  // RootScroller element. The RootScroller element will have a custom
+  // applyScroll callback that scrolls the frame or element.
   while (cur_box) {
     Node* cur_node = cur_box->GetNode();
+    Element* cur_element = nullptr;
 
-    if (cur_node) {
-      if (CanScroll(scroll_state, *cur_node))
-        scroll_chain.push_front(DOMNodeIds::IdForNode(cur_node));
+    // FIXME: this should reject more elements, as part of crbug.com/410974.
+    if (cur_node && cur_node->IsElementNode()) {
+      cur_element = ToElement(cur_node);
+    } else if (cur_node && cur_node->IsDocumentNode()) {
+      // In normal circumastances, the documentElement will be the root
+      // scroller but the documentElement itself isn't a containing block,
+      // that'll be the document node rather than the element.
+      cur_element = document_element;
+    }
 
-      if (cur_node->IsEffectiveRootScroller())
+    if (cur_element) {
+      if (CanScroll(scroll_state, *cur_element))
+        scroll_chain.push_front(DOMNodeIds::IdForNode(cur_element));
+      if (IsViewportScrollingElement(*cur_element) ||
+          cur_element == document_element)
         break;
 
-      if (!CanPropagate(scroll_state, *cur_node)) {
+      if (!CanPropagate(scroll_state, *cur_element)) {
         // We should add the first node with non-auto overscroll-behavior to
         // the scroll chain regardlessly, as it's the only node we can latch to.
         if (scroll_chain.empty() ||
-            scroll_chain.front() != DOMNodeIds::IdForNode(cur_node)) {
-          scroll_chain.push_front(DOMNodeIds::IdForNode(cur_node));
+            scroll_chain.front() != DOMNodeIds::IdForNode(cur_element)) {
+          scroll_chain.push_front(DOMNodeIds::IdForNode(cur_element));
         }
         break;
       }
@@ -184,18 +196,25 @@
 }
 
 bool ScrollManager::CanScroll(const ScrollState& scroll_state,
-                              const Node& current_node) {
-  if (!current_node.GetLayoutBox())
-    return false;
+                              const Element& current_element) {
+  ScrollableArea* scrollable_area = nullptr;
+  if (IsViewportScrollingElement(current_element) ||
+      current_element == *(frame_->GetDocument()->documentElement())) {
+    if (!current_element.GetLayoutObject())
+      return false;
 
-  // We need to always add the root scroller in the main frame even if the
-  // viewport isn't scrollable since we can always pinch-zoom and scroll as
-  // well as for overscroll effects.
-  if (current_node.IsEffectiveRootScroller() && frame_->IsMainFrame())
-    return true;
+    if (frame_->IsMainFrame())
+      return true;
 
-  ScrollableArea* scrollable_area =
-      current_node.GetLayoutBox()->GetScrollableArea();
+    // For subframes, the viewport is added to the scroll chain only if it can
+    // actually consume some delta hints. The main frame always gets added
+    // since it produces overscroll effects.
+    scrollable_area =
+        frame_->View() ? frame_->View()->GetScrollableArea() : nullptr;
+  }
+
+  if (!scrollable_area && current_element.GetLayoutBox())
+    scrollable_area = current_element.GetLayoutBox()->GetScrollableArea();
 
   if (!scrollable_area)
     return false;
@@ -270,6 +289,8 @@
       DCHECK(main_frame.IsMainFrame());
 
       scrollable_area = main_frame.View()->GetScrollableArea();
+    } else if (node == document.documentElement()) {
+      scrollable_area = document.GetLayoutView()->GetScrollableArea();
     } else {
       scrollable_area = box->GetScrollableArea();
     }
@@ -407,7 +428,7 @@
         scroll_gesture_handling_node_->ParentOrShadowHostNode();
 
   if (!scroll_gesture_handling_node_)
-    scroll_gesture_handling_node_ = frame_->GetDocument();
+    scroll_gesture_handling_node_ = frame_->GetDocument()->documentElement();
 
   if (!scroll_gesture_handling_node_ ||
       !scroll_gesture_handling_node_->GetLayoutObject()) {
@@ -470,7 +491,7 @@
   if (!node || !node->GetLayoutObject()) {
     TRACE_EVENT_INSTANT0("input", "Lost scroll_gesture_handling_node",
                          TRACE_EVENT_SCOPE_THREAD);
-    if (previous_gesture_scrolled_node_) {
+    if (previous_gesture_scrolled_element_) {
       // When the scroll_gesture_handling_node_ gets deleted in the middle of
       // scrolling call HandleGestureScrollEvent to start scrolling a new node
       // if possible.
@@ -545,17 +566,18 @@
   scroll_state_data->delta_consumed_for_scroll_sequence =
       delta_consumed_for_scroll_sequence_;
   ScrollState* scroll_state = ScrollState::Create(std::move(scroll_state_data));
-  if (previous_gesture_scrolled_node_) {
+  if (previous_gesture_scrolled_element_) {
     // The ScrollState needs to know what the current
     // native scrolling element is, so that for an
     // inertial scroll that shouldn't propagate, only the
     // currently scrolling element responds.
     scroll_state->SetCurrentNativeScrollingNode(
-        previous_gesture_scrolled_node_);
+        previous_gesture_scrolled_element_);
   }
 
   CustomizedScroll(*scroll_state);
-  previous_gesture_scrolled_node_ = scroll_state->CurrentNativeScrollingNode();
+  previous_gesture_scrolled_element_ =
+      ToElement(scroll_state->CurrentNativeScrollingNode());
   delta_consumed_for_scroll_sequence_ =
       scroll_state->DeltaConsumedForScrollSequence();
 
@@ -565,11 +587,9 @@
   did_scroll_x_for_scroll_gesture_ |= did_scroll_x;
   did_scroll_y_for_scroll_gesture_ |= did_scroll_y;
 
-  // TODO(bokan): This looks like it resets overscroll if any *effective* root
-  // scroller is scrolled. This should probably be if the *global* root
-  // scroller is scrolled.
-  if (!previous_gesture_scrolled_node_ ||
-      !previous_gesture_scrolled_node_->IsEffectiveRootScroller())
+  if ((!previous_gesture_scrolled_element_ ||
+       !IsViewportScrollingElement(*previous_gesture_scrolled_element_)) &&
+      GetPage())
     GetPage()->GetOverscrollController().ResetAccumulated(did_scroll_x,
                                                           did_scroll_y);
 
@@ -612,13 +632,16 @@
 }
 
 LayoutBox* ScrollManager::LayoutBoxForSnapping() const {
-  if (!previous_gesture_scrolled_node_)
+  if (!previous_gesture_scrolled_element_)
     return nullptr;
-  return previous_gesture_scrolled_node_->GetLayoutBox();
+  Element* document_element = frame_->GetDocument()->documentElement();
+  return previous_gesture_scrolled_element_ == document_element
+             ? frame_->GetDocument()->GetLayoutView()
+             : previous_gesture_scrolled_element_->GetLayoutBox();
 }
 
 void ScrollManager::SnapAtGestureScrollEnd() {
-  if (!previous_gesture_scrolled_node_ ||
+  if (!previous_gesture_scrolled_element_ ||
       (!did_scroll_x_for_scroll_gesture_ && !did_scroll_y_for_scroll_gesture_))
     return;
   SnapCoordinator* snap_coordinator =
@@ -677,7 +700,8 @@
   scroll_state_data->delta_consumed_for_scroll_sequence =
       delta_consumed_for_scroll_sequence_;
   ScrollState* scroll_state = ScrollState::Create(std::move(scroll_state_data));
-  scroll_state->SetCurrentNativeScrollingNode(previous_gesture_scrolled_node_);
+  scroll_state->SetCurrentNativeScrollingNode(
+      previous_gesture_scrolled_element_);
 
   CustomizedScroll(*scroll_state);
   FloatPoint end_position = scrollable_area->ScrollPosition();
@@ -738,6 +762,16 @@
       .HandleGestureScrollEvent(gesture_event);
 }
 
+bool ScrollManager::IsViewportScrollingElement(const Element& element) const {
+  // The root scroller is the one Element on the page designated to perform
+  // "viewport actions" like browser controls movement and overscroll glow.
+  if (!frame_->GetDocument())
+    return false;
+
+  return frame_->GetDocument()->GetRootScrollerController().ScrollsViewport(
+      element);
+}
+
 WebInputEventResult ScrollManager::HandleGestureScrollEvent(
     const WebGestureEvent& gesture_event) {
   if (!frame_->View())
@@ -773,7 +807,7 @@
     last_gesture_scroll_over_embedded_content_view_ =
         result.IsOverEmbeddedContentView();
     scroll_gesture_handling_node_ = event_target;
-    previous_gesture_scrolled_node_ = nullptr;
+    previous_gesture_scrolled_element_ = nullptr;
     delta_consumed_for_scroll_sequence_ = false;
     did_scroll_x_for_scroll_gesture_ = false;
     did_scroll_y_for_scroll_gesture_ = false;
@@ -944,16 +978,16 @@
           scroll_state.deltaXHint(), scroll_state.deltaYHint());
   for (auto id : current_scroll_chain_) {
     Node* node = DOMNodeIds::NodeForId(id);
-    if (node)
-      node->WillBeginCustomizedScrollPhase(direction);
+    if (node && node->IsElementNode())
+      ToElement(node)->WillBeginCustomizedScrollPhase(direction);
   }
 }
 
 void ScrollManager::NotifyScrollPhaseEndForCustomizedScroll() {
   for (auto id : current_scroll_chain_) {
     Node* node = DOMNodeIds::NodeForId(id);
-    if (node)
-      node->DidEndCustomizedScrollPhase();
+    if (node && node->IsElementNode())
+      ToElement(node)->DidEndCustomizedScrollPhase();
   }
 }
 
diff --git a/third_party/blink/renderer/core/input/scroll_manager.h b/third_party/blink/renderer/core/input/scroll_manager.h
index c76f8eb..7223e31 100644
--- a/third_party/blink/renderer/core/input/scroll_manager.h
+++ b/third_party/blink/renderer/core/input/scroll_manager.h
@@ -117,12 +117,14 @@
 
   Page* GetPage() const;
 
+  bool IsViewportScrollingElement(const Element&) const;
+
   bool HandleScrollGestureOnResizer(Node*, const WebGestureEvent&);
 
   void RecomputeScrollChain(const Node& start_node,
                             const ScrollState&,
                             std::deque<DOMNodeId>& scroll_chain);
-  bool CanScroll(const ScrollState&, const Node& current_node);
+  bool CanScroll(const ScrollState&, const Element& current_element);
 
   // scroller_size is set only when scrolling non root scroller.
   void ComputeScrollRelatedMetrics(
@@ -151,11 +153,11 @@
 
   bool last_gesture_scroll_over_embedded_content_view_;
 
-  // The most recent Node to scroll natively during this scroll
+  // The most recent element to scroll natively during this scroll
   // sequence. Null if no native element has scrolled this scroll
   // sequence, or if the most recent element to scroll used scroll
   // customization.
-  Member<Node> previous_gesture_scrolled_node_;
+  Member<Element> previous_gesture_scrolled_element_;
 
   // True iff some of the delta has been consumed for the current
   // scroll sequence in this frame, or any child frames. Only used
diff --git a/third_party/blink/renderer/core/inspector/BUILD.gn b/third_party/blink/renderer/core/inspector/BUILD.gn
index 9d1daad..6365f54f 100644
--- a/third_party/blink/renderer/core/inspector/BUILD.gn
+++ b/third_party/blink/renderer/core/inspector/BUILD.gn
@@ -89,8 +89,6 @@
     "inspector_testing_agent.h",
     "inspector_trace_events.cc",
     "inspector_trace_events.h",
-    "inspector_worker_agent.cc",
-    "inspector_worker_agent.h",
     "main_thread_debugger.cc",
     "main_thread_debugger.h",
     "network_resources_data.cc",
@@ -177,8 +175,6 @@
     "inspector/protocol/Runtime.h",
     "inspector/protocol/Security.cpp",
     "inspector/protocol/Security.h",
-    "inspector/protocol/Target.cpp",
-    "inspector/protocol/Target.h",
     "inspector/protocol/Testing.cpp",
     "inspector/protocol/Testing.h",
   ]
diff --git a/third_party/blink/renderer/core/inspector/browser_protocol.pdl b/third_party/blink/renderer/core/inspector/browser_protocol.pdl
index df61e497..95256f9 100644
--- a/third_party/blink/renderer/core/inspector/browser_protocol.pdl
+++ b/third_party/blink/renderer/core/inspector/browser_protocol.pdl
@@ -463,7 +463,7 @@
       optional boolean sizeOnly
     returns
       # The encoded body as a base64 string. Omitted if sizeOnly is true.
-      optional string body
+      optional binary body
       # Size before re-encoding.
       integer originalSize
       # Size after re-encoding.
@@ -1204,7 +1204,7 @@
   type CachedResponse extends object
     properties
       # Entry content, base64-encoded.
-      string body
+      binary body
 
   # Deletes a cache.
   command deleteCache
@@ -2707,7 +2707,7 @@
       # display. Reported for diagnostic uses, may be removed in the future.
       boolean hasDamage
       # Base64-encoded image data of the screenshot, if one was requested and successfully taken.
-      optional string screenshotData
+      optional binary screenshotData
 
   # Disables headless events for the target.
   command disable
@@ -3214,7 +3214,7 @@
       # Offset from owning layer top boundary
       number y
       # Base64-encoded snapshot data.
-      string picture
+      binary picture
 
   # Information about a compositing layer.
   type Layer extends object
@@ -4926,7 +4926,7 @@
       experimental optional boolean fromSurface
     returns
       # Base64-encoded image data.
-      string data
+      binary data
 
   # Clears the overriden device metrics.
   experimental deprecated command clearDeviceMetricsOverride
@@ -5113,7 +5113,7 @@
       optional boolean preferCSSPageSize
     returns
       # Base64-encoded pdf data.
-      string data
+      binary data
 
   # Reloads given page optionally ignoring the cache.
   command reload
@@ -5465,7 +5465,7 @@
   experimental event screencastFrame
     parameters
       # Base64-encoded compressed image.
-      string data
+      binary data
       # Screencast frame metadata.
       ScreencastFrameMetadata metadata
       # Frame number.
diff --git a/third_party/blink/renderer/core/inspector/devtools_agent.cc b/third_party/blink/renderer/core/inspector/devtools_agent.cc
index 8d865c17..3b86c2fc 100644
--- a/third_party/blink/renderer/core/inspector/devtools_agent.cc
+++ b/third_party/blink/renderer/core/inspector/devtools_agent.cc
@@ -8,8 +8,15 @@
 #include <memory>
 
 #include "mojo/public/cpp/bindings/binding.h"
+#include "third_party/blink/renderer/core/dom/document.h"
+#include "third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.h"
+#include "third_party/blink/renderer/core/frame/local_frame.h"
+#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
 #include "third_party/blink/renderer/core/inspector/inspector_session.h"
 #include "third_party/blink/renderer/core/inspector/inspector_task_runner.h"
+#include "third_party/blink/renderer/core/inspector/worker_inspector_controller.h"
+#include "third_party/blink/renderer/core/workers/worker_global_scope.h"
+#include "third_party/blink/renderer/core/workers/worker_thread.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
 #include "third_party/blink/renderer/platform/heap/persistent.h"
 #include "third_party/blink/renderer/platform/layout_test_support.h"
@@ -144,6 +151,7 @@
 }
 
 void DevToolsAgent::Session::Detach() {
+  agent_->client_->DebuggerTaskStarted();
   agent_->client_->DetachSession(inspector_session_.Get());
   agent_->sessions_.erase(this);
   binding_.Close();
@@ -151,6 +159,7 @@
   io_session_->DeleteSoon();
   io_session_ = nullptr;
   inspector_session_->Dispose();
+  agent_->client_->DebuggerTaskFinished();
 }
 
 void DevToolsAgent::Session::SendProtocolResponse(
@@ -191,17 +200,42 @@
   // detach, so we have to check it here.
   if (!host_ptr_.is_bound())
     return;
+  agent_->client_->DebuggerTaskStarted();
   inspector_session_->DispatchProtocolMessage(call_id, method, message);
+  agent_->client_->DebuggerTaskFinished();
 }
 
 // --------- DevToolsAgent -------------
 
+// static
+DevToolsAgent* DevToolsAgent::From(ExecutionContext* execution_context) {
+  if (!execution_context)
+    return nullptr;
+  if (auto* scope = DynamicTo<WorkerGlobalScope>(execution_context)) {
+    return scope->GetThread()
+        ->GetWorkerInspectorController()
+        ->GetDevToolsAgent();
+  }
+  if (auto* document = DynamicTo<Document>(execution_context)) {
+    LocalFrame* frame = document->GetFrame();
+    if (!frame)
+      return nullptr;
+    WebLocalFrameImpl* web_frame =
+        WebLocalFrameImpl::FromFrame(frame->LocalFrameRoot());
+    if (!web_frame)
+      return nullptr;
+    return web_frame->DevToolsAgentImpl()->GetDevToolsAgent();
+  }
+  return nullptr;
+}
+
 DevToolsAgent::DevToolsAgent(
     Client* client,
     scoped_refptr<InspectorTaskRunner> inspector_task_runner,
     scoped_refptr<base::SingleThreadTaskRunner> io_task_runner)
     : client_(client),
       binding_(this),
+      associated_binding_(this),
       inspector_task_runner_(std::move(inspector_task_runner)),
       io_task_runner_(std::move(io_task_runner)) {}
 
@@ -219,13 +253,26 @@
 }
 
 void DevToolsAgent::BindRequest(
+    mojom::blink::DevToolsAgentHostPtrInfo host_ptr_info,
+    mojom::blink::DevToolsAgentRequest request,
+    scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
+  DCHECK(!binding_);
+  DCHECK(!associated_binding_);
+  binding_.Bind(std::move(request), std::move(task_runner));
+  host_ptr_.Bind(std::move(host_ptr_info));
+  host_ptr_.set_connection_error_handler(
+      WTF::Bind(&DevToolsAgent::CleanupConnection, WrapWeakPersistent(this)));
+}
+
+void DevToolsAgent::BindRequest(
     mojom::blink::DevToolsAgentHostAssociatedPtrInfo host_ptr_info,
     mojom::blink::DevToolsAgentAssociatedRequest request,
     scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
   DCHECK(!binding_);
-  binding_.Bind(std::move(request), std::move(task_runner));
-  host_ptr_.Bind(std::move(host_ptr_info));
-  host_ptr_.set_connection_error_handler(
+  DCHECK(!associated_binding_);
+  associated_binding_.Bind(std::move(request), std::move(task_runner));
+  associated_host_ptr_.Bind(std::move(host_ptr_info));
+  associated_host_ptr_.set_connection_error_handler(
       WTF::Bind(&DevToolsAgent::CleanupConnection, WrapWeakPersistent(this)));
 }
 
@@ -234,10 +281,12 @@
     mojom::blink::DevToolsSessionAssociatedRequest session_request,
     mojom::blink::DevToolsSessionRequest io_session_request,
     mojom::blink::DevToolsSessionStatePtr reattach_session_state) {
+  client_->DebuggerTaskStarted();
   Session* session = new Session(
       this, std::move(host), std::move(session_request),
       std::move(io_session_request), std::move(reattach_session_state));
   sessions_.insert(session);
+  client_->DebuggerTaskFinished();
 }
 
 void DevToolsAgent::InspectElement(const WebPoint& point) {
@@ -249,9 +298,62 @@
     session->inspector_session()->flushProtocolNotifications();
 }
 
+void DevToolsAgent::ReportChildWorkers(bool report, bool wait_for_debugger) {
+  report_child_workers_ = report;
+  pause_child_workers_on_start_ = wait_for_debugger;
+  if (!report_child_workers_)
+    return;
+  auto workers = std::move(unreported_child_worker_threads_);
+  for (auto& it : workers)
+    ReportChildWorker(std::move(it.value));
+}
+
+void DevToolsAgent::ChildWorkerThreadCreated(
+    WorkerThread* worker_thread,
+    const KURL& url,
+    mojom::blink::DevToolsAgentRequest& agent_request,
+    mojom::blink::DevToolsAgentHostPtrInfo& host_ptr_info,
+    bool& wait_for_debugger) {
+  auto data = std::make_unique<WorkerData>();
+  data->url = url;
+  agent_request = mojo::MakeRequest(&data->agent_ptr);
+  data->host_request = mojo::MakeRequest(&host_ptr_info);
+  data->devtools_worker_token = worker_thread->GetDevToolsWorkerToken();
+  data->waiting_for_debugger = pause_child_workers_on_start_;
+  wait_for_debugger = pause_child_workers_on_start_;
+
+  if (report_child_workers_) {
+    ReportChildWorker(std::move(data));
+  } else {
+    unreported_child_worker_threads_.insert(worker_thread, std::move(data));
+  }
+}
+
+void DevToolsAgent::ChildWorkerThreadTerminated(WorkerThread* worker_thread) {
+  unreported_child_worker_threads_.erase(worker_thread);
+}
+
+void DevToolsAgent::ReportChildWorker(std::unique_ptr<WorkerData> data) {
+  if (host_ptr_.is_bound()) {
+    host_ptr_->ChildWorkerCreated(
+        std::move(data->agent_ptr), std::move(data->host_request),
+        std::move(data->url), data->devtools_worker_token,
+        data->waiting_for_debugger);
+  } else if (associated_host_ptr_.is_bound()) {
+    associated_host_ptr_->ChildWorkerCreated(
+        std::move(data->agent_ptr), std::move(data->host_request),
+        std::move(data->url), data->devtools_worker_token,
+        data->waiting_for_debugger);
+  }
+}
+
 void DevToolsAgent::CleanupConnection() {
   binding_.Close();
+  associated_binding_.Close();
   host_ptr_.reset();
+  associated_host_ptr_.reset();
+  report_child_workers_ = false;
+  pause_child_workers_on_start_ = false;
 }
 
 }  // namespace blink
diff --git a/third_party/blink/renderer/core/inspector/devtools_agent.h b/third_party/blink/renderer/core/inspector/devtools_agent.h
index 9c90c30..c02b3d17 100644
--- a/third_party/blink/renderer/core/inspector/devtools_agent.h
+++ b/third_party/blink/renderer/core/inspector/devtools_agent.h
@@ -8,7 +8,9 @@
 #include <memory>
 
 #include "base/single_thread_task_runner.h"
+#include "base/unguessable_token.h"
 #include "mojo/public/cpp/bindings/associated_binding.h"
+#include "mojo/public/cpp/bindings/binding.h"
 #include "third_party/blink/public/web/devtools_agent.mojom-blink.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/core/inspector/inspector_session.h"
@@ -18,7 +20,9 @@
 
 namespace blink {
 
+class ExecutionContext;
 class InspectorTaskRunner;
+class WorkerThread;
 
 class CORE_EXPORT DevToolsAgent
     : public GarbageCollectedFinalized<DevToolsAgent>,
@@ -32,8 +36,11 @@
         mojom::blink::DevToolsSessionStatePtr reattach_session_state) = 0;
     virtual void DetachSession(InspectorSession*) = 0;
     virtual void InspectElement(const WebPoint&) = 0;
+    virtual void DebuggerTaskStarted() = 0;
+    virtual void DebuggerTaskFinished() = 0;
   };
 
+  static DevToolsAgent* From(ExecutionContext*);
   DevToolsAgent(Client*,
                 scoped_refptr<InspectorTaskRunner> inspector_task_runner,
                 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner);
@@ -41,9 +48,18 @@
 
   void Dispose();
   void FlushProtocolNotifications();
+  void BindRequest(mojom::blink::DevToolsAgentHostPtrInfo,
+                   mojom::blink::DevToolsAgentRequest,
+                   scoped_refptr<base::SingleThreadTaskRunner>);
   void BindRequest(mojom::blink::DevToolsAgentHostAssociatedPtrInfo,
                    mojom::blink::DevToolsAgentAssociatedRequest,
-                   scoped_refptr<base::SingleThreadTaskRunner> task_runner);
+                   scoped_refptr<base::SingleThreadTaskRunner>);
+  void ChildWorkerThreadCreated(WorkerThread*,
+                                const KURL&,
+                                mojom::blink::DevToolsAgentRequest&,
+                                mojom::blink::DevToolsAgentHostPtrInfo&,
+                                bool& wait_for_debugger);
+  void ChildWorkerThreadTerminated(WorkerThread*);
   virtual void Trace(blink::Visitor*);
 
  private:
@@ -56,15 +72,31 @@
       mojom::blink::DevToolsSessionRequest io_session,
       mojom::blink::DevToolsSessionStatePtr reattach_session_state) override;
   void InspectElement(const WebPoint& point) override;
+  void ReportChildWorkers(bool report, bool wait_for_debugger) override;
+
+  struct WorkerData {
+    KURL url;
+    mojom::blink::DevToolsAgentPtr agent_ptr;
+    mojom::blink::DevToolsAgentHostRequest host_request;
+    base::UnguessableToken devtools_worker_token;
+    bool waiting_for_debugger;
+  };
+  void ReportChildWorker(std::unique_ptr<WorkerData>);
 
   void CleanupConnection();
 
   Client* client_;
-  mojo::AssociatedBinding<mojom::blink::DevToolsAgent> binding_;
-  mojom::blink::DevToolsAgentHostAssociatedPtr host_ptr_;
+  mojo::Binding<mojom::blink::DevToolsAgent> binding_;
+  mojo::AssociatedBinding<mojom::blink::DevToolsAgent> associated_binding_;
+  mojom::blink::DevToolsAgentHostPtr host_ptr_;
+  mojom::blink::DevToolsAgentHostAssociatedPtr associated_host_ptr_;
   HeapHashSet<Member<Session>> sessions_;
   scoped_refptr<InspectorTaskRunner> inspector_task_runner_;
   scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
+  HashMap<WorkerThread*, std::unique_ptr<WorkerData>>
+      unreported_child_worker_threads_;
+  bool report_child_workers_ = false;
+  bool pause_child_workers_on_start_ = false;
 };
 
 }  // namespace blink
diff --git a/third_party/blink/renderer/core/inspector/inspector_audits_agent.cc b/third_party/blink/renderer/core/inspector/inspector_audits_agent.cc
index ea1ce1399..b6ac5a8 100644
--- a/third_party/blink/renderer/core/inspector/inspector_audits_agent.cc
+++ b/third_party/blink/renderer/core/inspector/inspector_audits_agent.cc
@@ -79,7 +79,7 @@
     const String& encoding,
     Maybe<double> quality,
     Maybe<bool> size_only,
-    Maybe<String>* out_body,
+    Maybe<protocol::Binary>* out_body,
     int* out_original_size,
     int* out_encoded_size) {
   DCHECK(encoding == EncodingEnum::Jpeg || encoding == EncodingEnum::Png ||
@@ -105,11 +105,12 @@
     return Response::Error("Could not encode image with given settings");
   }
 
-  if (!size_only.fromMaybe(false))
-    *out_body = Base64Encode(encoded_image);
-
   *out_original_size = static_cast<int>(base64_decoded_buffer.size());
   *out_encoded_size = static_cast<int>(encoded_image.size());
+
+  if (!size_only.fromMaybe(false)) {
+    *out_body = protocol::Binary::fromVector(std::move(encoded_image));
+  }
   return Response::OK();
 }
 
diff --git a/third_party/blink/renderer/core/inspector/inspector_audits_agent.h b/third_party/blink/renderer/core/inspector/inspector_audits_agent.h
index 06a359f..966524e 100644
--- a/third_party/blink/renderer/core/inspector/inspector_audits_agent.h
+++ b/third_party/blink/renderer/core/inspector/inspector_audits_agent.h
@@ -21,13 +21,14 @@
   void Trace(blink::Visitor*) override;
 
   // Protocol methods.
-  protocol::Response getEncodedResponse(const String& request_id,
-                                        const String& encoding,
-                                        protocol::Maybe<double> quality,
-                                        protocol::Maybe<bool> size_only,
-                                        protocol::Maybe<String>* out_body,
-                                        int* out_original_size,
-                                        int* out_encoded_size) override;
+  protocol::Response getEncodedResponse(
+      const String& request_id,
+      const String& encoding,
+      protocol::Maybe<double> quality,
+      protocol::Maybe<bool> size_only,
+      protocol::Maybe<protocol::Binary>* out_body,
+      int* out_original_size,
+      int* out_encoded_size) override;
 
  private:
   Member<InspectorNetworkAgent> network_agent_;
diff --git a/third_party/blink/renderer/core/inspector/inspector_dom_agent.cc b/third_party/blink/renderer/core/inspector/inspector_dom_agent.cc
index 2fe328d..7a1353f 100644
--- a/third_party/blink/renderer/core/inspector/inspector_dom_agent.cc
+++ b/third_party/blink/renderer/core/inspector/inspector_dom_agent.cc
@@ -87,7 +87,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
 using protocol::Maybe;
 using protocol::Response;
 
@@ -1270,7 +1269,7 @@
   if (!response.isSuccess())
     return response;
   if (!IsHTMLInputElement(*node) ||
-      ToHTMLInputElement(*node).type() != InputTypeNames::file)
+      ToHTMLInputElement(*node).type() != input_type_names::kFile)
     return Response::Error("Node is not a file input element");
 
   Vector<String> paths;
diff --git a/third_party/blink/renderer/core/inspector/inspector_dom_snapshot_agent.cc b/third_party/blink/renderer/core/inspector/inspector_dom_snapshot_agent.cc
index 6c8165e..31f4271 100644
--- a/third_party/blink/renderer/core/inspector/inspector_dom_snapshot_agent.cc
+++ b/third_party/blink/renderer/core/inspector/inspector_dom_snapshot_agent.cc
@@ -430,8 +430,8 @@
 
     if (auto* input_element = ToHTMLInputElementOrNull(*element)) {
       value->setInputValue(input_element->value());
-      if ((input_element->type() == InputTypeNames::radio) ||
-          (input_element->type() == InputTypeNames::checkbox)) {
+      if ((input_element->type() == input_type_names::kRadio) ||
+          (input_element->type() == input_type_names::kCheckbox)) {
         value->setInputChecked(input_element->checked());
       }
     }
@@ -647,8 +647,8 @@
 
     if (auto* input_element = ToHTMLInputElementOrNull(*element)) {
       SetRare(nodes->getInputValue(nullptr), index, input_element->value());
-      if ((input_element->type() == InputTypeNames::radio) ||
-          (input_element->type() == InputTypeNames::checkbox)) {
+      if ((input_element->type() == input_type_names::kRadio) ||
+          (input_element->type() == input_type_names::kCheckbox)) {
         if (input_element->checked()) {
           SetRare(nodes->getInputChecked(nullptr), index);
         }
diff --git a/third_party/blink/renderer/core/inspector/inspector_emulation_agent.cc b/third_party/blink/renderer/core/inspector/inspector_emulation_agent.cc
index ea592b5..8b8013d 100644
--- a/third_party/blink/renderer/core/inspector/inspector_emulation_agent.cc
+++ b/third_party/blink/renderer/core/inspector/inspector_emulation_agent.cc
@@ -129,6 +129,10 @@
 Response InspectorEmulationAgent::disable() {
   if (enabled_)
     instrumenting_agents_->removeInspectorEmulationAgent(this);
+  setUserAgentOverride(String(), protocol::Maybe<String>(),
+                       protocol::Maybe<String>());
+  if (!web_local_frame_)
+    return Response::OK();
   setScriptExecutionDisabled(false);
   setScrollbarsHidden(false);
   setDocumentCookieDisabled(false);
@@ -142,8 +146,6 @@
     web_local_frame_->View()->Scheduler()->RemoveVirtualTimeObserver(this);
     virtual_time_setup_ = false;
   }
-  setUserAgentOverride(String(), protocol::Maybe<String>(),
-                       protocol::Maybe<String>());
   return Response::OK();
 }
 
diff --git a/third_party/blink/renderer/core/inspector/inspector_layer_tree_agent.cc b/third_party/blink/renderer/core/inspector/inspector_layer_tree_agent.cc
index 0b09500e..0188270a 100644
--- a/third_party/blink/renderer/core/inspector/inspector_layer_tree_agent.cc
+++ b/third_party/blink/renderer/core/inspector/inspector_layer_tree_agent.cc
@@ -57,8 +57,9 @@
 #include "third_party/blink/renderer/platform/graphics/graphics_layer.h"
 #include "third_party/blink/renderer/platform/graphics/picture_snapshot.h"
 #include "third_party/blink/renderer/platform/transforms/transformation_matrix.h"
-#include "third_party/blink/renderer/platform/wtf/text/base64.h"
 #include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
+#include "third_party/skia/include/core/SkPicture.h"
+#include "third_party/skia/include/core/SkRefCnt.h"
 #include "ui/gfx/geometry/rect.h"
 
 namespace blink {
@@ -478,8 +479,9 @@
     protocol::LayerTree::PictureTile* tile = tiles->get(i);
     decoded_tiles[i] = base::AdoptRef(new PictureSnapshot::TilePictureStream());
     decoded_tiles[i]->layer_offset.Set(tile->getX(), tile->getY());
-    if (!Base64Decode(tile->getPicture(), decoded_tiles[i]->data))
-      return Response::Error("Invalid base64 encoding");
+    const protocol::Binary& data = tile->getPicture();
+    decoded_tiles[i]->picture =
+        SkPicture::MakeFromData(data.data(), data.size());
   }
   scoped_refptr<PictureSnapshot> snapshot =
       PictureSnapshot::Load(decoded_tiles);
diff --git a/third_party/blink/renderer/core/inspector/inspector_page_agent.cc b/third_party/blink/renderer/core/inspector/inspector_page_agent.cc
index 7a4d4bd3..e2bf467 100644
--- a/third_party/blink/renderer/core/inspector/inspector_page_agent.cc
+++ b/third_party/blink/renderer/core/inspector/inspector_page_agent.cc
@@ -1035,7 +1035,7 @@
     frame_object->setParentId(IdentifiersFactory::FrameId(parent_frame));
     AtomicString name = frame->Tree().GetName();
     if (name.IsEmpty() && frame->DeprecatedLocalOwner())
-      name = frame->DeprecatedLocalOwner()->getAttribute(HTMLNames::idAttr);
+      name = frame->DeprecatedLocalOwner()->getAttribute(html_names::kIdAttr);
     frame_object->setName(name);
   }
   if (loader && !loader->UnreachableURL().IsEmpty())
diff --git a/third_party/blink/renderer/core/inspector/inspector_protocol_config.json b/third_party/blink/renderer/core/inspector/inspector_protocol_config.json
index 4b76bfd..1915631 100644
--- a/third_party/blink/renderer/core/inspector/inspector_protocol_config.json
+++ b/third_party/blink/renderer/core/inspector/inspector_protocol_config.json
@@ -96,11 +96,6 @@
                 "async": ["getResponseBody", "getRequestPostData"]
             },
             {
-                "domain": "Target",
-                "include": ["setAutoAttach", "sendMessageToTarget"],
-                "include_events": ["attachedToTarget", "detachedFromTarget", "receivedMessageFromTarget"]
-            },
-            {
                 "domain": "Testing"
             }
         ]
diff --git a/third_party/blink/renderer/core/inspector/inspector_session.cc b/third_party/blink/renderer/core/inspector/inspector_session.cc
index b13a610..f9ebccd 100644
--- a/third_party/blink/renderer/core/inspector/inspector_session.cc
+++ b/third_party/blink/renderer/core/inspector/inspector_session.cc
@@ -103,25 +103,6 @@
   }
 }
 
-void InspectorSession::DispatchProtocolMessage(const String& message) {
-  DCHECK(!disposed_);
-  int call_id;
-  String method;
-  std::unique_ptr<protocol::Value> parsed_message =
-      protocol::StringUtil::parseJSON(message);
-  if (!inspector_backend_dispatcher_->parseCommand(parsed_message.get(),
-                                                   &call_id, &method)) {
-    return;
-  }
-  if (v8_inspector::V8InspectorSession::canDispatchMethod(
-          ToV8InspectorStringView(method))) {
-    v8_session_->dispatchProtocolMessage(ToV8InspectorStringView(message));
-  } else {
-    inspector_backend_dispatcher_->dispatch(call_id, method,
-                                            std::move(parsed_message), message);
-  }
-}
-
 void InspectorSession::DidStartProvisionalLoad(LocalFrame* frame) {
   if (inspected_frames_->Root() == frame) {
     v8_session_->setSkipAllPauses(true);
diff --git a/third_party/blink/renderer/core/inspector/inspector_session.h b/third_party/blink/renderer/core/inspector/inspector_session.h
index fc3e45dce..332da5d 100644
--- a/third_party/blink/renderer/core/inspector/inspector_session.h
+++ b/third_party/blink/renderer/core/inspector/inspector_session.h
@@ -65,7 +65,6 @@
   void DispatchProtocolMessage(int call_id,
                                const String& method,
                                const String& message);
-  void DispatchProtocolMessage(const String& message);
   void flushProtocolNotifications() override;
 
   void Trace(blink::Visitor*);
diff --git a/third_party/blink/renderer/core/inspector/inspector_task_runner.cc b/third_party/blink/renderer/core/inspector/inspector_task_runner.cc
index 42cdf05..19b36ad 100644
--- a/third_party/blink/renderer/core/inspector/inspector_task_runner.cc
+++ b/third_party/blink/renderer/core/inspector/inspector_task_runner.cc
@@ -122,7 +122,6 @@
 
 void InspectorTaskRunner::V8InterruptCallback(v8::Isolate*, void* data) {
   InspectorTaskRunner* runner = static_cast<InspectorTaskRunner*>(data);
-  DCHECK(runner->isolate_task_runner_->BelongsToCurrentThread());
   if (runner->ignore_interrupts_)
     return;
   while (true) {
diff --git a/third_party/blink/renderer/core/inspector/inspector_worker_agent.cc b/third_party/blink/renderer/core/inspector/inspector_worker_agent.cc
deleted file mode 100644
index 1bc6721b..0000000
--- a/third_party/blink/renderer/core/inspector/inspector_worker_agent.cc
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "third_party/blink/renderer/core/inspector/inspector_worker_agent.h"
-
-#include "base/memory/scoped_refptr.h"
-#include "third_party/blink/renderer/core/dom/document.h"
-#include "third_party/blink/renderer/core/frame/local_frame.h"
-#include "third_party/blink/renderer/core/inspector/inspected_frames.h"
-#include "third_party/blink/renderer/core/workers/execution_context_worker_registry.h"
-#include "third_party/blink/renderer/core/workers/worker_global_scope.h"
-#include "third_party/blink/renderer/platform/weborigin/kurl.h"
-#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
-
-namespace blink {
-
-using protocol::Maybe;
-using protocol::Response;
-
-int InspectorWorkerAgent::s_last_connection_ = 0;
-
-InspectorWorkerAgent::InspectorWorkerAgent(
-    InspectedFrames* inspected_frames,
-    WorkerGlobalScope* worker_global_scope)
-    : inspected_frames_(inspected_frames),
-      worker_global_scope_(worker_global_scope),
-      auto_attach_(&agent_state_, /*default_value=*/ false),
-      wait_for_debugger_on_start_(&agent_state_, /*default_value=*/ false),
-      attached_session_ids_(&agent_state_, /*default_value*/ false) {}
-
-InspectorWorkerAgent::~InspectorWorkerAgent() = default;
-
-void InspectorWorkerAgent::Restore() {
-  if (!auto_attach_.Get())
-    return;
-  instrumenting_agents_->addInspectorWorkerAgent(this);
-  for (const WTF::String& session_id : attached_session_ids_.Keys())
-    GetFrontend()->detachedFromTarget(session_id);
-  attached_session_ids_.Clear();
-  ConnectToAllProxies();
-}
-
-Response InspectorWorkerAgent::disable() {
-  if (auto_attach_.Get()) {
-    DisconnectFromAllProxies(false);
-    instrumenting_agents_->removeInspectorWorkerAgent(this);
-  }
-  agent_state_.ClearAllFields();
-  return Response::OK();
-}
-
-Response InspectorWorkerAgent::setAutoAttach(bool auto_attach,
-                                             bool wait_for_debugger_on_start,
-                                             Maybe<bool> flatten) {
-  wait_for_debugger_on_start_.Set(wait_for_debugger_on_start);
-
-  if (auto_attach == auto_attach_.Get())
-    return Response::OK();
-  auto_attach_.Set(auto_attach);
-  if (auto_attach) {
-    instrumenting_agents_->addInspectorWorkerAgent(this);
-    ConnectToAllProxies();
-  } else {
-    DisconnectFromAllProxies(true);
-    instrumenting_agents_->removeInspectorWorkerAgent(this);
-  }
-  return Response::OK();
-}
-
-Response InspectorWorkerAgent::sendMessageToTarget(const String& message,
-                                                   Maybe<String> session_id,
-                                                   Maybe<String> target_id) {
-  if (session_id.isJust()) {
-    auto it = session_id_to_connection_.find(session_id.fromJust());
-    if (it == session_id_to_connection_.end())
-      return Response::Error("No session with given id");
-    WorkerInspectorProxy* proxy = connected_proxies_.at(it->value);
-    proxy->SendMessageToInspector(it->value, message);
-    return Response::OK();
-  }
-  if (target_id.isJust()) {
-    int connection = 0;
-    for (auto& it : connected_proxies_) {
-      if (it.value->InspectorId() == target_id.fromJust()) {
-        if (connection)
-          return Response::Error("Multiple sessions attached, specify id");
-        connection = it.key;
-      }
-    }
-    if (!connection)
-      return Response::Error("No target with given id");
-    WorkerInspectorProxy* proxy = connected_proxies_.at(connection);
-    proxy->SendMessageToInspector(connection, message);
-    return Response::OK();
-  }
-  return Response::Error("Session id must be specified");
-}
-
-void InspectorWorkerAgent::ShouldWaitForDebuggerOnWorkerStart(bool* result) {
-  if (auto_attach_.Get() && wait_for_debugger_on_start_.Get())
-    *result = true;
-}
-
-void InspectorWorkerAgent::DidStartWorker(WorkerInspectorProxy* proxy,
-                                          bool waiting_for_debugger) {
-  DCHECK(GetFrontend() && auto_attach_.Get());
-  ConnectToProxy(proxy, waiting_for_debugger);
-}
-
-void InspectorWorkerAgent::WorkerTerminated(WorkerInspectorProxy* proxy) {
-  DCHECK(GetFrontend() && auto_attach_.Get());
-  Vector<String> session_ids;
-  for (auto& it : session_id_to_connection_) {
-    if (connected_proxies_.at(it.value) == proxy)
-      session_ids.push_back(it.key);
-  }
-  for (const String& session_id : session_ids) {
-    attached_session_ids_.Clear(session_id);
-    GetFrontend()->detachedFromTarget(session_id, proxy->InspectorId());
-    int connection = session_id_to_connection_.at(session_id);
-    proxy->DisconnectFromInspector(connection, this);
-    connected_proxies_.erase(connection);
-    connection_to_session_id_.erase(connection);
-    session_id_to_connection_.erase(session_id);
-  }
-}
-
-void InspectorWorkerAgent::ConnectToAllProxies() {
-  if (worker_global_scope_) {
-    for (WorkerInspectorProxy* proxy :
-         ExecutionContextWorkerRegistry::From(*worker_global_scope_)
-             ->GetWorkerInspectorProxies()) {
-      ConnectToProxy(proxy, false);
-    }
-    return;
-  }
-
-  for (LocalFrame* frame : *inspected_frames_) {
-    for (WorkerInspectorProxy* proxy :
-         ExecutionContextWorkerRegistry::From(*frame->GetDocument())
-             ->GetWorkerInspectorProxies()) {
-      ConnectToProxy(proxy, false);
-    }
-  }
-}
-
-void InspectorWorkerAgent::DisconnectFromAllProxies(bool report_to_frontend) {
-  for (auto& it : session_id_to_connection_) {
-    WorkerInspectorProxy* proxy = connected_proxies_.at(it.value);
-    if (report_to_frontend) {
-      attached_session_ids_.Clear(it.key);
-      GetFrontend()->detachedFromTarget(it.key, proxy->InspectorId());
-    }
-    proxy->DisconnectFromInspector(it.value, this);
-  }
-  connection_to_session_id_.clear();
-  session_id_to_connection_.clear();
-  connected_proxies_.clear();
-}
-
-void InspectorWorkerAgent::DidCommitLoadForLocalFrame(LocalFrame* frame) {
-  if (!auto_attach_.Get() || frame != inspected_frames_->Root())
-    return;
-
-  // During navigation workers from old page may die after a while.
-  // Usually, it's fine to report them terminated later, but some tests
-  // expect strict set of workers, and we reuse renderer between tests.
-  DisconnectFromAllProxies(true);
-}
-
-void InspectorWorkerAgent::ConnectToProxy(WorkerInspectorProxy* proxy,
-                                          bool waiting_for_debugger) {
-  int connection = ++s_last_connection_;
-  connected_proxies_.Set(connection, proxy);
-
-  String session_id = proxy->InspectorId() + "-" + String::Number(connection);
-  session_id_to_connection_.Set(session_id, connection);
-  connection_to_session_id_.Set(connection, session_id);
-
-  proxy->ConnectToInspector(connection, this);
-  DCHECK(GetFrontend());
-  attached_session_ids_.Set(session_id, true);
-  GetFrontend()->attachedToTarget(session_id,
-                                  protocol::Target::TargetInfo::create()
-                                      .setTargetId(proxy->InspectorId())
-                                      .setType("worker")
-                                      .setTitle(proxy->Url())
-                                      .setUrl(proxy->Url())
-                                      .setAttached(true)
-                                      .build(),
-                                  waiting_for_debugger);
-}
-
-void InspectorWorkerAgent::DispatchMessageFromWorker(
-    WorkerInspectorProxy* proxy,
-    int connection,
-    const String& message) {
-  auto it = connection_to_session_id_.find(connection);
-  if (it == connection_to_session_id_.end())
-    return;
-  GetFrontend()->receivedMessageFromTarget(it->value, message,
-                                           proxy->InspectorId());
-}
-
-void InspectorWorkerAgent::Trace(blink::Visitor* visitor) {
-  visitor->Trace(connected_proxies_);
-  visitor->Trace(inspected_frames_);
-  visitor->Trace(worker_global_scope_);
-  InspectorBaseAgent::Trace(visitor);
-}
-
-}  // namespace blink
diff --git a/third_party/blink/renderer/core/inspector/inspector_worker_agent.h b/third_party/blink/renderer/core/inspector/inspector_worker_agent.h
deleted file mode 100644
index 6f2a733..0000000
--- a/third_party/blink/renderer/core/inspector/inspector_worker_agent.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_INSPECTOR_INSPECTOR_WORKER_AGENT_H_
-#define THIRD_PARTY_BLINK_RENDERER_CORE_INSPECTOR_INSPECTOR_WORKER_AGENT_H_
-
-#include "base/macros.h"
-#include "third_party/blink/renderer/core/core_export.h"
-#include "third_party/blink/renderer/core/inspector/inspector_base_agent.h"
-#include "third_party/blink/renderer/core/inspector/protocol/Target.h"
-#include "third_party/blink/renderer/core/workers/worker_inspector_proxy.h"
-#include "third_party/blink/renderer/platform/wtf/forward.h"
-#include "third_party/blink/renderer/platform/wtf/hash_map.h"
-
-namespace blink {
-class InspectedFrames;
-class WorkerGlobalScope;
-class WorkerInspectorProxy;
-
-class CORE_EXPORT InspectorWorkerAgent final
-    : public InspectorBaseAgent<protocol::Target::Metainfo>,
-      public WorkerInspectorProxy::PageInspector {
- public:
-  InspectorWorkerAgent(InspectedFrames*, WorkerGlobalScope*);
-  ~InspectorWorkerAgent() override;
-  void Trace(blink::Visitor*) override;
-
-  protocol::Response disable() override;
-  void Restore() override;
-  void DidCommitLoadForLocalFrame(LocalFrame*) override;
-
-  // Probes
-  void ShouldWaitForDebuggerOnWorkerStart(bool* result);
-  void DidStartWorker(WorkerInspectorProxy*, bool waiting_for_debugger);
-  void WorkerTerminated(WorkerInspectorProxy*);
-
-  // Called from Dispatcher
-  protocol::Response setAutoAttach(bool auto_attach,
-                                   bool wait_for_debugger_on_start,
-                                   protocol::Maybe<bool> flatten) override;
-  protocol::Response sendMessageToTarget(
-      const String& message,
-      protocol::Maybe<String> session_id,
-      protocol::Maybe<String> target_id) override;
-
- private:
-  void ConnectToAllProxies();
-  void DisconnectFromAllProxies(bool report_to_frontend);
-  void ConnectToProxy(WorkerInspectorProxy*, bool waiting_for_debugger);
-
-  // WorkerInspectorProxy::PageInspector implementation.
-  void DispatchMessageFromWorker(WorkerInspectorProxy*,
-                                 int connection,
-                                 const String& message) override;
-
-  // This is null while inspecting workers.
-  Member<InspectedFrames> inspected_frames_;
-  // This is null while inspecting frames.
-  Member<WorkerGlobalScope> worker_global_scope_;
-  HeapHashMap<int, Member<WorkerInspectorProxy>> connected_proxies_;
-  HashMap<int, String> connection_to_session_id_;
-  HashMap<String, int> session_id_to_connection_;
-  InspectorAgentState::Boolean auto_attach_;
-  InspectorAgentState::Boolean wait_for_debugger_on_start_;
-  InspectorAgentState::BooleanMap attached_session_ids_;
-  static int s_last_connection_;
-  DISALLOW_COPY_AND_ASSIGN(InspectorWorkerAgent);
-};
-
-}  // namespace blink
-
-#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_INSPECTOR_INSPECTOR_WORKER_AGENT_H_
diff --git a/third_party/blink/renderer/core/inspector/worker_inspector_controller.cc b/third_party/blink/renderer/core/inspector/worker_inspector_controller.cc
index 6e7f586f..9a3eecda 100644
--- a/third_party/blink/renderer/core/inspector/worker_inspector_controller.cc
+++ b/third_party/blink/renderer/core/inspector/worker_inspector_controller.cc
@@ -30,19 +30,19 @@
 
 #include "third_party/blink/renderer/core/inspector/worker_inspector_controller.h"
 
+#include "base/single_thread_task_runner.h"
 #include "third_party/blink/renderer/core/core_probe_sink.h"
 #include "third_party/blink/renderer/core/inspector/inspector_emulation_agent.h"
 #include "third_party/blink/renderer/core/inspector/inspector_log_agent.h"
 #include "third_party/blink/renderer/core/inspector/inspector_network_agent.h"
+#include "third_party/blink/renderer/core/inspector/inspector_session.h"
 #include "third_party/blink/renderer/core/inspector/inspector_trace_events.h"
-#include "third_party/blink/renderer/core/inspector/inspector_worker_agent.h"
 #include "third_party/blink/renderer/core/inspector/protocol/Protocol.h"
 #include "third_party/blink/renderer/core/inspector/worker_thread_debugger.h"
 #include "third_party/blink/renderer/core/loader/worker_fetch_context.h"
 #include "third_party/blink/renderer/core/probe/core_probes.h"
 #include "third_party/blink/renderer/core/workers/worker_backing_thread.h"
 #include "third_party/blink/renderer/core/workers/worker_global_scope.h"
-#include "third_party/blink/renderer/core/workers/worker_reporting_proxy.h"
 #include "third_party/blink/renderer/core/workers/worker_thread.h"
 #include "third_party/blink/renderer/platform/layout_test_support.h"
 #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
@@ -50,16 +50,26 @@
 
 namespace blink {
 
+// static
 WorkerInspectorController* WorkerInspectorController::Create(
-    WorkerThread* thread) {
+    WorkerThread* thread,
+    scoped_refptr<InspectorTaskRunner> inspector_task_runner,
+    mojom::blink::DevToolsAgentRequest agent_request,
+    mojom::blink::DevToolsAgentHostPtrInfo host_ptr_info) {
   WorkerThreadDebugger* debugger =
       WorkerThreadDebugger::From(thread->GetIsolate());
-  return debugger ? new WorkerInspectorController(thread, debugger) : nullptr;
+  return debugger ? new WorkerInspectorController(
+                        thread, debugger, std::move(inspector_task_runner),
+                        std::move(agent_request), std::move(host_ptr_info))
+                  : nullptr;
 }
 
 WorkerInspectorController::WorkerInspectorController(
     WorkerThread* thread,
-    WorkerThreadDebugger* debugger)
+    WorkerThreadDebugger* debugger,
+    scoped_refptr<InspectorTaskRunner> inspector_task_runner,
+    mojom::blink::DevToolsAgentRequest agent_request,
+    mojom::blink::DevToolsAgentHostPtrInfo host_ptr_info)
     : debugger_(debugger), thread_(thread), probe_sink_(new CoreProbeSink()) {
   probe_sink_->addInspectorTraceEvents(new InspectorTraceEvents());
   if (auto* scope = DynamicTo<WorkerGlobalScope>(thread->GlobalScope())) {
@@ -68,6 +78,15 @@
     url_ = scope->Url();
     worker_thread_id_ = thread->GetPlatformThreadId();
   }
+  scoped_refptr<base::SingleThreadTaskRunner> io_task_runner =
+      Platform::Current()->GetIOTaskRunner();
+  if (!parent_devtools_token_.is_empty() && io_task_runner) {
+    // There may be no io task runner in unit tests.
+    agent_ = new DevToolsAgent(this, std::move(inspector_task_runner),
+                               std::move(io_task_runner));
+    agent_->BindRequest(std::move(host_ptr_info), std::move(agent_request),
+                        thread->GetTaskRunner(TaskType::kInternalInspector));
+  }
   TraceEvent::AddEnabledStateObserver(this);
   EmitTraceEvent();
 }
@@ -77,83 +96,62 @@
   TraceEvent::RemoveEnabledStateObserver(this);
 }
 
-void WorkerInspectorController::ConnectFrontend(int session_id) {
-  WorkerThread::ScopedDebuggerTask debugger_task(thread_);
-  if (sessions_.find(session_id) != sessions_.end())
-    return;
+InspectorSession* WorkerInspectorController::AttachSession(
+    InspectorSession::Client* session_client,
+    mojom::blink::DevToolsSessionStatePtr reattach_session_state) {
+  if (!sessions_.size())
+    thread_->GetWorkerBackingThread().BackingThread().AddTaskObserver(this);
+
+  bool should_reattach = !reattach_session_state.is_null();
 
   InspectedFrames* inspected_frames = new InspectedFrames(nullptr);
-  InspectorSession* session = new InspectorSession(
-      this, probe_sink_.Get(), inspected_frames, session_id,
-      debugger_->GetV8Inspector(), debugger_->ContextGroupId(thread_), nullptr);
-  session->Append(new InspectorLogAgent(thread_->GetConsoleMessageStorage(),
-                                        nullptr, session->V8Session()));
+  InspectorSession* inspector_session = new InspectorSession(
+      session_client, probe_sink_.Get(), inspected_frames, 0,
+      debugger_->GetV8Inspector(), debugger_->ContextGroupId(thread_),
+      std::move(reattach_session_state));
+  inspector_session->Append(
+      new InspectorLogAgent(thread_->GetConsoleMessageStorage(), nullptr,
+                            inspector_session->V8Session()));
   if (auto* scope = DynamicTo<WorkerGlobalScope>(thread_->GlobalScope())) {
     DCHECK(scope->EnsureFetcher());
-    session->Append(new InspectorNetworkAgent(inspected_frames, scope,
-                                              session->V8Session()));
-    session->Append(new InspectorEmulationAgent(nullptr));
-    session->Append(new InspectorWorkerAgent(inspected_frames, scope));
+    inspector_session->Append(new InspectorNetworkAgent(
+        inspected_frames, scope, inspector_session->V8Session()));
+    inspector_session->Append(new InspectorEmulationAgent(nullptr));
   }
-  if (sessions_.IsEmpty())
-    thread_->GetWorkerBackingThread().BackingThread().AddTaskObserver(this);
-  sessions_.insert(session_id, session);
+
+  if (should_reattach)
+    inspector_session->Restore();
+  sessions_.insert(inspector_session);
+  return inspector_session;
 }
 
-void WorkerInspectorController::DisconnectFrontend(int session_id) {
-  WorkerThread::ScopedDebuggerTask debugger_task(thread_);
-  auto it = sessions_.find(session_id);
-  if (it == sessions_.end())
-    return;
-  it->value->Dispose();
-  sessions_.erase(it);
-  if (sessions_.IsEmpty())
+void WorkerInspectorController::DetachSession(InspectorSession* session) {
+  sessions_.erase(session);
+  if (!sessions_.size())
     thread_->GetWorkerBackingThread().BackingThread().RemoveTaskObserver(this);
 }
 
-void WorkerInspectorController::DispatchMessageFromFrontend(
-    int session_id,
-    const String& message) {
-  WorkerThread::ScopedDebuggerTask debugger_task(thread_);
-  auto it = sessions_.find(session_id);
-  if (it == sessions_.end())
-    return;
-  it->value->DispatchProtocolMessage(message);
+void WorkerInspectorController::InspectElement(const WebPoint&) {
+  NOTREACHED();
+}
+
+void WorkerInspectorController::DebuggerTaskStarted() {
+  thread_->DebuggerTaskStarted();
+}
+
+void WorkerInspectorController::DebuggerTaskFinished() {
+  thread_->DebuggerTaskFinished();
 }
 
 void WorkerInspectorController::Dispose() {
-  Vector<int> ids;
-  CopyKeysToVector(sessions_, ids);
-  for (int session_id : ids)
-    DisconnectFrontend(session_id);
+  if (agent_)
+    agent_->Dispose();
   thread_ = nullptr;
 }
 
 void WorkerInspectorController::FlushProtocolNotifications() {
-  for (auto& it : sessions_)
-    it.value->flushProtocolNotifications();
-}
-
-void WorkerInspectorController::SendProtocolResponse(
-    int session_id,
-    int call_id,
-    const String& response,
-    mojom::blink::DevToolsSessionStatePtr updates) {
-  // Make tests more predictable by flushing all sessions before sending
-  // protocol response in any of them.
-  if (LayoutTestSupport::IsRunningLayoutTest())
-    FlushProtocolNotifications();
-  // Worker messages are wrapped, no need to handle callId or state.
-  thread_->GetWorkerReportingProxy().PostMessageToPageInspector(session_id,
-                                                                response);
-}
-
-void WorkerInspectorController::SendProtocolNotification(
-    int session_id,
-    const String& message,
-    mojom::blink::DevToolsSessionStatePtr updates) {
-  thread_->GetWorkerReportingProxy().PostMessageToPageInspector(session_id,
-                                                                message);
+  if (agent_)
+    agent_->FlushProtocolNotifications();
 }
 
 void WorkerInspectorController::WillProcessTask(
@@ -161,8 +159,7 @@
 
 void WorkerInspectorController::DidProcessTask(
     const base::PendingTask& pending_task) {
-  for (auto& it : sessions_)
-    it.value->flushProtocolNotifications();
+  FlushProtocolNotifications();
 }
 
 void WorkerInspectorController::OnTraceLogEnabled() {
@@ -183,6 +180,7 @@
 }
 
 void WorkerInspectorController::Trace(blink::Visitor* visitor) {
+  visitor->Trace(agent_);
   visitor->Trace(probe_sink_);
   visitor->Trace(sessions_);
 }
diff --git a/third_party/blink/renderer/core/inspector/worker_inspector_controller.h b/third_party/blink/renderer/core/inspector/worker_inspector_controller.h
index 6208523b..694322d1 100644
--- a/third_party/blink/renderer/core/inspector/worker_inspector_controller.h
+++ b/third_party/blink/renderer/core/inspector/worker_inspector_controller.h
@@ -31,17 +31,18 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_INSPECTOR_WORKER_INSPECTOR_CONTROLLER_H_
 #define THIRD_PARTY_BLINK_RENDERER_CORE_INSPECTOR_WORKER_INSPECTOR_CONTROLLER_H_
 
+#include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/scoped_refptr.h"
 #include "base/unguessable_token.h"
-#include "third_party/blink/renderer/core/inspector/inspector_session.h"
+#include "third_party/blink/renderer/core/inspector/devtools_agent.h"
 #include "third_party/blink/renderer/core/inspector/inspector_task_runner.h"
+#include "third_party/blink/renderer/platform/heap/handle.h"
 #include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/weborigin/kurl.h"
 #include "third_party/blink/renderer/platform/wtf/allocator.h"
 #include "third_party/blink/renderer/platform/wtf/forward.h"
-#include "third_party/blink/renderer/platform/wtf/hash_map.h"
 
 namespace blink {
 
@@ -52,34 +53,28 @@
 class WorkerInspectorController final
     : public GarbageCollectedFinalized<WorkerInspectorController>,
       public TraceEvent::EnabledStateObserver,
-      public InspectorSession::Client,
+      public DevToolsAgent::Client,
       private Thread::TaskObserver {
  public:
-  static WorkerInspectorController* Create(WorkerThread*);
+  static WorkerInspectorController* Create(
+      WorkerThread*,
+      scoped_refptr<InspectorTaskRunner>,
+      mojom::blink::DevToolsAgentRequest,
+      mojom::blink::DevToolsAgentHostPtrInfo);
   ~WorkerInspectorController() override;
   void Trace(blink::Visitor*);
 
   CoreProbeSink* GetProbeSink() const { return probe_sink_.Get(); }
-
-  void ConnectFrontend(int session_id);
-  void DisconnectFrontend(int session_id);
-  void DispatchMessageFromFrontend(int session_id, const String& message);
+  DevToolsAgent* GetDevToolsAgent() const { return agent_.Get(); }
   void Dispose();
   void FlushProtocolNotifications();
 
  private:
-  WorkerInspectorController(WorkerThread*, WorkerThreadDebugger*);
-
-  // InspectorSession::Client implementation.
-  void SendProtocolResponse(
-      int session_id,
-      int call_id,
-      const String& response,
-      mojom::blink::DevToolsSessionStatePtr updates) override;
-  void SendProtocolNotification(
-      int session_id,
-      const String& message,
-      mojom::blink::DevToolsSessionStatePtr updates) override;
+  WorkerInspectorController(WorkerThread*,
+                            WorkerThreadDebugger*,
+                            scoped_refptr<InspectorTaskRunner>,
+                            mojom::blink::DevToolsAgentRequest,
+                            mojom::blink::DevToolsAgentHostPtrInfo);
 
   // Thread::TaskObserver implementation.
   void WillProcessTask(const base::PendingTask&) override;
@@ -91,10 +86,20 @@
 
   void EmitTraceEvent();
 
+  // DevToolsAgent::Client implementation.
+  InspectorSession* AttachSession(
+      InspectorSession::Client*,
+      mojom::blink::DevToolsSessionStatePtr reattach_session_state) override;
+  void DetachSession(InspectorSession*) override;
+  void InspectElement(const WebPoint&) override;
+  void DebuggerTaskStarted() override;
+  void DebuggerTaskFinished() override;
+
+  Member<DevToolsAgent> agent_;
   WorkerThreadDebugger* debugger_;
   WorkerThread* thread_;
   Member<CoreProbeSink> probe_sink_;
-  HeapHashMap<int, Member<InspectorSession>> sessions_;
+  HeapHashSet<Member<InspectorSession>> sessions_;
 
   // These fields are set up in the constructor and then read
   // on a random thread from EmitTraceEvent().
diff --git a/third_party/blink/renderer/core/layout/hit_test_result.cc b/third_party/blink/renderer/core/layout/hit_test_result.cc
index ef59de8..464c35c 100644
--- a/third_party/blink/renderer/core/layout/hit_test_result.cc
+++ b/third_party/blink/renderer/core/layout/hit_test_result.cc
@@ -45,7 +45,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 HitTestResult::HitTestResult()
     : hit_test_request_(HitTestRequest::kReadOnly | HitTestRequest::kActive),
@@ -180,7 +180,7 @@
     return nullptr;
 
   HTMLMapElement* map = image_element->GetTreeScope().GetImageMap(
-      image_element->FastGetAttribute(usemapAttr));
+      image_element->FastGetAttribute(kUsemapAttr));
   if (!map)
     return nullptr;
 
@@ -252,7 +252,7 @@
     return g_null_atom;
 
   if (auto* image = ToHTMLImageElementOrNull(*inner_node_or_image_map_image))
-    return image->getAttribute(altAttr);
+    return image->getAttribute(kAltAttr);
 
   if (auto* input = ToHTMLInputElementOrNull(*inner_node_or_image_map_image))
     return input->Alt();
@@ -298,7 +298,7 @@
   if (IsHTMLImageElement(*inner_node_or_image_map_image) ||
       (IsHTMLInputElement(*inner_node_or_image_map_image) &&
        ToHTMLInputElement(inner_node_or_image_map_image)->type() ==
-           InputTypeNames::image))
+           input_type_names::kImage))
     url_string = ToElement(*inner_node_or_image_map_image).ImageSourceURL();
   else if ((inner_node_or_image_map_image->GetLayoutObject() &&
             inner_node_or_image_map_image->GetLayoutObject()->IsImage()) &&
diff --git a/third_party/blink/renderer/core/layout/jank_tracker_test.cc b/third_party/blink/renderer/core/layout/jank_tracker_test.cc
index ca81542..ec9c8897 100644
--- a/third_party/blink/renderer/core/layout/jank_tracker_test.cc
+++ b/third_party/blink/renderer/core/layout/jank_tracker_test.cc
@@ -37,7 +37,7 @@
   EXPECT_EQ(0.0, GetJankTracker().Score());
   EXPECT_EQ(0.0, GetJankTracker().MaxDistance());
 
-  GetDocument().getElementById("j")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("j")->setAttribute(html_names::kStyleAttr,
                                                   AtomicString("top: 60px"));
   GetFrameView().UpdateAllLifecyclePhases();
   // 300 * (100 + 60) / (default viewport size 800 * 600)
@@ -52,7 +52,7 @@
     </style>
     <div id='j'></div>
   )HTML");
-  GetDocument().getElementById("j")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("j")->setAttribute(html_names::kStyleAttr,
                                                   AtomicString("top: 58px"));
   GetFrameView().UpdateAllLifecyclePhases();
   // Rect locations and sizes should snap to multiples of 600 / 60 = 10.
@@ -71,7 +71,7 @@
     </div>
   )HTML");
 
-  GetDocument().getElementById("j")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("j")->setAttribute(html_names::kStyleAttr,
                                                   AtomicString("top: 60px"));
   GetFrameView().UpdateAllLifecyclePhases();
   // (600 - 300) * (140 - 40 + 60) / (default viewport size 800 * 600)
@@ -86,7 +86,7 @@
     <div id='j'></div>
   )HTML");
   GetDocument().getElementById("j")->setAttribute(
-      HTMLNames::styleAttr, AtomicString("width: 70px; left: 10px"));
+      html_names::kStyleAttr, AtomicString("width: 70px; left: 10px"));
   GetFrameView().UpdateAllLifecyclePhases();
   EXPECT_FLOAT_EQ(20.0, GetJankTracker().MaxDistance());
 }
@@ -98,7 +98,7 @@
     </style>
     <div id='j'></div>
   )HTML");
-  GetDocument().getElementById("j")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("j")->setAttribute(html_names::kStyleAttr,
                                                   AtomicString("top: 2px"));
   GetFrameView().UpdateAllLifecyclePhases();
   EXPECT_EQ(0.0, GetJankTracker().Score());
@@ -112,7 +112,7 @@
     </style>
     <div id='j'></div>
   )HTML");
-  GetDocument().getElementById("j")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("j")->setAttribute(html_names::kStyleAttr,
                                                   AtomicString("top: 2px"));
   GetFrameView().UpdateAllLifecyclePhases();
   EXPECT_EQ(0.0, GetJankTracker().Score());
@@ -125,7 +125,7 @@
     </style>
     <div id='j'></div>
   )HTML");
-  GetDocument().getElementById("j")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("j")->setAttribute(html_names::kStyleAttr,
                                                   AtomicString("top: 60px"));
   SimulateInput();
   GetFrameView().UpdateAllLifecyclePhases();
@@ -158,7 +158,7 @@
   )HTML");
 
   GetDocument().getElementById("space")->setAttribute(
-      HTMLNames::styleAttr, AtomicString("height: 100px"));
+      html_names::kStyleAttr, AtomicString("height: 100px"));
   GetFrameView().UpdateAllLifecyclePhases();
 
   // #jank is 400x200 after viewport intersection with correct application of
@@ -186,10 +186,10 @@
     </div>
   )HTML");
 
-  GetDocument().getElementById("B")->setAttribute(HTMLNames::classAttr,
+  GetDocument().getElementById("B")->setAttribute(html_names::kClassAttr,
                                                   AtomicString("tr"));
   GetFrameView().UpdateLifecycleToCompositingCleanPlusScrolling();
-  GetDocument().getElementById("A")->setAttribute(HTMLNames::classAttr,
+  GetDocument().getElementById("A")->setAttribute(html_names::kClassAttr,
                                                   AtomicString("hide"));
   GetFrameView().UpdateAllLifecyclePhases();
 }
diff --git a/third_party/blink/renderer/core/layout/layout_box_model_object_test.cc b/third_party/blink/renderer/core/layout/layout_box_model_object_test.cc
index 1054c045..74940cfd 100644
--- a/third_party/blink/renderer/core/layout/layout_box_model_object_test.cc
+++ b/third_party/blink/renderer/core/layout/layout_box_model_object_test.cc
@@ -1089,7 +1089,7 @@
   EXPECT_FALSE(parent->StyleRef().IsStacked());
   EXPECT_NE(parent, original_compositing_container->GetLayoutObject());
 
-  target_element->setAttribute(HTMLNames::classAttr, "non-stacked");
+  target_element->setAttribute(html_names::kClassAttr, "non-stacked");
   GetDocument().View()->UpdateLifecycleToLayoutClean();
 
   EXPECT_FALSE(target->StyleRef().IsStacked());
@@ -1099,7 +1099,7 @@
   EXPECT_EQ(parent, new_compositing_container->GetLayoutObject());
 
   GetDocument().View()->UpdateAllLifecyclePhases();
-  target_element->setAttribute(HTMLNames::classAttr, "stacked");
+  target_element->setAttribute(html_names::kClassAttr, "stacked");
   GetDocument().View()->UpdateLifecycleToLayoutClean();
 
   EXPECT_TRUE(target->StyleRef().IsStacked());
@@ -1169,14 +1169,14 @@
   ASSERT_NE(nullptr, target_layer);
   EXPECT_FALSE(target_layer->NeedsRepaint());
 
-  target->setAttribute(HTMLNames::styleAttr,
+  target->setAttribute(html_names::kStyleAttr,
                        base_style + "; backface-visibility: hidden");
   GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
   EXPECT_TRUE(target_layer->NeedsRepaint());
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_FALSE(target_layer->NeedsRepaint());
 
-  target->setAttribute(HTMLNames::styleAttr, base_style);
+  target->setAttribute(html_names::kStyleAttr, base_style);
   GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
   EXPECT_TRUE(target_layer->NeedsRepaint());
   GetDocument().View()->UpdateAllLifecyclePhases();
diff --git a/third_party/blink/renderer/core/layout/layout_button.cc b/third_party/blink/renderer/core/layout/layout_button.cc
index b5c23c5..0ff22292a 100644
--- a/third_party/blink/renderer/core/layout/layout_button.cc
+++ b/third_party/blink/renderer/core/layout/layout_button.cc
@@ -22,8 +22,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 LayoutButton::LayoutButton(Element* element)
     : LayoutFlexibleBox(element), inner_(nullptr) {}
 
diff --git a/third_party/blink/renderer/core/layout/layout_counter.cc b/third_party/blink/renderer/core/layout/layout_counter.cc
index 2360368..b995e51 100644
--- a/third_party/blink/renderer/core/layout/layout_counter.cc
+++ b/third_party/blink/renderer/core/layout/layout_counter.cc
@@ -30,7 +30,6 @@
 #include "third_party/blink/renderer/core/dom/pseudo_element.h"
 #include "third_party/blink/renderer/core/html/html_olist_element.h"
 #include "third_party/blink/renderer/core/html/list_item_ordinal.h"
-#include "third_party/blink/renderer/core/html_names.h"
 #include "third_party/blink/renderer/core/layout/counter_node.h"
 #include "third_party/blink/renderer/core/layout/layout_list_item.h"
 #include "third_party/blink/renderer/core/layout/layout_view.h"
@@ -44,8 +43,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 typedef HashMap<AtomicString, scoped_refptr<CounterNode>> CounterMap;
 typedef HashMap<const LayoutObject*, std::unique_ptr<CounterMap>> CounterMaps;
 
diff --git a/third_party/blink/renderer/core/layout/layout_details_marker.cc b/third_party/blink/renderer/core/layout/layout_details_marker.cc
index 16f354e..857827e 100644
--- a/third_party/blink/renderer/core/layout/layout_details_marker.cc
+++ b/third_party/blink/renderer/core/layout/layout_details_marker.cc
@@ -27,7 +27,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 LayoutDetailsMarker::LayoutDetailsMarker(Element* element)
     : LayoutBlockFlow(element) {}
@@ -65,7 +65,7 @@
       continue;
     if (IsHTMLDetailsElement(*layout_object->GetNode()))
       return !ToElement(layout_object->GetNode())
-                  ->getAttribute(openAttr)
+                  ->getAttribute(kOpenAttr)
                   .IsNull();
     if (IsHTMLInputElement(*layout_object->GetNode()))
       return true;
diff --git a/third_party/blink/renderer/core/layout/layout_embedded_object.cc b/third_party/blink/renderer/core/layout/layout_embedded_object.cc
index 58387dc..2cdbd83 100644
--- a/third_party/blink/renderer/core/layout/layout_embedded_object.cc
+++ b/third_party/blink/renderer/core/layout/layout_embedded_object.cc
@@ -29,7 +29,6 @@
 #include "third_party/blink/renderer/core/frame/local_frame.h"
 #include "third_party/blink/renderer/core/frame/local_frame_view.h"
 #include "third_party/blink/renderer/core/html/html_plugin_element.h"
-#include "third_party/blink/renderer/core/html_names.h"
 #include "third_party/blink/renderer/core/layout/intrinsic_sizing_info.h"
 #include "third_party/blink/renderer/core/layout/layout_analyzer.h"
 #include "third_party/blink/renderer/core/layout/layout_view.h"
@@ -39,8 +38,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 LayoutEmbeddedObject::LayoutEmbeddedObject(Element* element)
     : LayoutEmbeddedContent(element) {
   View()->GetFrameView()->SetIsVisuallyNonEmpty();
diff --git a/third_party/blink/renderer/core/layout/layout_fieldset.cc b/third_party/blink/renderer/core/layout/layout_fieldset.cc
index 9209773..7d33944 100644
--- a/third_party/blink/renderer/core/layout/layout_fieldset.cc
+++ b/third_party/blink/renderer/core/layout/layout_fieldset.cc
@@ -25,14 +25,11 @@
 
 #include "third_party/blink/renderer/core/css_property_names.h"
 #include "third_party/blink/renderer/core/html/forms/html_legend_element.h"
-#include "third_party/blink/renderer/core/html_names.h"
 #include "third_party/blink/renderer/core/paint/fieldset_painter.h"
 #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
 
 namespace blink {
 
-using namespace HTMLNames;
-
 LayoutFieldset::LayoutFieldset(Element* element) : LayoutBlockFlow(element) {}
 
 void LayoutFieldset::ComputePreferredLogicalWidths() {
diff --git a/third_party/blink/renderer/core/layout/layout_file_upload_control.cc b/third_party/blink/renderer/core/layout/layout_file_upload_control.cc
index c0bc3789..d8f5e03 100644
--- a/third_party/blink/renderer/core/layout/layout_file_upload_control.cc
+++ b/third_party/blink/renderer/core/layout/layout_file_upload_control.cc
@@ -25,7 +25,6 @@
 #include "third_party/blink/renderer/core/editing/position_with_affinity.h"
 #include "third_party/blink/renderer/core/fileapi/file_list.h"
 #include "third_party/blink/renderer/core/html/forms/html_input_element.h"
-#include "third_party/blink/renderer/core/html_names.h"
 #include "third_party/blink/renderer/core/input_type_names.h"
 #include "third_party/blink/renderer/core/layout/layout_theme.h"
 #include "third_party/blink/renderer/core/paint/file_upload_control_painter.h"
@@ -35,8 +34,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 const int kDefaultWidthNumChars = 34;
 const int kButtonShadowHeight = 2;
 
@@ -48,7 +45,7 @@
 
 void LayoutFileUploadControl::UpdateFromElement() {
   HTMLInputElement* input = ToHTMLInputElement(GetNode());
-  DCHECK_EQ(input->type(), InputTypeNames::file);
+  DCHECK_EQ(input->type(), input_type_names::kFile);
 
   if (HTMLInputElement* button = UploadButton()) {
     bool new_can_receive_dropped_files_state = input->CanReceiveDroppedFiles();
diff --git a/third_party/blink/renderer/core/layout/layout_html_canvas.cc b/third_party/blink/renderer/core/layout/layout_html_canvas.cc
index c3276c2..5558e13 100644
--- a/third_party/blink/renderer/core/layout/layout_html_canvas.cc
+++ b/third_party/blink/renderer/core/layout/layout_html_canvas.cc
@@ -34,8 +34,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 LayoutHTMLCanvas::LayoutHTMLCanvas(HTMLCanvasElement* element)
     : LayoutReplaced(element, LayoutSize(element->Size())) {
   View()->GetFrameView()->SetIsVisuallyNonEmpty();
diff --git a/third_party/blink/renderer/core/layout/layout_image.cc b/third_party/blink/renderer/core/layout/layout_image.cc
index e59d0e00..35ce87d7 100644
--- a/third_party/blink/renderer/core/layout/layout_image.cc
+++ b/third_party/blink/renderer/core/layout/layout_image.cc
@@ -106,7 +106,7 @@
 
 }  // namespace
 
-using namespace HTMLNames;
+using namespace html_names;
 
 LayoutImage::LayoutImage(Element* element)
     : LayoutReplaced(element, LayoutSize()),
@@ -359,7 +359,7 @@
 
 HTMLMapElement* LayoutImage::ImageMap() const {
   HTMLImageElement* i = ToHTMLImageElementOrNull(GetNode());
-  return i ? i->GetTreeScope().GetImageMap(i->FastGetAttribute(usemapAttr))
+  return i ? i->GetTreeScope().GetImageMap(i->FastGetAttribute(kUsemapAttr))
            : nullptr;
 }
 
diff --git a/third_party/blink/renderer/core/layout/layout_list_item.cc b/third_party/blink/renderer/core/layout/layout_list_item.cc
index a729d66..c5c8bdd 100644
--- a/third_party/blink/renderer/core/layout/layout_list_item.cc
+++ b/third_party/blink/renderer/core/layout/layout_list_item.cc
@@ -26,7 +26,6 @@
 #include "third_party/blink/renderer/core/dom/flat_tree_traversal.h"
 #include "third_party/blink/renderer/core/html/html_li_element.h"
 #include "third_party/blink/renderer/core/html/html_olist_element.h"
-#include "third_party/blink/renderer/core/html_names.h"
 #include "third_party/blink/renderer/core/layout/layout_list_marker.h"
 #include "third_party/blink/renderer/core/paint/list_item_painter.h"
 #include "third_party/blink/renderer/core/paint/paint_layer.h"
@@ -36,8 +35,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 LayoutListItem::LayoutListItem(Element* element)
     : LayoutBlockFlow(element),
       marker_(nullptr),
diff --git a/third_party/blink/renderer/core/layout/layout_object.h b/third_party/blink/renderer/core/layout/layout_object.h
index 2511f3e..a5edb27e 100644
--- a/third_party/blink/renderer/core/layout/layout_object.h
+++ b/third_party/blink/renderer/core/layout/layout_object.h
@@ -642,7 +642,7 @@
   }
   // isBody is called from LayoutBox::styleWillChange and is thus quite hot.
   bool IsBody() const {
-    return GetNode() && GetNode()->HasTagName(HTMLNames::bodyTag);
+    return GetNode() && GetNode()->HasTagName(html_names::kBodyTag);
   }
   bool IsHR() const;
 
diff --git a/third_party/blink/renderer/core/layout/layout_progress_test.cc b/third_party/blink/renderer/core/layout/layout_progress_test.cc
index 7034a85..148ba0b 100644
--- a/third_party/blink/renderer/core/layout/layout_progress_test.cc
+++ b/third_party/blink/renderer/core/layout/layout_progress_test.cc
@@ -39,7 +39,7 @@
   EXPECT_TRUE(LayoutProgressTest::IsAnimationTimerActive(layout_progress));
   EXPECT_TRUE(LayoutProgressTest::IsAnimatiing(layout_progress));
 
-  progress_element->setAttribute(HTMLNames::valueAttr, "0.7");
+  progress_element->setAttribute(html_names::kValueAttr, "0.7");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   // Verify that we cancel the timer for a determinant progress element
diff --git a/third_party/blink/renderer/core/layout/layout_replaced_test.cc b/third_party/blink/renderer/core/layout/layout_replaced_test.cc
index f3d3d28a..5b157b6 100644
--- a/third_party/blink/renderer/core/layout/layout_replaced_test.cc
+++ b/third_party/blink/renderer/core/layout/layout_replaced_test.cc
@@ -24,7 +24,7 @@
   LayoutObject* layout_object = target_element->GetLayoutObject();
   ASSERT_FALSE(layout_object->StyleRef().HasBorderRadius());
 
-  target_element->setAttribute(HTMLNames::styleAttr, "border-radius: 10px");
+  target_element->setAttribute(html_names::kStyleAttr, "border-radius: 10px");
 
   GetDocument().View()->UpdateLifecycleToLayoutClean();
   EXPECT_TRUE(layout_object->NeedsPaintPropertyUpdate());
diff --git a/third_party/blink/renderer/core/layout/layout_search_field.cc b/third_party/blink/renderer/core/layout/layout_search_field.cc
index 053c6c5b..90297a4f 100644
--- a/third_party/blink/renderer/core/layout/layout_search_field.cc
+++ b/third_party/blink/renderer/core/layout/layout_search_field.cc
@@ -31,13 +31,9 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
-// ----------------------------
-
 LayoutSearchField::LayoutSearchField(HTMLInputElement* element)
     : LayoutTextControlSingleLine(element) {
-  DCHECK_EQ(element->type(), InputTypeNames::search);
+  DCHECK_EQ(element->type(), input_type_names::kSearch);
 }
 
 LayoutSearchField::~LayoutSearchField() = default;
diff --git a/third_party/blink/renderer/core/layout/layout_slider.cc b/third_party/blink/renderer/core/layout/layout_slider.cc
index 7918e4b..eeb5be4 100644
--- a/third_party/blink/renderer/core/layout/layout_slider.cc
+++ b/third_party/blink/renderer/core/layout/layout_slider.cc
@@ -33,7 +33,7 @@
 LayoutSlider::LayoutSlider(HTMLInputElement* element)
     : LayoutFlexibleBox(element) {
   // We assume LayoutSlider works only with <input type=range>.
-  DCHECK_EQ(element->type(), InputTypeNames::range);
+  DCHECK_EQ(element->type(), input_type_names::kRange);
 }
 
 LayoutSlider::~LayoutSlider() = default;
diff --git a/third_party/blink/renderer/core/layout/layout_table.cc b/third_party/blink/renderer/core/layout/layout_table.cc
index 410930b5..82f26c45 100644
--- a/third_party/blink/renderer/core/layout/layout_table.cc
+++ b/third_party/blink/renderer/core/layout/layout_table.cc
@@ -49,8 +49,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 LayoutTable::LayoutTable(Element* element)
     : LayoutBlock(element),
       head_(nullptr),
diff --git a/third_party/blink/renderer/core/layout/layout_table_cell.cc b/third_party/blink/renderer/core/layout/layout_table_cell.cc
index 9c85ac7..833167a 100644
--- a/third_party/blink/renderer/core/layout/layout_table_cell.cc
+++ b/third_party/blink/renderer/core/layout/layout_table_cell.cc
@@ -43,7 +43,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 struct SameSizeAsLayoutTableCell : public LayoutBlockFlow {
   unsigned bitfields;
@@ -201,7 +201,8 @@
   if (GetNode() && StyleRef().AutoWrap()) {
     // See if nowrap was set.
     Length w = StyleOrColLogicalWidth();
-    const AtomicString& nowrap = ToElement(GetNode())->getAttribute(nowrapAttr);
+    const AtomicString& nowrap =
+        ToElement(GetNode())->getAttribute(kNowrapAttr);
     if (!nowrap.IsNull() && w.IsFixed()) {
       // Nowrap is set, but we didn't actually use it because of the fixed width
       // set on the cell. Even so, it is a WinIE/Moz trait to make the minwidth
diff --git a/third_party/blink/renderer/core/layout/layout_table_cell_test.cc b/third_party/blink/renderer/core/layout/layout_table_cell_test.cc
index 3647756..5d0a7f6 100644
--- a/third_party/blink/renderer/core/layout/layout_table_cell_test.cc
+++ b/third_party/blink/renderer/core/layout/layout_table_cell_test.cc
@@ -134,10 +134,10 @@
 
   // Create an overflow recalc.
   Element* cell = GetDocument().getElementById("cell");
-  cell->setAttribute(HTMLNames::styleAttr, "outline: 1px solid black;");
+  cell->setAttribute(html_names::kStyleAttr, "outline: 1px solid black;");
   // Trigger a layout on the table that doesn't require cell layout.
   Element* table = GetDocument().getElementById("table");
-  table->setAttribute(HTMLNames::styleAttr, "position: absolute; left: 2px;");
+  table->setAttribute(html_names::kStyleAttr, "position: absolute; left: 2px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   // Check that overflow was calculated on the cell.
@@ -296,7 +296,7 @@
   EXPECT_EQ(2u, cell2->CollapsedOuterBorderAfter());
 
   ToElement(cell1->Table()->GetNode())
-      ->setAttribute(HTMLNames::styleAttr,
+      ->setAttribute(html_names::kStyleAttr,
                      "writing-mode: vertical-rl; direction: rtl");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
diff --git a/third_party/blink/renderer/core/layout/layout_table_col.cc b/third_party/blink/renderer/core/layout/layout_table_col.cc
index f70ca59..3c4b7d7 100644
--- a/third_party/blink/renderer/core/layout/layout_table_col.cc
+++ b/third_party/blink/renderer/core/layout/layout_table_col.cc
@@ -32,8 +32,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 LayoutTableCol::LayoutTableCol(Element* element)
     : LayoutTableBoxComponent(element), span_(1) {
   // init LayoutObject attributes
diff --git a/third_party/blink/renderer/core/layout/layout_table_row.cc b/third_party/blink/renderer/core/layout/layout_table_row.cc
index 616212e45..29f9ce18 100644
--- a/third_party/blink/renderer/core/layout/layout_table_row.cc
+++ b/third_party/blink/renderer/core/layout/layout_table_row.cc
@@ -37,8 +37,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 LayoutTableRow::LayoutTableRow(Element* element)
     : LayoutTableBoxComponent(element), row_index_(kUnsetRowIndex) {
   // init LayoutObject attributes
diff --git a/third_party/blink/renderer/core/layout/layout_table_section.cc b/third_party/blink/renderer/core/layout/layout_table_section.cc
index 6183c60..5792109 100644
--- a/third_party/blink/renderer/core/layout/layout_table_section.cc
+++ b/third_party/blink/renderer/core/layout/layout_table_section.cc
@@ -42,8 +42,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 void LayoutTableSection::TableGridRow::
     SetRowLogicalHeightToRowStyleLogicalHeight() {
   DCHECK(row);
diff --git a/third_party/blink/renderer/core/layout/layout_table_section_test.cc b/third_party/blink/renderer/core/layout/layout_table_section_test.cc
index 78a184c9b..2f78e9a 100644
--- a/third_party/blink/renderer/core/layout/layout_table_section_test.cc
+++ b/third_party/blink/renderer/core/layout/layout_table_section_test.cc
@@ -18,15 +18,15 @@
   }
 
   LayoutTableSection* CreateSection(unsigned rows, unsigned columns) {
-    auto* table = GetDocument().CreateRawElement(HTMLNames::tableTag);
+    auto* table = GetDocument().CreateRawElement(html_names::kTableTag);
     GetDocument().body()->appendChild(table);
-    auto* section = GetDocument().CreateRawElement(HTMLNames::tbodyTag);
+    auto* section = GetDocument().CreateRawElement(html_names::kTbodyTag);
     table->appendChild(section);
     for (unsigned i = 0; i < rows; ++i) {
-      auto* row = GetDocument().CreateRawElement(HTMLNames::trTag);
+      auto* row = GetDocument().CreateRawElement(html_names::kTrTag);
       section->appendChild(row);
       for (unsigned i = 0; i < columns; ++i)
-        row->appendChild(GetDocument().CreateRawElement(HTMLNames::tdTag));
+        row->appendChild(GetDocument().CreateRawElement(html_names::kTdTag));
     }
     GetDocument().View()->UpdateAllLifecyclePhases();
     return ToLayoutTableSection(section->GetLayoutObject());
@@ -316,8 +316,10 @@
 }
 
 static void SetCellsOverflowInRow(LayoutTableRow* row) {
-  for (auto* cell = row->FirstCell(); cell; cell = cell->NextCell())
-    ToElement(cell->GetNode())->setAttribute(HTMLNames::classAttr, "overflow");
+  for (auto* cell = row->FirstCell(); cell; cell = cell->NextCell()) {
+    ToElement(cell->GetNode())
+        ->setAttribute(html_names::kClassAttr, "overflow");
+  }
 }
 
 TEST_F(LayoutTableSectionTest, OverflowingCells) {
diff --git a/third_party/blink/renderer/core/layout/layout_table_test.cc b/third_party/blink/renderer/core/layout/layout_table_test.cc
index ff1d80f7..2cd8931 100644
--- a/third_party/blink/renderer/core/layout/layout_table_test.cc
+++ b/third_party/blink/renderer/core/layout/layout_table_test.cc
@@ -30,11 +30,11 @@
   auto* target = GetTableByElementId("target");
   EXPECT_EQ(LayoutRect(0, 0, 100, 200), target->SelfVisualOverflowRect());
   ToElement(target->GetNode())
-      ->setAttribute(HTMLNames::styleAttr, "outline: 2px solid black");
+      ->setAttribute(html_names::kStyleAttr, "outline: 2px solid black");
 
   auto* child = GetTableByElementId("child");
   ToElement(child->GetNode())
-      ->setAttribute(HTMLNames::styleAttr, "outline: 2px solid black");
+      ->setAttribute(html_names::kStyleAttr, "outline: 2px solid black");
 
   target->GetFrameView()->UpdateAllLifecyclePhases();
   EXPECT_EQ(LayoutRect(-2, -2, 104, 204), target->SelfVisualOverflowRect());
diff --git a/third_party/blink/renderer/core/layout/layout_text_control_single_line.cc b/third_party/blink/renderer/core/layout/layout_text_control_single_line.cc
index 99a41fd..b5acb65 100644
--- a/third_party/blink/renderer/core/layout/layout_text_control_single_line.cc
+++ b/third_party/blink/renderer/core/layout/layout_text_control_single_line.cc
@@ -40,8 +40,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 LayoutTextControlSingleLine::LayoutTextControlSingleLine(
     HTMLInputElement* element)
     : LayoutTextControl(element), should_draw_caps_lock_indicator_(false) {}
@@ -179,7 +177,7 @@
 
   if (LocalFrame* frame = GetDocument().GetFrame())
     should_draw_caps_lock_indicator =
-        InputElement()->type() == InputTypeNames::password &&
+        InputElement()->type() == input_type_names::kPassword &&
         frame->Selection().FrameIsFocusedAndActive() &&
         GetDocument().FocusedElement() == GetNode() &&
         KeyboardEventManager::CurrentCapsLockState();
diff --git a/third_party/blink/renderer/core/layout/layout_text_control_test.cc b/third_party/blink/renderer/core/layout/layout_text_control_test.cc
index f26c9406..8f67f293 100644
--- a/third_party/blink/renderer/core/layout/layout_text_control_test.cc
+++ b/third_party/blink/renderer/core/layout/layout_text_control_test.cc
@@ -43,7 +43,7 @@
   auto* selectedText = GetInnerLayoutText(inputElement);
   EXPECT_FALSE(selectedText->ShouldInvalidateSelection());
 
-  inputElement->setAttribute(HTMLNames::classAttr, "pseudoSelection");
+  inputElement->setAttribute(html_names::kClassAttr, "pseudoSelection");
   GetDocument().View()->UpdateLifecycleToLayoutClean();
   EXPECT_TRUE(selectedText->ShouldInvalidateSelection());
 
@@ -68,7 +68,7 @@
   auto* selectedText = GetInnerLayoutText(inputElement);
   EXPECT_FALSE(selectedText->ShouldInvalidateSelection());
 
-  inputElement->setAttribute(HTMLNames::classAttr, "pseudoSelection");
+  inputElement->setAttribute(html_names::kClassAttr, "pseudoSelection");
   GetDocument().View()->UpdateLifecycleToLayoutClean();
   EXPECT_TRUE(selectedText->ShouldInvalidateSelection());
 
@@ -93,7 +93,7 @@
   auto* selectedText = GetInnerLayoutText(inputElement);
   EXPECT_FALSE(selectedText->ShouldInvalidateSelection());
 
-  inputElement->removeAttribute(HTMLNames::classAttr);
+  inputElement->removeAttribute(html_names::kClassAttr);
   GetDocument().View()->UpdateLifecycleToLayoutClean();
   EXPECT_TRUE(selectedText->ShouldInvalidateSelection());
 
diff --git a/third_party/blink/renderer/core/layout/layout_theme.cc b/third_party/blink/renderer/core/layout/layout_theme.cc
index 3de4d57..9a66a2462 100644
--- a/third_party/blink/renderer/core/layout/layout_theme.cc
+++ b/third_party/blink/renderer/core/layout/layout_theme.cc
@@ -105,8 +105,6 @@
   LayoutTheme::GetTheme().DidChangeThemeEngine();
 }
 
-using namespace HTMLNames;
-
 LayoutTheme& LayoutTheme::GetTheme() {
   if (RuntimeEnabledFeatures::MobileLayoutThemeEnabled()) {
     DEFINE_STATIC_REF(LayoutTheme, layout_theme_mobile,
@@ -644,7 +642,7 @@
 
 bool LayoutTheme::ShouldHaveSpinButton(HTMLInputElement* input_element) const {
   return input_element->IsSteppable() &&
-         input_element->type() != InputTypeNames::range;
+         input_element->type() != input_type_names::kRange;
 }
 
 void LayoutTheme::AdjustMenuListButtonStyle(ComputedStyle&, Element*) const {}
@@ -874,9 +872,10 @@
 
 bool LayoutTheme::SupportsCalendarPicker(const AtomicString& type) const {
   DCHECK(RuntimeEnabledFeatures::InputMultipleFieldsUIEnabled());
-  return type == InputTypeNames::date || type == InputTypeNames::datetime ||
-         type == InputTypeNames::datetime_local ||
-         type == InputTypeNames::month || type == InputTypeNames::week;
+  return type == input_type_names::kDate ||
+         type == input_type_names::kDatetime ||
+         type == input_type_names::kDatetimeLocal ||
+         type == input_type_names::kMonth || type == input_type_names::kWeek;
 }
 
 bool LayoutTheme::ShouldUseFallbackTheme(const ComputedStyle&) const {
diff --git a/third_party/blink/renderer/core/layout/layout_theme_mac.mm b/third_party/blink/renderer/core/layout/layout_theme_mac.mm
index 3c60c8a..b2a7ed13 100644
--- a/third_party/blink/renderer/core/layout/layout_theme_mac.mm
+++ b/third_party/blink/renderer/core/layout/layout_theme_mac.mm
@@ -134,8 +134,6 @@
 
 }  // namespace
 
-using namespace HTMLNames;
-
 LayoutThemeMac::LayoutThemeMac()
     : LayoutTheme(PlatformTheme()),
       notification_observer_(
diff --git a/third_party/blink/renderer/core/layout/layout_tree_as_text.cc b/third_party/blink/renderer/core/layout/layout_tree_as_text.cc
index bfd6e769..634f527 100644
--- a/third_party/blink/renderer/core/layout/layout_tree_as_text.cc
+++ b/third_party/blink/renderer/core/layout/layout_tree_as_text.cc
@@ -67,8 +67,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 static void PrintBorderStyle(WTF::TextStream& ts,
                              const EBorderStyle border_style) {
   switch (border_style) {
diff --git a/third_party/blink/renderer/core/layout/layout_video.cc b/third_party/blink/renderer/core/layout/layout_video.cc
index 1b094f8..b0130ea 100644
--- a/third_party/blink/renderer/core/layout/layout_video.cc
+++ b/third_party/blink/renderer/core/layout/layout_video.cc
@@ -33,8 +33,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 LayoutVideo::LayoutVideo(HTMLVideoElement* video) : LayoutMedia(video) {
   SetIntrinsicSize(CalculateIntrinsicSize());
 }
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc
index 5ccecba..04c62e2a 100644
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc
+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc
@@ -533,7 +533,7 @@
   // |pending_descendants|.
   LayoutUnit baseline_shift;
   if (!box->pending_descendants.IsEmpty()) {
-    NGLineHeightMetrics max = box->MetricsForTopAndBottomAlign();
+    NGLineHeightMetrics max = MetricsForTopAndBottomAlign(*box, *line_box);
     for (NGPendingPositions& child : box->pending_descendants) {
       // In quirks mode, metrics is empty if no content.
       if (child.metrics.IsEmpty())
@@ -646,30 +646,42 @@
   return kPositionNotPending;
 }
 
-NGLineHeightMetrics NGInlineBoxState::MetricsForTopAndBottomAlign() const {
+NGLineHeightMetrics NGInlineLayoutStateStack::MetricsForTopAndBottomAlign(
+    const NGInlineBoxState& box,
+    const NGLineBoxFragmentBuilder::ChildList& line_box) const {
+  DCHECK(!box.pending_descendants.IsEmpty());
+
   // |metrics| is the bounds of "aligned subtree", that is, bounds of
   // descendants that are not 'vertical-align: top' nor 'bottom'.
   // https://drafts.csswg.org/css2/visudet.html#propdef-vertical-align
-  NGLineHeightMetrics box = metrics;
+  NGLineHeightMetrics metrics = box.metrics;
+
+  // BoxData contains inline boxes to be created later. Take them into account.
+  for (const BoxData& box_data : box_data_list_) {
+    LayoutUnit box_ascent =
+        -line_box[box_data.fragment_end].offset.block_offset;
+    metrics.Unite(
+        NGLineHeightMetrics(box_ascent, box_data.size.block_size - box_ascent));
+  }
 
   // In quirks mode, metrics is empty if no content.
-  if (box.IsEmpty())
-    box = NGLineHeightMetrics::Zero();
+  if (metrics.IsEmpty())
+    metrics = NGLineHeightMetrics::Zero();
 
   // If the height of a box that has 'vertical-align: top' or 'bottom' exceeds
   // the height of the "aligned subtree", align the edge to the "aligned
   // subtree" and extend the other edge.
-  NGLineHeightMetrics max = box;
-  for (const NGPendingPositions& child : pending_descendants) {
+  NGLineHeightMetrics max = metrics;
+  for (const NGPendingPositions& child : box.pending_descendants) {
     if ((child.vertical_align == EVerticalAlign::kTop ||
          child.vertical_align == EVerticalAlign::kBottom) &&
         child.metrics.LineHeight() > max.LineHeight()) {
       if (child.vertical_align == EVerticalAlign::kTop) {
-        max = NGLineHeightMetrics(box.ascent,
-                                  child.metrics.LineHeight() - box.ascent);
+        max = NGLineHeightMetrics(metrics.ascent,
+                                  child.metrics.LineHeight() - metrics.ascent);
       } else if (child.vertical_align == EVerticalAlign::kBottom) {
-        max = NGLineHeightMetrics(child.metrics.LineHeight() - box.descent,
-                                  box.descent);
+        max = NGLineHeightMetrics(child.metrics.LineHeight() - metrics.descent,
+                                  metrics.descent);
       }
     }
   }
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.h b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.h
index f237ca1d..5238efd 100644
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.h
+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.h
@@ -95,10 +95,6 @@
   // inline box.
   bool CanAddTextOfStyle(const ComputedStyle&) const;
 
-  // Compute the metrics for when 'vertical-align' is 'top' and 'bottom' from
-  // |pending_descendants|.
-  NGLineHeightMetrics MetricsForTopAndBottomAlign() const;
-
 #if DCHECK_IS_ON()
   void CheckSame(const NGInlineBoxState&) const;
 #endif
@@ -183,6 +179,12 @@
                                      NGLineBoxFragmentBuilder::ChildList*,
                                      FontBaseline);
 
+  // Compute the metrics for when 'vertical-align' is 'top' and 'bottom' from
+  // |pending_descendants|.
+  NGLineHeightMetrics MetricsForTopAndBottomAlign(
+      const NGInlineBoxState&,
+      const NGLineBoxFragmentBuilder::ChildList&) const;
+
   // Data for a box fragment. See AddBoxFragmentPlaceholder().
   // This is a transient object only while building a line box.
   struct BoxData {
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item.cc
index 765ddf3e..3ec231a82 100644
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item.cc
+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_item.cc
@@ -23,15 +23,33 @@
 // While the spec defines "non-zero margins, padding, or borders" prevents
 // line boxes to be zero-height, tests indicate that only inline direction
 // of them do so. https://drafts.csswg.org/css2/visuren.html
-bool IsInlineBoxEmpty(const ComputedStyle& style,
-                      const LayoutObject& layout_object) {
-  if (style.BorderStart().NonZero() || !style.PaddingStart().IsZero() ||
-      style.BorderEnd().NonZero() || !style.PaddingEnd().IsZero())
+bool IsInlineBoxStartEmpty(const ComputedStyle& style,
+                           const LayoutObject& layout_object) {
+  if (style.BorderStartWidth() || !style.PaddingStart().IsZero())
     return false;
 
   // Non-zero margin can prevent "empty" only in non-quirks mode.
   // https://quirks.spec.whatwg.org/#the-line-height-calculation-quirk
-  if ((!style.MarginStart().IsZero() || !style.MarginEnd().IsZero()) &&
+  if (!style.MarginStart().IsZero() &&
+      !layout_object.GetDocument().InLineHeightQuirksMode())
+    return false;
+
+  return true;
+}
+
+// Determines if the end of a box is "empty" as defined above.
+//
+// Keeping the "empty" state for start and end separately is important when they
+// belong to different lines, as non-empty item can force the line it belongs to
+// as non-empty.
+bool IsInlineBoxEndEmpty(const ComputedStyle& style,
+                         const LayoutObject& layout_object) {
+  if (style.BorderEndWidth() || !style.PaddingEnd().IsZero())
+    return false;
+
+  // Non-zero margin can prevent "empty" only in non-quirks mode.
+  // https://quirks.spec.whatwg.org/#the-line-height-calculation-quirk
+  if (!style.MarginEnd().IsZero() &&
       !layout_object.GetDocument().InLineHeightQuirksMode())
     return false;
 
@@ -118,7 +136,7 @@
     DCHECK(style_ && layout_object_ && layout_object_->IsLayoutInline());
     if (style_->HasBoxDecorationBackground() || style_->HasPadding() ||
         style_->HasMargin()) {
-      is_empty_item_ = IsInlineBoxEmpty(*style_, *layout_object_);
+      is_empty_item_ = IsInlineBoxStartEmpty(*style_, *layout_object_);
       should_create_box_fragment_ = true;
     } else {
       is_empty_item_ = true;
@@ -137,6 +155,12 @@
     return;
   }
 
+  if (type_ == NGInlineItem::kCloseTag) {
+    DCHECK(style_ && layout_object_ && layout_object_->IsLayoutInline());
+    is_empty_item_ = IsInlineBoxEndEmpty(*style_, *layout_object_);
+    return;
+  }
+
   if (type_ == kListMarker) {
     is_empty_item_ = false;
     return;
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc
index b4ba1e7a..360d880 100644
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc
+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.cc
@@ -129,6 +129,17 @@
   return box;
 }
 
+NGInlineBoxState* NGInlineLayoutAlgorithm::HandleCloseTag(
+    const NGInlineItem& item,
+    const NGInlineItemResult& item_result,
+    NGInlineBoxState* box) {
+  if (UNLIKELY(quirks_mode_ && !item.IsEmptyItem()))
+    box->EnsureTextMetrics(*item.Style(), baseline_type_);
+  box = box_states_->OnCloseTag(&line_box_, box, baseline_type_,
+                                item.HasEndEdge());
+  return box;
+}
+
 // Prepare NGInlineLayoutStateStack for a new line.
 void NGInlineLayoutAlgorithm::PrepareBoxStates(
     const NGLineInfo& line_info,
@@ -248,7 +259,7 @@
              item.GetLayoutObject()->IsLayoutNGListItem());
       DCHECK(item_result.shape_result);
 
-      if (quirks_mode_)
+      if (UNLIKELY(quirks_mode_))
         box->EnsureTextMetrics(*item.Style(), baseline_type_);
 
       // Take all used fonts into account if 'line-height: normal'.
@@ -273,10 +284,7 @@
     } else if (item.Type() == NGInlineItem::kOpenTag) {
       box = HandleOpenTag(item, item_result, box_states_);
     } else if (item.Type() == NGInlineItem::kCloseTag) {
-      if (quirks_mode_ && box->needs_box_fragment)
-        box->EnsureTextMetrics(*item.Style(), baseline_type_);
-      box = box_states_->OnCloseTag(&line_box_, box, baseline_type_,
-                                    item.HasEndEdge());
+      box = HandleCloseTag(item, item_result, box);
     } else if (item.Type() == NGInlineItem::kAtomicInline) {
       box = PlaceAtomicInline(item, &item_result, *line_info);
     } else if (item.Type() == NGInlineItem::kListMarker) {
@@ -399,7 +407,7 @@
   DCHECK(item.GetLayoutObject());
   DCHECK(item.GetLayoutObject()->IsText());
 
-  if (quirks_mode_ && !box->HasMetrics())
+  if (UNLIKELY(quirks_mode_ && !box->HasMetrics()))
     box->EnsureTextMetrics(*item.Style(), baseline_type_);
 
   NGTextFragmentBuilder text_builder(Node(),
@@ -420,7 +428,7 @@
                                                      : fragment->Size().height;
   const ComputedStyle& style = fragment->Style();
   if (box->CanAddTextOfStyle(style)) {
-    if (quirks_mode_)
+    if (UNLIKELY(quirks_mode_))
       box->EnsureTextMetrics(style, baseline_type_);
     DCHECK(!box->text_metrics.IsEmpty());
     line_box_.AddChild(std::move(fragment), box->text_top, inline_size,
@@ -537,7 +545,7 @@
 void NGInlineLayoutAlgorithm::PlaceListMarker(const NGInlineItem& item,
                                               NGInlineItemResult* item_result,
                                               const NGLineInfo& line_info) {
-  if (quirks_mode_) {
+  if (UNLIKELY(quirks_mode_)) {
     box_states_->LineBoxState().EnsureTextMetrics(*item.Style(),
                                                   baseline_type_);
   }
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.h b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.h
index 42750b8..99a69768 100644
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.h
+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm.h
@@ -69,6 +69,9 @@
   NGInlineBoxState* HandleOpenTag(const NGInlineItem&,
                                   const NGInlineItemResult&,
                                   NGInlineLayoutStateStack*) const;
+  NGInlineBoxState* HandleCloseTag(const NGInlineItem&,
+                                   const NGInlineItemResult&,
+                                   NGInlineBoxState*);
 
   void BidiReorder();
 
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm_test.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm_test.cc
index 73ab95e3..c8aacc3c 100644
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm_test.cc
+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_layout_algorithm_test.cc
@@ -52,22 +52,19 @@
   NGInlineChildLayoutContext context;
   scoped_refptr<NGLayoutResult> layout_result =
       inline_node.Layout(constraint_space, nullptr, &context);
-  auto* line1 =
-      ToNGPhysicalLineBoxFragment(layout_result->PhysicalFragment().get());
+  auto* line1 = ToNGPhysicalLineBoxFragment(layout_result->PhysicalFragment());
   EXPECT_FALSE(line1->BreakToken()->IsFinished());
 
   // Perform 2nd layout with the break token from the 1st line.
   scoped_refptr<NGLayoutResult> layout_result2 =
       inline_node.Layout(constraint_space, line1->BreakToken(), &context);
-  auto* line2 =
-      ToNGPhysicalLineBoxFragment(layout_result2->PhysicalFragment().get());
+  auto* line2 = ToNGPhysicalLineBoxFragment(layout_result2->PhysicalFragment());
   EXPECT_FALSE(line2->BreakToken()->IsFinished());
 
   // Perform 3rd layout with the break token from the 2nd line.
   scoped_refptr<NGLayoutResult> layout_result3 =
       inline_node.Layout(constraint_space, line2->BreakToken(), &context);
-  auto* line3 =
-      ToNGPhysicalLineBoxFragment(layout_result3->PhysicalFragment().get());
+  auto* line3 = ToNGPhysicalLineBoxFragment(layout_result3->PhysicalFragment());
   EXPECT_TRUE(line3->BreakToken()->IsFinished());
 }
 
@@ -188,8 +185,7 @@
       NGConstraintSpace::CreateFromLayoutObject(*block_flow);
   scoped_refptr<NGLayoutResult> layout_result = block_node.Layout(space);
 
-  auto* block_box =
-      ToNGPhysicalBoxFragment(layout_result->PhysicalFragment().get());
+  auto* block_box = ToNGPhysicalBoxFragment(layout_result->PhysicalFragment());
   EXPECT_TRUE(layout_result->BfcBlockOffset().has_value());
   EXPECT_EQ(0, layout_result->BfcBlockOffset().value());
   EXPECT_EQ(0, layout_result->BfcLineOffset());
@@ -223,8 +219,7 @@
   scoped_refptr<NGLayoutResult> layout_result =
       inline_node.Layout(space, nullptr, &context);
 
-  auto* line =
-      ToNGPhysicalLineBoxFragment(layout_result->PhysicalFragment().get());
+  auto* line = ToNGPhysicalLineBoxFragment(layout_result->PhysicalFragment());
   EXPECT_EQ(LayoutUnit(96), line->Size().height);
   NGPhysicalOffset img_offset = line->Children()[0].Offset();
   EXPECT_EQ(LayoutUnit(0), img_offset.top);
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node_test.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node_test.cc
index d095df47..56896e03 100644
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node_test.cc
+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node_test.cc
@@ -115,7 +115,7 @@
             .Layout();
 
     const NGPhysicalLineBoxFragment* line =
-        ToNGPhysicalLineBoxFragment(result->PhysicalFragment().get());
+        ToNGPhysicalLineBoxFragment(result->PhysicalFragment());
     for (const auto& child : line->Children()) {
       fragments_out->push_back(ToNGPhysicalTextFragment(child.get()));
     }
@@ -473,7 +473,7 @@
   unsigned item_count_before = Items().size();
 
   Element* parent = ToElement(layout_block_flow_->GetNode());
-  Element* span = GetDocument().CreateRawElement(HTMLNames::spanTag);
+  Element* span = GetDocument().CreateRawElement(html_names::kSpanTag);
   parent->appendChild(span);
 
   // NeedsCollectInlines() is marked during the layout.
@@ -499,7 +499,7 @@
 
   Element* parent = GetElementById("x");
   ASSERT_TRUE(parent);
-  Element* span = GetDocument().CreateRawElement(HTMLNames::spanTag);
+  Element* span = GetDocument().CreateRawElement(html_names::kSpanTag);
   parent->appendChild(span);
 
   // NeedsCollectInlines() is marked during the layout.
@@ -544,7 +544,7 @@
   unsigned item_count_before = Items().size();
 
   Element* parent = ToElement(layout_block_flow_->GetNode());
-  Element* span = GetDocument().CreateRawElement(HTMLNames::spanTag);
+  Element* span = GetDocument().CreateRawElement(html_names::kSpanTag);
   parent->appendChild(span);
 
   // NeedsCollectInlines() is marked during the layout.
@@ -609,7 +609,7 @@
   unsigned item_count_before = Items().size();
 
   Element* parent = ToElement(layout_block_flow_->GetNode());
-  Element* span = GetDocument().CreateRawElement(HTMLNames::spanTag);
+  Element* span = GetDocument().CreateRawElement(html_names::kSpanTag);
   parent->appendChild(span);
 
   // NeedsCollectInlines() is marked during the layout.
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_line_box_fragment_builder.h b/third_party/blink/renderer/core/layout/ng/inline/ng_line_box_fragment_builder.h
index b09a19e..6ccf142f 100644
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_line_box_fragment_builder.h
+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_line_box_fragment_builder.h
@@ -121,8 +121,7 @@
     bool HasBidiLevel() const { return bidi_level != 0xff; }
     bool IsPlaceholder() const { return !HasFragment() && !HasBidiLevel(); }
     const NGPhysicalFragment* PhysicalFragment() const {
-      return layout_result ? layout_result->PhysicalFragment().get()
-                           : fragment.get();
+      return layout_result ? layout_result->PhysicalFragment() : fragment.get();
     }
   };
 
@@ -139,6 +138,7 @@
     }
 
     Child& operator[](wtf_size_t i) { return children_[i]; }
+    const Child& operator[](wtf_size_t i) const { return children_[i]; }
 
     wtf_size_t size() const { return children_.size(); }
     bool IsEmpty() const { return children_.IsEmpty(); }
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc
index a9fe6fb3..6dd39e14 100644
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc
+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_line_breaker.cc
@@ -447,7 +447,9 @@
   item_result->inline_size = shape_result->SnappedWidth().ClampNegativeToZero();
   item_result->end_offset = result.break_offset;
   item_result->shape_result = std::move(shape_result);
-  DCHECK_GT(item_result->end_offset, item_result->start_offset);
+  // It is critical to move offset forward, or NGLineBreaker may keep adding
+  // NGInlineItemResult until all the memory is consumed.
+  CHECK_GT(item_result->end_offset, item_result->start_offset) << Text();
 
   // * If width <= available_width:
   //   * If offset < item.EndOffset(): the break opportunity to fit is found.
@@ -943,9 +945,7 @@
     // line boxes to be zero-height, tests indicate that only inline direction
     // of them do so. See should_create_line_box_.
     // Force to create a box, because such inline boxes affect line heights.
-    if (!item_result->should_create_line_box &&
-        (item_result->inline_size ||
-         (item_result->margins.inline_start && !in_line_height_quirks_mode_)))
+    if (!item_result->should_create_line_box && !item.IsEmptyItem())
       item_result->should_create_line_box = true;
   }
 
@@ -968,9 +968,7 @@
         margins.inline_end + borders.inline_end + paddings.inline_end;
     position_ += item_result->inline_size;
 
-    if (!item_result->should_create_line_box &&
-        (item_result->inline_size ||
-         (margins.inline_end && !in_line_height_quirks_mode_)))
+    if (!item_result->should_create_line_box && !item.IsEmptyItem())
       item_result->should_create_line_box = true;
   }
   DCHECK(item.GetLayoutObject() && item.GetLayoutObject()->Parent());
diff --git a/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow.cc b/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow.cc
index 9cdb5ca..e797cb56 100644
--- a/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow.cc
+++ b/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow.cc
@@ -70,7 +70,7 @@
     descendant.node.UseOldOutOfFlowPositioning();
 
   const NGPhysicalBoxFragment* fragment =
-      ToNGPhysicalBoxFragment(result->PhysicalFragment().get());
+      ToNGPhysicalBoxFragment(result->PhysicalFragment());
 
   // This object has already been positioned in legacy layout by our containing
   // block. Copy the position and place the fragment.
@@ -241,8 +241,8 @@
        result->OutOfFlowPositionedDescendants())
     descendant.node.UseOldOutOfFlowPositioning();
 
-  scoped_refptr<const NGPhysicalBoxFragment> fragment =
-      ToNGPhysicalBoxFragment(result->PhysicalFragment().get());
+  const NGPhysicalBoxFragment* fragment =
+      ToNGPhysicalBoxFragment(result->PhysicalFragment());
   DCHECK_GT(fragment->Children().size(), 0u);
   // Copy sizes of all child fragments to Legacy.
   // There could be multiple fragments, when this node has descendants whose
diff --git a/third_party/blink/renderer/core/layout/ng/layout_ng_flexible_box.cc b/third_party/blink/renderer/core/layout/ng/layout_ng_flexible_box.cc
index 80f9623..da796ec 100644
--- a/third_party/blink/renderer/core/layout/ng/layout_ng_flexible_box.cc
+++ b/third_party/blink/renderer/core/layout/ng/layout_ng_flexible_box.cc
@@ -33,7 +33,7 @@
     descendant.node.UseOldOutOfFlowPositioning();
 
   const NGPhysicalBoxFragment* fragment =
-      ToNGPhysicalBoxFragment(result->PhysicalFragment().get());
+      ToNGPhysicalBoxFragment(result->PhysicalFragment());
 
   // Pasted from layout_ng_block_flow. TODO(dgrogan): Factor a utility method.
   const LayoutBlock* containing_block = ContainingBlock();
diff --git a/third_party/blink/renderer/core/layout/ng/layout_ng_mixin.cc b/third_party/blink/renderer/core/layout/ng/layout_ng_mixin.cc
index 7858c06..7c20c57e8 100644
--- a/third_party/blink/renderer/core/layout/ng/layout_ng_mixin.cc
+++ b/third_party/blink/renderer/core/layout/ng/layout_ng_mixin.cc
@@ -62,7 +62,7 @@
 template <typename Base>
 const NGPhysicalBoxFragment* LayoutNGMixin<Base>::CurrentFragment() const {
   if (cached_result_)
-    return ToNGPhysicalBoxFragment(cached_result_->PhysicalFragment().get());
+    return ToNGPhysicalBoxFragment(cached_result_->PhysicalFragment());
   return nullptr;
 }
 
diff --git a/third_party/blink/renderer/core/layout/ng/layout_ng_table_cell.cc b/third_party/blink/renderer/core/layout/ng/layout_ng_table_cell.cc
index 8a6125e8..7db04f9 100644
--- a/third_party/blink/renderer/core/layout/ng/layout_ng_table_cell.cc
+++ b/third_party/blink/renderer/core/layout/ng/layout_ng_table_cell.cc
@@ -33,7 +33,7 @@
     descendant.node.UseOldOutOfFlowPositioning();
 
   const NGPhysicalBoxFragment* fragment =
-      ToNGPhysicalBoxFragment(result->PhysicalFragment().get());
+      ToNGPhysicalBoxFragment(result->PhysicalFragment());
 
   const LayoutBox* section = LocationContainer();
   NGPhysicalOffset physical_offset;
diff --git a/third_party/blink/renderer/core/layout/ng/ng_base_layout_algorithm_test.cc b/third_party/blink/renderer/core/layout/ng/ng_base_layout_algorithm_test.cc
index fa48c1f..2d5f71b 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_base_layout_algorithm_test.cc
+++ b/third_party/blink/renderer/core/layout/ng/ng_base_layout_algorithm_test.cc
@@ -37,9 +37,8 @@
 
   scoped_refptr<NGLayoutResult> result =
       NGBlockLayoutAlgorithm(node, space).Layout();
-  return std::make_pair(
-      ToNGPhysicalBoxFragment(result->PhysicalFragment().get()),
-      std::move(space));
+  return std::make_pair(ToNGPhysicalBoxFragment(result->PhysicalFragment()),
+                        std::move(space));
 }
 
 scoped_refptr<const NGPhysicalBoxFragment>
diff --git a/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm_test.cc b/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm_test.cc
index a5d521b..fc7a4a8 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm_test.cc
+++ b/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm_test.cc
@@ -39,7 +39,7 @@
     scoped_refptr<NGLayoutResult> result =
         NGBlockLayoutAlgorithm(node, space).Layout();
 
-    return ToNGPhysicalBoxFragment(result->PhysicalFragment().get());
+    return ToNGPhysicalBoxFragment(result->PhysicalFragment());
   }
 
   MinMaxSize RunComputeMinAndMax(NGBlockNode node) {
diff --git a/third_party/blink/renderer/core/layout/ng/ng_block_node.cc b/third_party/blink/renderer/core/layout/ng/ng_block_node.cc
index 90380e1..67252bb 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_block_node.cc
+++ b/third_party/blink/renderer/core/layout/ng/ng_block_node.cc
@@ -582,6 +582,7 @@
   UpdateShapeOutsideInfoIfNeeded(
       constraint_space.PercentageResolutionSize().inline_size);
 
+  // Overflow computation depends on this being set.
   if (box_->IsLayoutBlockFlow()) {
     LayoutBlockFlow* block_flow = ToLayoutBlockFlow(box_);
     block_flow->UpdateIsSelfCollapsing();
diff --git a/third_party/blink/renderer/core/layout/ng/ng_column_layout_algorithm.cc b/third_party/blink/renderer/core/layout/ng/ng_column_layout_algorithm.cc
index 5ddfb1f..079df8e 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_column_layout_algorithm.cc
+++ b/third_party/blink/renderer/core/layout/ng/ng_column_layout_algorithm.cc
@@ -116,8 +116,8 @@
                                              break_token.get());
       child_algorithm.SetBoxType(NGPhysicalFragment::kColumnBox);
       scoped_refptr<NGLayoutResult> result = child_algorithm.Layout();
-      scoped_refptr<const NGPhysicalBoxFragment> column(
-          ToNGPhysicalBoxFragment(result->PhysicalFragment().get()));
+      const NGPhysicalBoxFragment* column =
+          ToNGPhysicalBoxFragment(result->PhysicalFragment());
 
       NGLogicalOffset logical_offset(column_inline_offset, column_block_offset);
       container_builder_.AddChild(*result, logical_offset);
diff --git a/third_party/blink/renderer/core/layout/ng/ng_column_layout_algorithm_test.cc b/third_party/blink/renderer/core/layout/ng/ng_column_layout_algorithm_test.cc
index ce4ee45..9c2e939 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_column_layout_algorithm_test.cc
+++ b/third_party/blink/renderer/core/layout/ng/ng_column_layout_algorithm_test.cc
@@ -33,7 +33,7 @@
     scoped_refptr<NGLayoutResult> result =
         NGBlockLayoutAlgorithm(node, space).Layout();
 
-    return ToNGPhysicalBoxFragment(result->PhysicalFragment().get());
+    return ToNGPhysicalBoxFragment(result->PhysicalFragment());
   }
 
   scoped_refptr<const NGPhysicalBoxFragment> RunBlockLayoutAlgorithm(
diff --git a/third_party/blink/renderer/core/layout/ng/ng_fieldset_layout_algorithm_test.cc b/third_party/blink/renderer/core/layout/ng/ng_fieldset_layout_algorithm_test.cc
index 22ce230d..1172302 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_fieldset_layout_algorithm_test.cc
+++ b/third_party/blink/renderer/core/layout/ng/ng_fieldset_layout_algorithm_test.cc
@@ -35,7 +35,7 @@
     scoped_refptr<NGLayoutResult> result =
         NGBlockLayoutAlgorithm(node, space).Layout();
 
-    return ToNGPhysicalBoxFragment(result->PhysicalFragment().get());
+    return ToNGPhysicalBoxFragment(result->PhysicalFragment());
   }
 
   scoped_refptr<const NGPhysicalBoxFragment> RunBlockLayoutAlgorithm(
diff --git a/third_party/blink/renderer/core/layout/ng/ng_floats_utils.cc b/third_party/blink/renderer/core/layout/ng/ng_floats_utils.cc
index d77e254..9b91c8ab 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_floats_utils.cc
+++ b/third_party/blink/renderer/core/layout/ng/ng_floats_utils.cc
@@ -214,7 +214,7 @@
       unpositioned_float);
   DCHECK(unpositioned_float->layout_result);
 
-  const auto& fragment = unpositioned_float->layout_result->PhysicalFragment();
+  const auto* fragment = unpositioned_float->layout_result->PhysicalFragment();
   DCHECK(fragment);
   DCHECK(!fragment->BreakToken() || fragment->BreakToken()->IsFinished());
 
diff --git a/third_party/blink/renderer/core/layout/ng/ng_layout_result.h b/third_party/blink/renderer/core/layout/ng/ng_layout_result.h
index e16c675..f2eb0ee 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_layout_result.h
+++ b/third_party/blink/renderer/core/layout/ng/ng_layout_result.h
@@ -43,7 +43,7 @@
   NGLayoutResult(const NGLayoutResult&);
   ~NGLayoutResult();
 
-  scoped_refptr<const NGPhysicalFragment> PhysicalFragment() const {
+  const NGPhysicalFragment* PhysicalFragment() const {
     return root_fragment_.get();
   }
   NGPhysicalOffset Offset() const { return root_fragment_.Offset(); }
diff --git a/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.cc b/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.cc
index 8da4229..c86f0d9 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.cc
+++ b/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.cc
@@ -362,7 +362,7 @@
     layout_result = GenerateFragment(descendant.node, container_info,
                                      block_estimate, node_position);
 
-    DCHECK(layout_result->PhysicalFragment().get());
+    DCHECK(layout_result->PhysicalFragment());
     NGFragment fragment(descendant_writing_mode,
                         *layout_result->PhysicalFragment());
 
diff --git a/third_party/blink/renderer/core/layout/ng/ng_page_layout_algorithm.cc b/third_party/blink/renderer/core/layout/ng/ng_page_layout_algorithm.cc
index 26d6ab14..27f763c 100644
--- a/third_party/blink/renderer/core/layout/ng/ng_page_layout_algorithm.cc
+++ b/third_party/blink/renderer/core/layout/ng/ng_page_layout_algorithm.cc
@@ -52,8 +52,8 @@
     NGBlockLayoutAlgorithm child_algorithm(Node(), child_space,
                                            break_token.get());
     scoped_refptr<NGLayoutResult> result = child_algorithm.Layout();
-    scoped_refptr<const NGPhysicalBoxFragment> page(
-        ToNGPhysicalBoxFragment(result->PhysicalFragment().get()));
+    const NGPhysicalBoxFragment* page =
+        ToNGPhysicalBoxFragment(result->PhysicalFragment());
 
     container_builder_.AddChild(*result, page_offset);
 
diff --git a/third_party/blink/renderer/core/layout/scroll_anchor_test.cc b/third_party/blink/renderer/core/layout/scroll_anchor_test.cc
index 95aacab..def540d 100644
--- a/third_party/blink/renderer/core/layout/scroll_anchor_test.cc
+++ b/third_party/blink/renderer/core/layout/scroll_anchor_test.cc
@@ -51,7 +51,7 @@
   }
 
   void SetHeight(Element* element, int height) {
-    element->setAttribute(HTMLNames::styleAttr,
+    element->setAttribute(html_names::kStyleAttr,
                           AtomicString(String::Format("height: %dpx", height)));
     Update();
   }
@@ -268,7 +268,7 @@
   ScrollableArea* viewport = LayoutViewport();
   ScrollLayoutViewport(ScrollOffset(0, 100));
 
-  GetDocument().getElementById("block1")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("block1")->setAttribute(html_names::kStyleAttr,
                                                        "height: 50.6px");
   Update();
 
@@ -286,7 +286,7 @@
   ScrollableArea* viewport = LayoutViewport();
   ScrollLayoutViewport(ScrollOffset(0, 60));
 
-  GetDocument().getElementById("block1")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("block1")->setAttribute(html_names::kStyleAttr,
                                                        "height: 100px");
   Update();
 
@@ -427,7 +427,7 @@
   Element* scroller = GetDocument().getElementById("scroller");
   scroller->setScrollTop(100);
 
-  GetDocument().getElementById("spacer")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("spacer")->setAttribute(html_names::kStyleAttr,
                                                        "margin-top: 50px");
   Update();
   EXPECT_EQ(100, ScrollerForElement(scroller)->ScrollOffsetInt().Height());
diff --git a/third_party/blink/renderer/core/layout/scrollbars_test.cc b/third_party/blink/renderer/core/layout/scrollbars_test.cc
index da69973..d9a86a7 100644
--- a/third_party/blink/renderer/core/layout/scrollbars_test.cc
+++ b/third_party/blink/renderer/core/layout/scrollbars_test.cc
@@ -412,8 +412,8 @@
   DCHECK(!scrollable_root->HorizontalScrollbar());
 
   // Set display:none.
-  div->setAttribute(HTMLNames::classAttr, "noscrollbars");
-  document.body()->setAttribute(HTMLNames::classAttr, "noscrollbars");
+  div->setAttribute(html_names::kClassAttr, "noscrollbars");
+  document.body()->setAttribute(html_names::kClassAttr, "noscrollbars");
   Compositor().BeginFrame();
 
   EXPECT_TRUE(scrollable_div->VerticalScrollbar());
@@ -1264,7 +1264,7 @@
   DCHECK(!div_scrollable->VerticalScrollbar()->IsOverlayScrollbar());
   DCHECK(!div_scrollable->VerticalScrollbar()->GetTheme().IsMockTheme());
 
-  div->setAttribute(HTMLNames::classAttr, "custom");
+  div->setAttribute(html_names::kClassAttr, "custom");
   Compositor().BeginFrame();
 
   EXPECT_TRUE(div_scrollable->VerticalScrollbar()->IsCustomScrollbar());
@@ -1999,7 +1999,7 @@
   EXPECT_FALSE(scrollable_div->ScrollbarsHiddenIfOverlay());
 
   // Set display:none calls Dispose().
-  div->setAttribute(HTMLNames::classAttr, "hide");
+  div->setAttribute(html_names::kClassAttr, "hide");
   Compositor().BeginFrame();
 
   // After paint layer in scrollable dispose, we can still call scrollbar hidden
@@ -2045,7 +2045,7 @@
   GraphicsLayer* graphics_layer = scrollable_div->LayerForScrolling();
   ASSERT_TRUE(graphics_layer);
 
-  div->setAttribute(HTMLNames::classAttr, "hide");
+  div->setAttribute(html_names::kClassAttr, "hide");
   document.UpdateStyleAndLayout();
 
   EXPECT_FALSE(paint_layer->GetScrollableArea());
diff --git a/third_party/blink/renderer/core/layout/svg/layout_svg_root.cc b/third_party/blink/renderer/core/layout/svg/layout_svg_root.cc
index 12f9895a..9047e4a0 100644
--- a/third_party/blink/renderer/core/layout/svg/layout_svg_root.cc
+++ b/third_party/blink/renderer/core/layout/svg/layout_svg_root.cc
@@ -192,18 +192,6 @@
   const bool viewport_may_have_changed =
       SelfNeedsLayout() || old_size != Size();
 
-  // The scale of one or more of the SVG elements may have changed, content
-  // (the entire SVG) could have moved or new content may have been exposed, so
-  // mark the entire subtree as needing paint invalidation checking.
-  if (transform_change != SVGTransformChange::kNone ||
-      viewport_may_have_changed) {
-    SetSubtreeShouldCheckForPaintInvalidation();
-    SetNeedsPaintPropertyUpdate();
-
-    if (Layer())
-      Layer()->SetNeedsCompositingInputsUpdate();
-  }
-
   SVGSVGElement* svg = ToSVGSVGElement(GetNode());
   DCHECK(svg);
   // When hasRelativeLengths() is false, no descendants have relative lengths
@@ -220,6 +208,7 @@
     needs_boundaries_or_transform_update_ = false;
   }
 
+  const auto& old_overflow_rect = VisualOverflowRect();
   overflow_.reset();
   AddVisualEffectOverflow();
 
@@ -230,6 +219,17 @@
     AddContentsVisualOverflow(EnclosingLayoutRect(content_visual_rect));
   }
 
+  // The scale of one or more of the SVG elements may have changed, content
+  // (the entire SVG) could have moved or new content may have been exposed, so
+  // mark the entire subtree as needing paint invalidation checking.
+  if (transform_change != SVGTransformChange::kNone ||
+      viewport_may_have_changed || old_overflow_rect != VisualOverflowRect()) {
+    SetSubtreeShouldCheckForPaintInvalidation();
+    SetNeedsPaintPropertyUpdate();
+    if (Layer())
+      Layer()->SetNeedsCompositingInputsUpdate();
+  }
+
   UpdateAfterLayout();
   has_box_decoration_background_ = IsDocumentElement()
                                        ? StyleRef().HasBoxDecorationBackground()
diff --git a/third_party/blink/renderer/core/layout/svg/layout_svg_root_test.cc b/third_party/blink/renderer/core/layout/svg/layout_svg_root_test.cc
index e310f9c..3887f1e 100644
--- a/third_party/blink/renderer/core/layout/svg/layout_svg_root_test.cc
+++ b/third_party/blink/renderer/core/layout/svg/layout_svg_root_test.cc
@@ -7,7 +7,9 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/renderer/core/layout/svg/layout_svg_shape.h"
 #include "third_party/blink/renderer/core/layout/svg/svg_layout_support.h"
+#include "third_party/blink/renderer/core/paint/paint_layer.h"
 #include "third_party/blink/renderer/core/testing/core_unit_test_helper.h"
+#include "third_party/blink/renderer/platform/graphics/graphics_layer.h"
 
 namespace blink {
 
@@ -41,6 +43,29 @@
   EXPECT_EQ(LayoutRect(0, 0, 220, 190), rect);
 }
 
+TEST_F(LayoutSVGRootTest, VisualOverflowExpandsLayer) {
+  EnableCompositing();
+  SetBodyInnerHTML(R"HTML(
+    <svg id='root' style='width: 100px; will-change: transform; height:
+    100px; overflow: visible; position: absolute;'>
+       <rect id='rect' x='0' y='0' width='100' height='100'/>
+    </svg>
+  )HTML");
+
+  const LayoutSVGRoot& root =
+      *ToLayoutSVGRoot(GetLayoutObjectByElementId("root"));
+  auto* paint_layer = root.Layer();
+  ASSERT_TRUE(paint_layer);
+  auto* graphics_layer = paint_layer->GraphicsLayerBacking(&root);
+  ASSERT_TRUE(graphics_layer);
+  EXPECT_EQ(graphics_layer->Size(), gfx::Size(100, 100));
+
+  GetDocument().getElementById("rect")->setAttribute("height", "200");
+  GetDocument().View()->UpdateAllLifecyclePhases();
+
+  EXPECT_EQ(graphics_layer->Size(), gfx::Size(100, 200));
+}
+
 TEST_F(LayoutSVGRootTest, VisualRectMappingWithViewportClipAndBorder) {
   SetBodyInnerHTML(R"HTML(
     <svg id='root' style='border: 10px solid red; width: 200px; height:
diff --git a/third_party/blink/renderer/core/layout/text_autosizer_test.cc b/third_party/blink/renderer/core/layout/text_autosizer_test.cc
index e0c52fa..0765577 100644
--- a/third_party/blink/renderer/core/layout/text_autosizer_test.cc
+++ b/third_party/blink/renderer/core/layout/text_autosizer_test.cc
@@ -158,28 +158,28 @@
   EXPECT_FLOAT_EQ(
       40.f, autosized_div->GetLayoutObject()->StyleRef().ComputedFontSize());
 
-  autosized_div->setAttribute(HTMLNames::classAttr, "none");
+  autosized_div->setAttribute(html_names::kClassAttr, "none");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_FLOAT_EQ(
       16.f, autosized_div->GetLayoutObject()->StyleRef().SpecifiedFontSize());
   EXPECT_FLOAT_EQ(
       16.f, autosized_div->GetLayoutObject()->StyleRef().ComputedFontSize());
 
-  autosized_div->setAttribute(HTMLNames::classAttr, "small");
+  autosized_div->setAttribute(html_names::kClassAttr, "small");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_FLOAT_EQ(
       16.f, autosized_div->GetLayoutObject()->StyleRef().SpecifiedFontSize());
   EXPECT_FLOAT_EQ(
       8.f, autosized_div->GetLayoutObject()->StyleRef().ComputedFontSize());
 
-  autosized_div->setAttribute(HTMLNames::classAttr, "large");
+  autosized_div->setAttribute(html_names::kClassAttr, "large");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_FLOAT_EQ(
       16.f, autosized_div->GetLayoutObject()->StyleRef().SpecifiedFontSize());
   EXPECT_FLOAT_EQ(
       24.f, autosized_div->GetLayoutObject()->StyleRef().ComputedFontSize());
 
-  autosized_div->removeAttribute(HTMLNames::classAttr);
+  autosized_div->removeAttribute(html_names::kClassAttr);
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_FLOAT_EQ(
       16.f, autosized_div->GetLayoutObject()->StyleRef().SpecifiedFontSize());
diff --git a/third_party/blink/renderer/core/loader/form_submission.cc b/third_party/blink/renderer/core/loader/form_submission.cc
index a1693b1..01f87e81 100644
--- a/third_party/blink/renderer/core/loader/form_submission.cc
+++ b/third_party/blink/renderer/core/loader/form_submission.cc
@@ -51,7 +51,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 static int64_t GenerateFormDataIdentifier() {
   // Initialize to the current time to reduce the likelihood of generating
@@ -181,16 +181,16 @@
   copied_attributes.CopyFrom(attributes);
   if (submit_button) {
     AtomicString attribute_value;
-    if (!(attribute_value = submit_button->FastGetAttribute(formactionAttr))
+    if (!(attribute_value = submit_button->FastGetAttribute(kFormactionAttr))
              .IsNull())
       copied_attributes.ParseAction(attribute_value);
-    if (!(attribute_value = submit_button->FastGetAttribute(formenctypeAttr))
+    if (!(attribute_value = submit_button->FastGetAttribute(kFormenctypeAttr))
              .IsNull())
       copied_attributes.UpdateEncodingType(attribute_value);
-    if (!(attribute_value = submit_button->FastGetAttribute(formmethodAttr))
+    if (!(attribute_value = submit_button->FastGetAttribute(kFormmethodAttr))
              .IsNull())
       copied_attributes.UpdateMethodType(attribute_value);
-    if (!(attribute_value = submit_button->FastGetAttribute(formtargetAttr))
+    if (!(attribute_value = submit_button->FastGetAttribute(kFormtargetAttr))
              .IsNull())
       copied_attributes.SetTarget(attribute_value);
   }
diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context_test.cc b/third_party/blink/renderer/core/loader/frame_fetch_context_test.cc
index 9f22a8c..ceda90f2 100644
--- a/third_party/blink/renderer/core/loader/frame_fetch_context_test.cc
+++ b/third_party/blink/renderer/core/loader/frame_fetch_context_test.cc
@@ -407,7 +407,7 @@
       return;
     }
 
-    iframe->setAttribute(HTMLNames::cspAttr, potential_value);
+    iframe->setAttribute(html_names::kCspAttr, potential_value);
     document->GetFrame()->SetOwner(iframe);
   }
 
diff --git a/third_party/blink/renderer/core/loader/frame_loader.cc b/third_party/blink/renderer/core/loader/frame_loader.cc
index f34dabb9..8a919b3 100644
--- a/third_party/blink/renderer/core/loader/frame_loader.cc
+++ b/third_party/blink/renderer/core/loader/frame_loader.cc
@@ -116,7 +116,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 bool IsBackForwardLoadType(WebFrameLoadType type) {
   return type == WebFrameLoadType::kBackForward;
@@ -1141,7 +1141,7 @@
 SubstituteData FrameLoader::DefaultSubstituteDataForURL(const KURL& url) {
   if (!ShouldTreatURLAsSrcdocDocument(url))
     return SubstituteData();
-  String srcdoc = frame_->DeprecatedLocalOwner()->FastGetAttribute(srcdocAttr);
+  String srcdoc = frame_->DeprecatedLocalOwner()->FastGetAttribute(kSrcdocAttr);
   DCHECK(!srcdoc.IsNull());
   CString encoded_srcdoc = srcdoc.Utf8();
   return SubstituteData(
@@ -1603,7 +1603,7 @@
   HTMLFrameOwnerElement* owner_element = frame_->DeprecatedLocalOwner();
   if (!IsHTMLIFrameElement(owner_element))
     return false;
-  return owner_element->FastHasAttribute(srcdocAttr);
+  return owner_element->FastHasAttribute(kSrcdocAttr);
 }
 
 void FrameLoader::DispatchDocumentElementAvailable() {
diff --git a/third_party/blink/renderer/core/loader/image_loader.cc b/third_party/blink/renderer/core/loader/image_loader.cc
index 6efd35e..4dad4301 100644
--- a/third_party/blink/renderer/core/loader/image_loader.cc
+++ b/third_party/blink/renderer/core/loader/image_loader.cc
@@ -85,17 +85,17 @@
     return false;
 
   if (EqualIgnoringASCIICase(
-          html_image->FastGetAttribute(HTMLNames::lazyloadAttr), "off") &&
+          html_image->FastGetAttribute(html_names::kLazyloadAttr), "off") &&
       !frame->GetDocument()->IsLazyLoadPolicyEnforced()) {
     return false;
   }
   // Avoid lazyloading if width and height attributes are small. This
   // heuristic helps avoid double fetching tracking pixels.
   double width, height;
-  if (GetAbsoluteDimensionValue(html_image->getAttribute(HTMLNames::widthAttr),
-                                &width) &&
-      GetAbsoluteDimensionValue(html_image->getAttribute(HTMLNames::heightAttr),
-                                &height) &&
+  if (GetAbsoluteDimensionValue(
+          html_image->getAttribute(html_names::kWidthAttr), &width) &&
+      GetAbsoluteDimensionValue(
+          html_image->getAttribute(html_names::kHeightAttr), &height) &&
       width <= kMinDimensionToLazyLoad && height <= kMinDimensionToLazyLoad) {
     return false;
   }
@@ -367,7 +367,7 @@
     params.SetContentSecurityCheck(kDoNotCheckContentSecurityPolicy);
 
   CrossOriginAttributeValue cross_origin = GetCrossOriginAttributeValue(
-      element.FastGetAttribute(HTMLNames::crossoriginAttr));
+      element.FastGetAttribute(html_names::kCrossoriginAttr));
   if (cross_origin != kCrossOriginAttributeNotSet) {
     params.SetCrossOriginAccessControl(
         element.GetDocument().GetSecurityOrigin(), cross_origin);
@@ -376,7 +376,7 @@
   if (RuntimeEnabledFeatures::PriorityHintsEnabled()) {
     mojom::FetchImportanceMode importance_mode =
         GetFetchImportanceAttributeValue(
-            element.FastGetAttribute(HTMLNames::importanceAttr));
+            element.FastGetAttribute(html_names::kImportanceAttr));
     params.SetFetchImportanceMode(importance_mode);
   }
 
@@ -478,7 +478,7 @@
 
     // Correct the RequestContext if necessary.
     if (IsHTMLPictureElement(GetElement()->parentNode()) ||
-        !GetElement()->FastGetAttribute(HTMLNames::srcsetAttr).IsNull()) {
+        !GetElement()->FastGetAttribute(html_names::kSrcsetAttr).IsNull()) {
       resource_request.SetRequestContext(mojom::RequestContextType::IMAGE_SET);
     } else if (IsHTMLObjectElement(GetElement())) {
       resource_request.SetRequestContext(mojom::RequestContextType::OBJECT);
diff --git a/third_party/blink/renderer/core/page/chrome_client_test.cc b/third_party/blink/renderer/core/page/chrome_client_test.cc
index baf63b2..6ecf7bd 100644
--- a/third_party/blink/renderer/core/page/chrome_client_test.cc
+++ b/third_party/blink/renderer/core/page/chrome_client_test.cc
@@ -42,8 +42,8 @@
   HitTestLocation location(LayoutPoint(10, 20));
   HitTestResult result(HitTestRequest(HitTestRequest::kMove), location);
   Document* doc = Document::CreateForTest();
-  Element* element = HTMLElement::Create(HTMLNames::divTag, *doc);
-  element->setAttribute(HTMLNames::titleAttr, "tooltip");
+  Element* element = HTMLElement::Create(html_names::kDivTag, *doc);
+  element->setAttribute(html_names::kTitleAttr, "tooltip");
   result.SetInnerNode(element);
 
   client->SetToolTip(*doc->GetFrame(), location, result);
@@ -63,7 +63,7 @@
   EXPECT_EQ(String(), logger.ToolTipForLastSetToolTip());
 
   logger.ClearToolTipForLastSetToolTip();
-  element->setAttribute(HTMLNames::titleAttr, "updated");
+  element->setAttribute(html_names::kTitleAttr, "updated");
   client->SetToolTip(*doc->GetFrame(), location, result);
   // setToolTip(String,TextDirection) should be called because tooltip string
   // is different from the last one.
@@ -76,24 +76,24 @@
   HitTestResult result(HitTestRequest(HitTestRequest::kMove), location);
   auto& doc = *Document::CreateForTest();
   auto& input_element = *HTMLInputElement::Create(doc, CreateElementFlags());
-  input_element.setAttribute(HTMLNames::typeAttr, "file");
+  input_element.setAttribute(html_names::kTypeAttr, "file");
 
   result.SetInnerNode(&input_element);
   client->SetToolTip(*doc.GetFrame(), location, result);
   EXPECT_EQ("<<NoFileChosenLabel>>", client->last_tool_tip_text_);
 
   client->last_tool_tip_text_ = String();
-  input_element.removeAttribute(HTMLNames::titleAttr);
+  input_element.removeAttribute(html_names::kTitleAttr);
   client->SetToolTip(*doc.GetFrame(), location, result);
   EXPECT_EQ("<<NoFileChosenLabel>>", client->last_tool_tip_text_);
 
   client->last_tool_tip_text_ = String();
-  input_element.setAttribute(HTMLNames::titleAttr, g_empty_atom);
+  input_element.setAttribute(html_names::kTitleAttr, g_empty_atom);
   client->SetToolTip(*doc.GetFrame(), location, result);
   EXPECT_EQ(g_empty_atom, client->last_tool_tip_text_);
 
   client->last_tool_tip_text_ = String();
-  input_element.setAttribute(HTMLNames::titleAttr, "test");
+  input_element.setAttribute(html_names::kTitleAttr, "test");
   client->SetToolTip(*doc.GetFrame(), location, result);
   EXPECT_EQ("test", client->last_tool_tip_text_);
 }
diff --git a/third_party/blink/renderer/core/page/context_menu_controller.cc b/third_party/blink/renderer/core/page/context_menu_controller.cc
index 7fae594..6e0f7b8 100644
--- a/third_party/blink/renderer/core/page/context_menu_controller.cc
+++ b/third_party/blink/renderer/core/page/context_menu_controller.cc
@@ -442,7 +442,7 @@
         selected_frame->GetSecurityContext()->GetSecurityOrigin();
     if (origin->CanReadContent(anchor->Url())) {
       data.suggested_filename =
-          anchor->FastGetAttribute(HTMLNames::downloadAttr);
+          anchor->FastGetAttribute(html_names::kDownloadAttr);
     }
 
     // If the anchor wants to suppress the referrer, update the referrerPolicy
@@ -455,11 +455,11 @@
 
   // Find the input field type.
   if (auto* input = ToHTMLInputElementOrNull(result.InnerNode())) {
-    if (input->type() == InputTypeNames::password)
+    if (input->type() == input_type_names::kPassword)
       data.input_field_type = WebContextMenuData::kInputFieldTypePassword;
-    else if (input->type() == InputTypeNames::number)
+    else if (input->type() == input_type_names::kNumber)
       data.input_field_type = WebContextMenuData::kInputFieldTypeNumber;
-    else if (input->type() == InputTypeNames::tel)
+    else if (input->type() == input_type_names::kTel)
       data.input_field_type = WebContextMenuData::kInputFieldTypeTelephone;
     else if (input->IsTextField())
       data.input_field_type = WebContextMenuData::kInputFieldTypePlainText;
diff --git a/third_party/blink/renderer/core/page/drag_controller.cc b/third_party/blink/renderer/core/page/drag_controller.cc
index 6bb7ca06..3ea6d0c 100644
--- a/third_party/blink/renderer/core/page/drag_controller.cc
+++ b/third_party/blink/renderer/core/page/drag_controller.cc
@@ -348,7 +348,7 @@
   DCHECK(node);
   for (; node; node = node->OwnerShadowHost()) {
     if (IsHTMLInputElement(*node) &&
-        ToHTMLInputElement(node)->type() == InputTypeNames::file)
+        ToHTMLInputElement(node)->type() == input_type_names::kFile)
       return ToHTMLInputElement(node);
   }
   return nullptr;
diff --git a/third_party/blink/renderer/core/page/focus_controller.cc b/third_party/blink/renderer/core/page/focus_controller.cc
index 3279eda..cce1ce13 100644
--- a/third_party/blink/renderer/core/page/focus_controller.cc
+++ b/third_party/blink/renderer/core/page/focus_controller.cc
@@ -62,8 +62,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 namespace {
 
 // This class defines the navigation order.
diff --git a/third_party/blink/renderer/core/page/print_context.cc b/third_party/blink/renderer/core/page/print_context.cc
index 7facebac..1cf8b1a 100644
--- a/third_party/blink/renderer/core/page/print_context.cc
+++ b/third_party/blink/renderer/core/page/print_context.cc
@@ -206,7 +206,8 @@
 
   if (!node->IsLink() || !node->IsElementNode())
     return;
-  const AtomicString& href = ToElement(node)->getAttribute(HTMLNames::hrefAttr);
+  const AtomicString& href =
+      ToElement(node)->getAttribute(html_names::kHrefAttr);
   if (href.IsNull())
     return;
   KURL url = node->GetDocument().CompleteURL(href);
diff --git a/third_party/blink/renderer/core/page/print_context_test.cc b/third_party/blink/renderer/core/page/print_context_test.cc
index 02bb322..5f1d016b 100644
--- a/third_party/blink/renderer/core/page/print_context_test.cc
+++ b/third_party/blink/renderer/core/page/print_context_test.cc
@@ -79,7 +79,7 @@
   PrintContext& GetPrintContext() { return *print_context_.Get(); }
 
   void SetBodyInnerHTML(String body_content) {
-    GetDocument().body()->setAttribute(HTMLNames::styleAttr, "margin: 0");
+    GetDocument().body()->setAttribute(html_names::kStyleAttr, "margin: 0");
     GetDocument().body()->SetInnerHTMLFromString(body_content);
   }
 
diff --git a/third_party/blink/renderer/core/page/scrolling/root_scroller_controller.cc b/third_party/blink/renderer/core/page/scrolling/root_scroller_controller.cc
index 388e2f7..a6e7a0b8 100644
--- a/third_party/blink/renderer/core/page/scrolling/root_scroller_controller.cc
+++ b/third_party/blink/renderer/core/page/scrolling/root_scroller_controller.cc
@@ -111,7 +111,9 @@
 }
 
 RootScrollerController::RootScrollerController(Document& document)
-    : document_(&document), effective_root_scroller_(&document) {}
+    : document_(&document),
+      effective_root_scroller_(&document),
+      document_has_document_element_(false) {}
 
 void RootScrollerController::Trace(blink::Visitor* visitor) {
   visitor->Trace(document_);
@@ -187,38 +189,50 @@
       new_effective_root_scroller = implicit_root_scroller_;
   }
 
-  if (effective_root_scroller_ == new_effective_root_scroller)
-    return;
+  // TODO(bokan): This is a terrible hack but required because the viewport
+  // apply scroll works on Elements rather than Nodes. If we're going from
+  // !documentElement to documentElement, we can't early out even if the root
+  // scroller didn't change since the global root scroller didn't have an
+  // Element previously to put it's ViewportScrollCallback onto. We need this
+  // to kick the global root scroller to recompute itself. We can remove this
+  // if ScrollCustomization is moved to the Node rather than Element.
+  bool old_has_document_element = document_has_document_element_;
+  document_has_document_element_ = document_->documentElement();
+
+  if (old_has_document_element || !document_has_document_element_) {
+    if (effective_root_scroller_ == new_effective_root_scroller)
+      return;
+  }
 
   Node* old_effective_root_scroller = effective_root_scroller_;
   effective_root_scroller_ = new_effective_root_scroller;
 
-  DCHECK(new_effective_root_scroller);
-  if (LayoutBoxModelObject* new_obj =
-          new_effective_root_scroller->GetLayoutBoxModelObject()) {
-    if (new_obj->Layer()) {
-      new_effective_root_scroller->GetLayoutBoxModelObject()
-          ->Layer()
-          ->SetNeedsCompositingInputsUpdate();
+  if (new_effective_root_scroller != old_effective_root_scroller) {
+    if (LayoutBoxModelObject* new_obj =
+            new_effective_root_scroller->GetLayoutBoxModelObject()) {
+      if (new_obj->Layer()) {
+        new_effective_root_scroller->GetLayoutBoxModelObject()
+            ->Layer()
+            ->SetNeedsCompositingInputsUpdate();
+      }
     }
-  }
-
-  DCHECK(old_effective_root_scroller);
-  if (LayoutBoxModelObject* old_obj =
-          old_effective_root_scroller->GetLayoutBoxModelObject()) {
-    if (old_obj->Layer()) {
-      old_effective_root_scroller->GetLayoutBoxModelObject()
-          ->Layer()
-          ->SetNeedsCompositingInputsUpdate();
+    if (old_effective_root_scroller) {
+      if (LayoutBoxModelObject* old_obj =
+              old_effective_root_scroller->GetLayoutBoxModelObject()) {
+        if (old_obj->Layer()) {
+          old_effective_root_scroller->GetLayoutBoxModelObject()
+              ->Layer()
+              ->SetNeedsCompositingInputsUpdate();
+        }
+      }
     }
+    if (auto* object = old_effective_root_scroller->GetLayoutObject())
+      object->SetIsEffectiveRootScroller(false);
+
+    if (auto* object = new_effective_root_scroller->GetLayoutObject())
+      object->SetIsEffectiveRootScroller(true);
   }
 
-  if (auto* object = old_effective_root_scroller->GetLayoutObject())
-    object->SetIsEffectiveRootScroller(false);
-
-  if (auto* object = new_effective_root_scroller->GetLayoutObject())
-    object->SetIsEffectiveRootScroller(true);
-
   ApplyRootScrollerProperties(*old_effective_root_scroller);
   ApplyRootScrollerProperties(*effective_root_scroller_);
 
@@ -405,6 +419,13 @@
       effective_root_scroller_);
 }
 
+bool RootScrollerController::ScrollsViewport(const Element& element) const {
+  if (effective_root_scroller_->IsDocumentNode())
+    return element == document_->documentElement();
+
+  return element == effective_root_scroller_.Get();
+}
+
 void RootScrollerController::ElementRemoved(const Element& element) {
   if (element != effective_root_scroller_.Get())
     return;
diff --git a/third_party/blink/renderer/core/page/scrolling/root_scroller_controller.h b/third_party/blink/renderer/core/page/scrolling/root_scroller_controller.h
index 07daee1e..cdffaa1 100644
--- a/third_party/blink/renderer/core/page/scrolling/root_scroller_controller.h
+++ b/third_party/blink/renderer/core/page/scrolling/root_scroller_controller.h
@@ -78,6 +78,13 @@
   // scroller.
   PaintLayer* RootScrollerPaintLayer() const;
 
+  // Used to determine which Element should scroll the viewport.  This is
+  // needed since Blink's scrolling machinery works on Elements whereas the
+  // document *Node* also scrolls so we need to designate an element one
+  // Element as the viewport scroller. Sadly, this is *not* the
+  // document.scrollingElement in general.
+  bool ScrollsViewport(const Element&) const;
+
   void ElementRemoved(const Element&);
 
   // In the "implicit root scroller" mode, we might promote an element to
@@ -155,6 +162,8 @@
   HeapHashSet<WeakMember<Element>> implicit_candidates_;
 
   WeakMember<Element> implicit_root_scroller_;
+
+  bool document_has_document_element_;
 };
 
 }  // namespace blink
diff --git a/third_party/blink/renderer/core/page/scrolling/root_scroller_test.cc b/third_party/blink/renderer/core/page/scrolling/root_scroller_test.cc
index 8bba5fc..090e705 100644
--- a/third_party/blink/renderer/core/page/scrolling/root_scroller_test.cc
+++ b/third_party/blink/renderer/core/page/scrolling/root_scroller_test.cc
@@ -201,9 +201,16 @@
 TEST_F(RootScrollerTest, TestDefaultRootScroller) {
   Initialize("overflow-scrolling.html");
 
+  RootScrollerController& controller =
+      MainFrame()->GetDocument()->GetRootScrollerController();
+
   ASSERT_EQ(nullptr, MainFrame()->GetDocument()->rootScroller());
+
   EXPECT_EQ(MainFrame()->GetDocument(),
             EffectiveRootScroller(MainFrame()->GetDocument()));
+
+  Element* html_element = MainFrame()->GetDocument()->documentElement();
+  EXPECT_TRUE(controller.ScrollsViewport(*html_element));
 }
 
 // Make sure that replacing the documentElement doesn't change the effective
@@ -212,7 +219,7 @@
   Initialize("root-scroller.html");
 
   Document* document = MainFrame()->GetDocument();
-  Element* iframe = document->CreateRawElement(HTMLNames::iframeTag);
+  Element* iframe = document->CreateRawElement(html_names::kIFrameTag);
 
   EXPECT_EQ(MainFrame()->GetDocument(),
             EffectiveRootScroller(MainFrame()->GetDocument()));
@@ -535,13 +542,13 @@
   const TopDocumentRootScrollerController& main_controller =
       MainFrame()->GetDocument()->GetPage()->GlobalRootScrollerController();
 
-  // No root scroller set, the document node should be the global root and the
-  // main LocalFrameView's scroll layer should be the layer to use.
+  // No root scroller set, the documentElement should be the effective root
+  // and the main LocalFrameView's scroll layer should be the layer to use.
   {
     EXPECT_EQ(main_controller.RootScrollerLayer(),
               MainFrameView()->LayoutViewport()->LayerForScrolling());
     EXPECT_TRUE(main_controller.IsViewportScrollCallback(
-        MainFrame()->GetDocument()->GetApplyScroll()));
+        MainFrame()->GetDocument()->documentElement()->GetApplyScroll()));
   }
 
   // Set a root scroller in the iframe. Since the main document didn't set a
@@ -552,7 +559,7 @@
     EXPECT_EQ(main_controller.RootScrollerLayer(),
               MainFrameView()->LayoutViewport()->LayerForScrolling());
     EXPECT_TRUE(main_controller.IsViewportScrollCallback(
-        MainFrame()->GetDocument()->GetApplyScroll()));
+        MainFrame()->GetDocument()->documentElement()->GetApplyScroll()));
   }
 
   // Setting the iframe as the root scroller in the main frame should now
@@ -566,14 +573,14 @@
     EXPECT_EQ(main_controller.RootScrollerLayer(),
               container_scroller->LayerForScrolling());
     EXPECT_FALSE(main_controller.IsViewportScrollCallback(
-        MainFrame()->GetDocument()->GetApplyScroll()));
+        MainFrame()->GetDocument()->documentElement()->GetApplyScroll()));
     EXPECT_TRUE(
         main_controller.IsViewportScrollCallback(container->GetApplyScroll()));
   }
 
-  // Unsetting the root scroller in the iframe should reset its effective root
-  // scroller to the iframe's document node and thus it becomes the global root
-  // scroller.
+  // Unsetting the root scroller in the iframe should reset its effective
+  // root scroller to the iframe's documentElement and thus the iframe's
+  // documentElement becomes the global root scroller.
   {
     SetAndSelectRootScroller(*iframe->contentDocument(), nullptr);
     EXPECT_EQ(main_controller.RootScrollerLayer(), iframe->contentDocument()
@@ -583,23 +590,23 @@
     EXPECT_FALSE(
         main_controller.IsViewportScrollCallback(container->GetApplyScroll()));
     EXPECT_FALSE(main_controller.IsViewportScrollCallback(
-        MainFrame()->GetDocument()->GetApplyScroll()));
+        MainFrame()->GetDocument()->documentElement()->GetApplyScroll()));
     EXPECT_TRUE(main_controller.IsViewportScrollCallback(
-        iframe->contentDocument()->GetApplyScroll()));
+        iframe->contentDocument()->documentElement()->GetApplyScroll()));
   }
 
   // Finally, unsetting the main frame's root scroller should reset it to the
-  // document node and corresponding layer.
+  // documentElement and corresponding layer.
   {
     SetAndSelectRootScroller(*MainFrame()->GetDocument(), nullptr);
     EXPECT_EQ(main_controller.RootScrollerLayer(),
               MainFrameView()->LayoutViewport()->LayerForScrolling());
     EXPECT_TRUE(main_controller.IsViewportScrollCallback(
-        MainFrame()->GetDocument()->GetApplyScroll()));
+        MainFrame()->GetDocument()->documentElement()->GetApplyScroll()));
     EXPECT_FALSE(
         main_controller.IsViewportScrollCallback(container->GetApplyScroll()));
     EXPECT_FALSE(main_controller.IsViewportScrollCallback(
-        iframe->contentDocument()->GetApplyScroll()));
+        iframe->contentDocument()->documentElement()->GetApplyScroll()));
   }
 }
 
@@ -876,7 +883,8 @@
   const TopDocumentRootScrollerController& global_controller =
       MainFrame()->GetDocument()->GetPage()->GlobalRootScrollerController();
 
-  ASSERT_EQ(MainFrame()->GetDocument(), global_controller.GlobalRootScroller());
+  ASSERT_EQ(MainFrame()->GetDocument()->documentElement(),
+            global_controller.GlobalRootScroller());
 
   MainFrameView()->UpdateAllLifecyclePhases();
   GraphicsLayer* scroll_layer = global_controller.RootScrollerLayer();
@@ -892,7 +900,8 @@
   non_main_local_root->GetFrameView()->UpdateAllLifecyclePhases();
   helper_.LocalMainFrame()->GetFrameView()->UpdateAllLifecyclePhases();
 
-  EXPECT_EQ(MainFrame()->GetDocument(), global_controller.GlobalRootScroller());
+  EXPECT_EQ(MainFrame()->GetDocument()->documentElement(),
+            global_controller.GlobalRootScroller());
   EXPECT_EQ(global_controller.RootScrollerLayer(), scroll_layer);
   EXPECT_EQ(global_controller.RootContainerLayer(), container_layer);
 }
@@ -938,7 +947,8 @@
   const TopDocumentRootScrollerController& global_controller =
       MainFrame()->GetDocument()->GetPage()->GlobalRootScrollerController();
 
-  EXPECT_EQ(MainFrame()->GetDocument(), global_controller.GlobalRootScroller());
+  EXPECT_EQ(MainFrame()->GetDocument()->documentElement(),
+            global_controller.GlobalRootScroller());
   EXPECT_EQ(MainFrameView()->LayoutViewport()->LayerForScrolling(),
             global_controller.RootScrollerLayer());
 }
@@ -1108,11 +1118,11 @@
 
   Document* document = MainFrame()->GetDocument();
 
-  Element* br = document->CreateRawElement(HTMLNames::brTag);
+  Element* br = document->CreateRawElement(html_names::kBrTag);
   document->ReplaceChild(br, document->documentElement());
   MainFrameView()->UpdateAllLifecyclePhases();
-  Element* html = document->CreateRawElement(HTMLNames::htmlTag);
-  Element* body = document->CreateRawElement(HTMLNames::bodyTag);
+  Element* html = document->CreateRawElement(html_names::kHTMLTag);
+  Element* body = document->CreateRawElement(html_names::kBodyTag);
   html->AppendChild(body);
   body->AppendChild(br);
   document->AppendChild(html);
@@ -1438,7 +1448,7 @@
 
   // Setting a border should cause the element to no longer be valid as its
   // padding box doesn't fill the viewport exactly.
-  container->setAttribute(HTMLNames::styleAttr, "border: 1px solid black");
+  container->setAttribute(html_names::kStyleAttr, "border: 1px solid black");
   Compositor().BeginFrame();
   EXPECT_EQ(&GetDocument(),
             GetDocument().GetRootScrollerController().EffectiveRootScroller());
@@ -1762,12 +1772,12 @@
   Element* container = GetDocument().getElementById("container");
 
   // An overflowing box will be added to the implicit candidates list.
-  container->setAttribute(HTMLNames::classAttr, "box");
+  container->setAttribute(html_names::kClassAttr, "box");
   Compositor().BeginFrame();
 
   // This will make change from a box to an inline. Ensure we don't crash when
   // we reevaluate the candidates list.
-  container->setAttribute(HTMLNames::classAttr, "nonbox");
+  container->setAttribute(html_names::kClassAttr, "nonbox");
   Compositor().BeginFrame();
 }
 
diff --git a/third_party/blink/renderer/core/page/scrolling/root_scroller_util.cc b/third_party/blink/renderer/core/page/scrolling/root_scroller_util.cc
index 655e9b3..322ce06d 100644
--- a/third_party/blink/renderer/core/page/scrolling/root_scroller_util.cc
+++ b/third_party/blink/renderer/core/page/scrolling/root_scroller_util.cc
@@ -21,14 +21,48 @@
 
 namespace root_scroller_util {
 
+ScrollableArea* ScrollableAreaForRootScroller(const Node* node) {
+  if (!node)
+    return nullptr;
+
+  if (node->IsDocumentNode() || node == node->GetDocument().documentElement()) {
+    if (!node->GetDocument().View())
+      return nullptr;
+
+    // For a FrameView, we use the layoutViewport rather than the
+    // getScrollableArea() since that could be the RootFrameViewport. The
+    // rootScroller's ScrollableArea will be swapped in as the layout viewport
+    // in RootFrameViewport so we need to ensure we get the layout viewport.
+    return node->GetDocument().View()->LayoutViewport();
+  }
+
+  DCHECK(node->IsElementNode());
+  const Element* element = ToElement(node);
+
+  if (!element->GetLayoutObject() || !element->GetLayoutObject()->IsBox())
+    return nullptr;
+
+  return ToLayoutBoxModelObject(element->GetLayoutObject())
+      ->GetScrollableArea();
+}
+
 PaintLayer* PaintLayerForRootScroller(const Node* node) {
   if (!node)
     return nullptr;
 
-  if (!node->GetLayoutObject() || !node->GetLayoutObject()->IsBox())
+  if (node->IsDocumentNode() || node == node->GetDocument().documentElement()) {
+    if (!node->GetDocument().GetLayoutView())
+      return nullptr;
+
+    return node->GetDocument().GetLayoutView()->Layer();
+  }
+
+  DCHECK(node->IsElementNode());
+  const Element* element = ToElement(node);
+  if (!element->GetLayoutObject() || !element->GetLayoutObject()->IsBox())
     return nullptr;
 
-  LayoutBox* box = ToLayoutBox(node->GetLayoutObject());
+  LayoutBox* box = ToLayoutBox(element->GetLayoutObject());
   return box->Layer();
 }
 
diff --git a/third_party/blink/renderer/core/page/scrolling/root_scroller_util.h b/third_party/blink/renderer/core/page/scrolling/root_scroller_util.h
index 241f0d8..152aba0d 100644
--- a/third_party/blink/renderer/core/page/scrolling/root_scroller_util.h
+++ b/third_party/blink/renderer/core/page/scrolling/root_scroller_util.h
@@ -10,9 +10,15 @@
 class LayoutBox;
 class Node;
 class PaintLayer;
+class ScrollableArea;
 
 namespace root_scroller_util {
 
+// Returns the ScrollableArea that's associated with the root scroller Node.
+// For the <html> element and document Node this will be the FrameView or root
+// PaintLayerScrollableArea.
+ScrollableArea* ScrollableAreaForRootScroller(const Node*);
+
 // Returns the PaintLayer that'll be used as the root scrolling layer. For the
 // <html> element and document Node, this returns the LayoutView's PaintLayer
 // rather than <html>'s since scrolling is handled by LayoutView.
diff --git a/third_party/blink/renderer/core/page/scrolling/scroll_state.cc b/third_party/blink/renderer/core/page/scrolling/scroll_state.cc
index 87a7f9b..f83af45 100644
--- a/third_party/blink/renderer/core/page/scrolling/scroll_state.cc
+++ b/third_party/blink/renderer/core/page/scrolling/scroll_state.cc
@@ -16,6 +16,9 @@
 Node* NodeForId(DOMNodeId node_id) {
   Node* node = DOMNodeIds::NodeForId(node_id);
   DCHECK(node);
+  if (!node)
+    return nullptr;
+  DCHECK(node->IsElementNode());
   return node;
 }
 }  // namespace
diff --git a/third_party/blink/renderer/core/page/scrolling/scrolling_coordinator_test.cc b/third_party/blink/renderer/core/page/scrolling/scrolling_coordinator_test.cc
index 132e3db..a6ddf20 100644
--- a/third_party/blink/renderer/core/page/scrolling/scrolling_coordinator_test.cc
+++ b/third_party/blink/renderer/core/page/scrolling/scrolling_coordinator_test.cc
@@ -1383,7 +1383,8 @@
   Document* document = GetFrame()->GetDocument();
   Element* container = document->getElementById("container");
   Element* content = document->getElementById("content");
-  DCHECK_EQ(container->getAttribute(HTMLNames::classAttr), "custom_scrollbar");
+  DCHECK_EQ(container->getAttribute(html_names::kClassAttr),
+            "custom_scrollbar");
   DCHECK(container);
   DCHECK(content);
 
@@ -1569,14 +1570,14 @@
 
   // A change to background color should not change the frame's scrollability.
   auto* background = GetFrame()->GetDocument()->getElementById("bg");
-  background->removeAttribute(HTMLNames::styleAttr);
+  background->removeAttribute(html_names::kStyleAttr);
   EXPECT_FALSE(GetFrame()->View()->FrameIsScrollableDidChange());
 
   ForceFullCompositingUpdate();
 
   // Making the frame not scroll should change the frame's scrollability.
   auto* forcescroll = GetFrame()->GetDocument()->getElementById("forcescroll");
-  forcescroll->removeAttribute(HTMLNames::styleAttr);
+  forcescroll->removeAttribute(html_names::kStyleAttr);
   GetFrame()->View()->UpdateLifecycleToLayoutClean();
   EXPECT_TRUE(GetFrame()->View()->FrameIsScrollableDidChange());
 
@@ -1606,13 +1607,13 @@
 
   // A change to background color should not cause a scrolling update.
   auto* background = GetFrame()->GetDocument()->getElementById("bg");
-  background->removeAttribute(HTMLNames::styleAttr);
+  background->removeAttribute(html_names::kStyleAttr);
   ForceFullCompositingUpdate();
   histogram_tester.ExpectTotalCount("Blink.ScrollingCoordinator.UpdateTime", 1);
 
   // Removing a scrollable area should cause a scrolling update.
   auto* scroller = GetFrame()->GetDocument()->getElementById("scroller");
-  scroller->removeAttribute(HTMLNames::styleAttr);
+  scroller->removeAttribute(html_names::kStyleAttr);
   ForceFullCompositingUpdate();
   histogram_tester.ExpectTotalCount("Blink.ScrollingCoordinator.UpdateTime", 2);
 }
@@ -1714,7 +1715,7 @@
   // Test ancestor with ClipPath
   Element* element = document->body();
   ASSERT_TRUE(element);
-  element->setAttribute(HTMLNames::styleAttr,
+  element->setAttribute(html_names::kStyleAttr,
                         "clip-path:circle(115px at 20px 20px);");
   Element* container = document->getElementById("scroller1");
   ASSERT_TRUE(container);
@@ -1731,7 +1732,7 @@
   EXPECT_FALSE(frame_view->GetMainThreadScrollingReasons() & clip_reason);
 
   // Remove clip path from ancestor.
-  element->removeAttribute(HTMLNames::styleAttr);
+  element->removeAttribute(html_names::kStyleAttr);
   ForceFullCompositingUpdate();
 
   EXPECT_FALSE(scrollable_area->GetNonCompositedMainThreadScrollingReasons() &
@@ -1741,7 +1742,7 @@
   // Test descendant with ClipPath
   element = document->getElementById("content1");
   ASSERT_TRUE(element);
-  element->setAttribute(HTMLNames::styleAttr,
+  element->setAttribute(html_names::kStyleAttr,
                         "clip-path:circle(115px at 20px 20px);");
   ForceFullCompositingUpdate();
   EXPECT_TRUE(scrollable_area->GetNonCompositedMainThreadScrollingReasons() &
@@ -1749,7 +1750,7 @@
   EXPECT_FALSE(frame_view->GetMainThreadScrollingReasons() & clip_reason);
 
   // Remove clip path from descendant.
-  element->removeAttribute(HTMLNames::styleAttr);
+  element->removeAttribute(html_names::kStyleAttr);
   ForceFullCompositingUpdate();
   EXPECT_FALSE(scrollable_area->GetNonCompositedMainThreadScrollingReasons() &
                clip_reason);
diff --git a/third_party/blink/renderer/core/page/scrolling/snap_coordinator_test.cc b/third_party/blink/renderer/core/page/scrolling/snap_coordinator_test.cc
index 8b749cdd..3a0ae5ea 100644
--- a/third_party/blink/renderer/core/page/scrolling/snap_coordinator_test.cc
+++ b/third_party/blink/renderer/core/page/scrolling/snap_coordinator_test.cc
@@ -19,7 +19,7 @@
 
 namespace blink {
 
-using HTMLNames::styleAttr;
+using html_names::kStyleAttr;
 
 class SnapCoordinatorTest : public testing::Test {
  protected:
@@ -110,7 +110,7 @@
 
 TEST_F(SnapCoordinatorTest, SimpleSnapElement) {
   Element& snap_element = *GetDocument().getElementById("snap-element");
-  snap_element.setAttribute(styleAttr, "scroll-snap-align: start;");
+  snap_element.setAttribute(kStyleAttr, "scroll-snap-align: start;");
   GetDocument().UpdateStyleAndLayout();
 
   EXPECT_EQ(1U, SizeOfSnapAreas(SnapContainer()));
@@ -118,7 +118,7 @@
 
 TEST_F(SnapCoordinatorTest, NestedSnapElement) {
   Element& snap_element = *GetDocument().getElementById("nested-snap-element");
-  snap_element.setAttribute(styleAttr, "scroll-snap-align: start;");
+  snap_element.setAttribute(kStyleAttr, "scroll-snap-align: start;");
   GetDocument().UpdateStyleAndLayout();
 
   EXPECT_EQ(1U, SizeOfSnapAreas(SnapContainer()));
@@ -126,10 +126,10 @@
 
 TEST_F(SnapCoordinatorTest, NestedSnapElementCaptured) {
   Element& snap_element = *GetDocument().getElementById("nested-snap-element");
-  snap_element.setAttribute(styleAttr, "scroll-snap-align: start;");
+  snap_element.setAttribute(kStyleAttr, "scroll-snap-align: start;");
 
   Element* intermediate = GetDocument().getElementById("intermediate");
-  intermediate->setAttribute(styleAttr, "overflow: scroll;");
+  intermediate->setAttribute(kStyleAttr, "overflow: scroll;");
 
   GetDocument().UpdateStyleAndLayout();
 
@@ -142,7 +142,7 @@
 TEST_F(SnapCoordinatorTest, PositionFixedSnapElement) {
   Element& snap_element =
       *GetDocument().getElementById("snap-element-fixed-position");
-  snap_element.setAttribute(styleAttr, "scroll-snap-align: start;");
+  snap_element.setAttribute(kStyleAttr, "scroll-snap-align: start;");
   GetDocument().UpdateStyleAndLayout();
 
   // Position fixed elements are contained in document and not its immediate
@@ -157,7 +157,7 @@
 
 TEST_F(SnapCoordinatorTest, UpdateStyleForSnapElement) {
   Element& snap_element = *GetDocument().getElementById("snap-element");
-  snap_element.setAttribute(styleAttr, "scroll-snap-align: start;");
+  snap_element.setAttribute(kStyleAttr, "scroll-snap-align: start;");
   GetDocument().UpdateStyleAndLayout();
 
   EXPECT_EQ(1U, SizeOfSnapAreas(SnapContainer()));
@@ -319,7 +319,7 @@
   ScrollableArea* scrollable_area =
       scroller_element->GetLayoutBox()->GetScrollableArea();
   Element* area_element = GetDocument().getElementById("area");
-  area_element->setAttribute(styleAttr, "scroll-snap-align: start;");
+  area_element->setAttribute(kStyleAttr, "scroll-snap-align: start;");
   GetDocument().UpdateStyleAndLayout();
   SnapCoordinator* snap_coordinator = GetDocument().GetSnapCoordinator();
 
@@ -352,7 +352,7 @@
   scroller_element->scrollBy(20, 20);
   EXPECT_EQ(FloatPoint(20, 20), scrollable_area->ScrollPosition());
   Element* area_element = GetDocument().getElementById("area");
-  area_element->setAttribute(styleAttr, "scroll-snap-align: start;");
+  area_element->setAttribute(kStyleAttr, "scroll-snap-align: start;");
   GetDocument().UpdateStyleAndLayout();
   SnapCoordinator* snap_coordinator = GetDocument().GetSnapCoordinator();
 
@@ -409,7 +409,7 @@
   body->scrollBy(20, 20);
   EXPECT_EQ(FloatPoint(20, 20), scrollable_area->ScrollPosition());
   Element* area_element = GetDocument().getElementById("area");
-  area_element->setAttribute(styleAttr, "scroll-snap-align: start;");
+  area_element->setAttribute(kStyleAttr, "scroll-snap-align: start;");
   GetDocument().UpdateStyleAndLayout();
   SnapCoordinator* snap_coordinator = GetDocument().GetSnapCoordinator();
   base::Optional<SnapContainerData> data =
@@ -438,12 +438,12 @@
 TEST_F(SnapCoordinatorTest, SnapDataCalculationWithBoxModel) {
   SetUpSingleSnapArea();
   Element* area_element = GetDocument().getElementById("area");
-  area_element->setAttribute(styleAttr,
+  area_element->setAttribute(kStyleAttr,
                              "scroll-snap-align: start; margin: 2px; border: "
                              "9px solid; padding: 5px;");
   Element* scroller_element = GetDocument().getElementById("scroller");
   scroller_element->setAttribute(
-      styleAttr, "margin: 3px; border: 10px solid; padding: 4px;");
+      kStyleAttr, "margin: 3px; border: 10px solid; padding: 4px;");
   GetDocument().UpdateStyleAndLayout();
   SnapCoordinator* snap_coordinator = GetDocument().GetSnapCoordinator();
   base::Optional<SnapContainerData> data =
@@ -483,7 +483,7 @@
 TEST_F(SnapCoordinatorTest, NegativeMarginSnapDataCalculation) {
   SetUpSingleSnapArea();
   Element* area_element = GetDocument().getElementById("area");
-  area_element->setAttribute(styleAttr,
+  area_element->setAttribute(kStyleAttr,
                              "scroll-snap-align: start; scroll-margin: -8px;");
   GetDocument().UpdateStyleAndLayout();
   Element* scroller_element = GetDocument().getElementById("scroller");
@@ -516,7 +516,7 @@
 TEST_F(SnapCoordinatorTest, AsymmetricalSnapDataCalculation) {
   SetUpSingleSnapArea();
   Element* area_element = GetDocument().getElementById("area");
-  area_element->setAttribute(styleAttr,
+  area_element->setAttribute(kStyleAttr,
                              R"HTML(
         scroll-snap-align: center;
         scroll-margin-top: 2px;
@@ -525,7 +525,7 @@
         scroll-margin-left: 8px;
       )HTML");
   Element* scroller_element = GetDocument().getElementById("scroller");
-  scroller_element->setAttribute(styleAttr,
+  scroller_element->setAttribute(kStyleAttr,
                                  R"HTML(
         scroll-padding-top: 10px;
         scroll-padding-right: 12px;
@@ -562,7 +562,7 @@
 TEST_F(SnapCoordinatorTest, ScaledSnapDataCalculation) {
   SetUpSingleSnapArea();
   Element* area_element = GetDocument().getElementById("area");
-  area_element->setAttribute(styleAttr,
+  area_element->setAttribute(kStyleAttr,
                              "scroll-snap-align: end; transform: scale(4, 4);");
   GetDocument().UpdateStyleAndLayout();
   Element* scroller_element = GetDocument().getElementById("scroller");
@@ -597,10 +597,10 @@
 TEST_F(SnapCoordinatorTest, VerticalRlSnapDataCalculation) {
   SetUpSingleSnapArea();
   Element* area_element = GetDocument().getElementById("area");
-  area_element->setAttribute(styleAttr,
+  area_element->setAttribute(kStyleAttr,
                              "scroll-snap-align: start; left: -200px;");
   Element* scroller_element = GetDocument().getElementById("scroller");
-  scroller_element->setAttribute(styleAttr, "writing-mode: vertical-rl;");
+  scroller_element->setAttribute(kStyleAttr, "writing-mode: vertical-rl;");
   GetDocument().UpdateStyleAndLayout();
   SnapCoordinator* snap_coordinator = GetDocument().GetSnapCoordinator();
   base::Optional<SnapContainerData> data =
diff --git a/third_party/blink/renderer/core/page/scrolling/top_document_root_scroller_controller.cc b/third_party/blink/renderer/core/page/scrolling/top_document_root_scroller_controller.cc
index 270e368..b410a42 100644
--- a/third_party/blink/renderer/core/page/scrolling/top_document_root_scroller_controller.cc
+++ b/third_party/blink/renderer/core/page/scrolling/top_document_root_scroller_controller.cc
@@ -24,18 +24,6 @@
 
 namespace blink {
 
-namespace {
-
-ScrollableArea* GetScrollableArea(Node* node) {
-  if (!node || !node->GetLayoutObject() ||
-      !node->GetLayoutObject()->IsBoxModelObject())
-    return nullptr;
-
-  return ToLayoutBoxModelObject(node->GetLayoutObject())->GetScrollableArea();
-}
-
-}  // namespace
-
 // static
 TopDocumentRootScrollerController* TopDocumentRootScrollerController::Create(
     Page& page) {
@@ -56,29 +44,21 @@
 }
 
 void TopDocumentRootScrollerController::DidResizeViewport() {
-  if (!GlobalRootScroller() || !GlobalRootScroller()->GetDocument().IsActive())
+  if (!GlobalRootScroller())
     return;
 
-  if (!GlobalRootScroller()->GetLayoutObject())
-    return;
-
-  DCHECK(GlobalRootScroller()->GetLayoutObject()->IsBoxModelObject());
-
-  LayoutBoxModelObject* layout_object =
-      ToLayoutBoxModelObject(GlobalRootScroller()->GetLayoutObject());
-
   // Top controls can resize the viewport without invalidating compositing or
   // paint so we need to do that manually here.
-  if (layout_object->HasLayer()) {
-    layout_object->Layer()->SetNeedsCompositingInputsUpdate();
-    layout_object->Layer()->UpdateSelfPaintingLayer();
-  }
+  DCHECK(GlobalRootScroller()->IsElementNode());
+  ToElement(GlobalRootScroller())->SetNeedsCompositingUpdate();
 
-  layout_object->SetNeedsPaintPropertyUpdate();
+  if (GlobalRootScroller()->GetLayoutObject())
+    GlobalRootScroller()->GetLayoutObject()->SetNeedsPaintPropertyUpdate();
 }
 
 ScrollableArea* TopDocumentRootScrollerController::RootScrollerArea() const {
-  return GetScrollableArea(GlobalRootScroller());
+  return root_scroller_util::ScrollableAreaForRootScroller(
+      GlobalRootScroller());
 }
 
 IntSize TopDocumentRootScrollerController::RootScrollerVisibleArea() const {
@@ -106,6 +86,9 @@
   Node* root_scroller =
       &TopDocument()->GetRootScrollerController().EffectiveRootScroller();
 
+  if (root_scroller->IsDocumentNode())
+    return TopDocument()->documentElement();
+
   while (root_scroller && root_scroller->IsFrameOwnerElement()) {
     HTMLFrameOwnerElement* frame_owner = ToHTMLFrameOwnerElement(root_scroller);
     DCHECK(frame_owner);
@@ -116,6 +99,9 @@
 
     root_scroller =
         &iframe_document->GetRootScrollerController().EffectiveRootScroller();
+
+    if (root_scroller->IsDocumentNode())
+      return iframe_document->documentElement();
   }
 
   return root_scroller;
@@ -125,7 +111,8 @@
   if (!node || !node->GetDocument().IsActive())
     return;
 
-  ScrollableArea* area = GetScrollableArea(node);
+  ScrollableArea* area =
+      root_scroller_util::ScrollableAreaForRootScroller(node);
 
   if (!area || !area->Layer())
     return;
@@ -150,7 +137,8 @@
   if (target == global_root_scroller_)
     return;
 
-  ScrollableArea* target_scroller = GetScrollableArea(target);
+  ScrollableArea* target_scroller =
+      root_scroller_util::ScrollableAreaForRootScroller(target);
 
   if (!target_scroller)
     return;
@@ -177,7 +165,8 @@
   SetNeedsCompositingUpdateOnAncestors(old_root_scroller);
   SetNeedsCompositingUpdateOnAncestors(target);
 
-  if (ScrollableArea* area = GetScrollableArea(old_root_scroller)) {
+  if (ScrollableArea* area = root_scroller_util::ScrollableAreaForRootScroller(
+          old_root_scroller)) {
     if (old_root_scroller->GetDocument().IsActive())
       area->DidChangeGlobalRootScroller();
   }
@@ -245,7 +234,8 @@
 }
 
 GraphicsLayer* TopDocumentRootScrollerController::RootScrollerLayer() const {
-  ScrollableArea* area = GetScrollableArea(global_root_scroller_);
+  ScrollableArea* area =
+      root_scroller_util::ScrollableAreaForRootScroller(global_root_scroller_);
 
   if (!area)
     return nullptr;
@@ -260,7 +250,9 @@
 }
 
 GraphicsLayer* TopDocumentRootScrollerController::RootContainerLayer() const {
-  ScrollableArea* area = GetScrollableArea(global_root_scroller_);
+  ScrollableArea* area =
+      root_scroller_util::ScrollableAreaForRootScroller(global_root_scroller_);
+
   return area ? area->LayerForContainer() : nullptr;
 }
 
diff --git a/third_party/blink/renderer/core/page/spatial_navigation.cc b/third_party/blink/renderer/core/page/spatial_navigation.cc
index f0791fb..4aca5b7 100644
--- a/third_party/blink/renderer/core/page/spatial_navigation.cc
+++ b/third_party/blink/renderer/core/page/spatial_navigation.cc
@@ -46,8 +46,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 static void DeflateIfOverlapped(LayoutRect&, LayoutRect&);
 static bool IsScrollableNode(const Node*);
 
diff --git a/third_party/blink/renderer/core/page/validation_message_overlay_delegate.cc b/third_party/blink/renderer/core/page/validation_message_overlay_delegate.cc
index a55fa788..9a2c75e50 100644
--- a/third_party/blink/renderer/core/page/validation_message_overlay_delegate.cc
+++ b/third_party/blink/renderer/core/page/validation_message_overlay_delegate.cc
@@ -177,7 +177,7 @@
   container.SetInlineStyleProperty(CSSPropertyMinWidth,
                                    bubble_size_.Width() / zoom_factor,
                                    CSSPrimitiveValue::UnitType::kPixels);
-  container.setAttribute(HTMLNames::classAttr, "shown-initially");
+  container.setAttribute(html_names::kClassAttr, "shown-initially");
   FrameView().UpdateAllLifecyclePhases();
 }
 
@@ -293,7 +293,7 @@
     GetElementById("inner-arrow-bottom")
         .SetInlineStyleProperty(CSSPropertyLeft, arrow_x,
                                 CSSPrimitiveValue::UnitType::kPixels);
-    container.setAttribute(HTMLNames::classAttr, "shown-fully bottom-arrow");
+    container.setAttribute(html_names::kClassAttr, "shown-fully bottom-arrow");
     container.SetInlineStyleProperty(
         CSSPropertyTransformOrigin,
         String::Format("%.2f%% bottom", arrow_anchor_percent));
@@ -304,7 +304,7 @@
     GetElementById("inner-arrow-top")
         .SetInlineStyleProperty(CSSPropertyLeft, arrow_x,
                                 CSSPrimitiveValue::UnitType::kPixels);
-    container.setAttribute(HTMLNames::classAttr, "shown-fully");
+    container.setAttribute(html_names::kClassAttr, "shown-fully");
     container.SetInlineStyleProperty(
         CSSPropertyTransformOrigin,
         String::Format("%.2f%% top", arrow_anchor_percent));
diff --git a/third_party/blink/renderer/core/paint/block_painter_test.cc b/third_party/blink/renderer/core/paint/block_painter_test.cc
index aff9343d..4c2b60b 100644
--- a/third_party/blink/renderer/core/paint/block_painter_test.cc
+++ b/third_party/blink/renderer/core/paint/block_painter_test.cc
@@ -192,7 +192,7 @@
   // Add a touch action to parent and ensure that hit test display items are
   // created for both the parent and the visible child.
   auto* parent_element = GetElementById("parent");
-  parent_element->setAttribute(HTMLNames::classAttr, "touchActionNone");
+  parent_element->setAttribute(html_names::kClassAttr, "touchActionNone");
   GetDocument().View()->UpdateAllLifecyclePhases();
   auto* parent = GetLayoutObjectByElementId("parent");
   auto* childVisible = GetLayoutObjectByElementId("childVisible");
@@ -204,7 +204,7 @@
 
   // Remove the touch action from parent and ensure no hit test display items
   // are left.
-  parent_element->removeAttribute(HTMLNames::classAttr);
+  parent_element->removeAttribute(html_names::kClassAttr);
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_DISPLAY_LIST(
       RootPaintController().GetDisplayItemList(), 1,
@@ -257,7 +257,7 @@
               touch_action_rect.whitelisted_touch_action);
   }
 
-  sibling_element->setAttribute(HTMLNames::styleAttr, "background: green;");
+  sibling_element->setAttribute(html_names::kStyleAttr, "background: green;");
   GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
   EXPECT_TRUE(PaintWithoutCommit());
   // Only the background display item of the sibling should be invalidated.
@@ -384,7 +384,7 @@
     EXPECT_EQ(nullptr, paint_chunks[0].GetHitTestData());
   }
 
-  touchaction_element->setAttribute(HTMLNames::styleAttr,
+  touchaction_element->setAttribute(html_names::kStyleAttr,
                                     "touch-action: none;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_DISPLAY_LIST(
@@ -408,7 +408,7 @@
               touch_action_rect.whitelisted_touch_action);
   }
 
-  touchaction_element->removeAttribute(HTMLNames::styleAttr);
+  touchaction_element->removeAttribute(html_names::kStyleAttr);
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_DISPLAY_LIST(
       RootPaintController().GetDisplayItemList(), 1,
diff --git a/third_party/blink/renderer/core/paint/box_paint_invalidator_test.cc b/third_party/blink/renderer/core/paint/box_paint_invalidator_test.cc
index fd7efda..a5c192c 100644
--- a/third_party/blink/renderer/core/paint/box_paint_invalidator_test.cc
+++ b/third_party/blink/renderer/core/paint/box_paint_invalidator_test.cc
@@ -55,8 +55,8 @@
               ComputePaintInvalidationReason(box, visual_rect, paint_offset));
 
     target.setAttribute(
-        HTMLNames::styleAttr,
-        target.getAttribute(HTMLNames::styleAttr) + "; width: 200px");
+        html_names::kStyleAttr,
+        target.getAttribute(html_names::kStyleAttr) + "; width: 200px");
     GetDocument().View()->UpdateLifecycleToLayoutClean();
     // Simulate that PaintInvalidator updates visual rect.
     box.GetMutableForPainting().SetVisualRect(
@@ -103,7 +103,7 @@
   auto& target = *GetDocument().getElementById("target");
   auto& box = *ToLayoutBox(target.GetLayoutObject());
   // Remove border.
-  target.setAttribute(HTMLNames::classAttr, "");
+  target.setAttribute(html_names::kClassAttr, "");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   EXPECT_TRUE(box.PaintedOutputOfObjectHasNoEffectRegardlessOfSize());
@@ -121,7 +121,7 @@
 
   // Visual rect size change.
   LayoutRect old_visual_rect = visual_rect;
-  target.setAttribute(HTMLNames::styleAttr, "width: 200px");
+  target.setAttribute(html_names::kStyleAttr, "width: 200px");
   GetDocument().View()->UpdateLifecycleToLayoutClean();
   // Simulate that PaintInvalidator updates visual rect.
   box.GetMutableForPainting().SetVisualRect(
@@ -137,8 +137,8 @@
   auto& target = *GetDocument().getElementById("target");
   auto& box = *ToLayoutBox(target.GetLayoutObject());
   // Remove border.
-  target.setAttribute(HTMLNames::classAttr, "");
-  target.setAttribute(HTMLNames::styleAttr, "background: blue");
+  target.setAttribute(html_names::kClassAttr, "");
+  target.setAttribute(html_names::kStyleAttr, "background: blue");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   box.SetShouldCheckForPaintInvalidation();
@@ -152,7 +152,7 @@
 
   // Visual rect size change.
   LayoutRect old_visual_rect = visual_rect;
-  target.setAttribute(HTMLNames::styleAttr, "background: blue; width: 200px");
+  target.setAttribute(html_names::kStyleAttr, "background: blue; width: 200px");
   GetDocument().View()->UpdateLifecycleToLayoutClean();
   // Simulate that PaintInvalidator updates visual rect.
   box.GetMutableForPainting().SetVisualRect(
@@ -189,26 +189,27 @@
   ExpectFullPaintInvalidationOnGeometryChange("With border");
 
   // Clear border, set background.
-  target.setAttribute(HTMLNames::classAttr, "background");
-  target.setAttribute(HTMLNames::styleAttr, "border-radius: 5px");
+  target.setAttribute(html_names::kClassAttr, "background");
+  target.setAttribute(html_names::kStyleAttr, "border-radius: 5px");
   ExpectFullPaintInvalidationOnGeometryChange("With border-radius");
 
-  target.setAttribute(HTMLNames::styleAttr, "-webkit-mask: url(#)");
+  target.setAttribute(html_names::kStyleAttr, "-webkit-mask: url(#)");
   ExpectFullPaintInvalidationOnGeometryChange("With mask");
 
-  target.setAttribute(HTMLNames::styleAttr, "filter: blur(5px)");
+  target.setAttribute(html_names::kStyleAttr, "filter: blur(5px)");
   ExpectFullPaintInvalidationOnGeometryChange("With filter");
 
-  target.setAttribute(HTMLNames::styleAttr, "outline: 2px solid blue");
+  target.setAttribute(html_names::kStyleAttr, "outline: 2px solid blue");
   ExpectFullPaintInvalidationOnGeometryChange("With outline");
 
-  target.setAttribute(HTMLNames::styleAttr, "box-shadow: inset 3px 2px");
+  target.setAttribute(html_names::kStyleAttr, "box-shadow: inset 3px 2px");
   ExpectFullPaintInvalidationOnGeometryChange("With box-shadow");
 
-  target.setAttribute(HTMLNames::styleAttr, "-webkit-appearance: button");
+  target.setAttribute(html_names::kStyleAttr, "-webkit-appearance: button");
   ExpectFullPaintInvalidationOnGeometryChange("With appearance");
 
-  target.setAttribute(HTMLNames::styleAttr, "clip-path: circle(50% at 0 50%)");
+  target.setAttribute(html_names::kStyleAttr,
+                      "clip-path: circle(50% at 0 50%)");
   ExpectFullPaintInvalidationOnGeometryChange("With clip-path");
 }
 
diff --git a/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.cc b/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.cc
index bc5da99..d5a13654 100644
--- a/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.cc
+++ b/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.cc
@@ -82,8 +82,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 static LayoutRect ContentsRect(const LayoutObject& layout_object) {
   if (!layout_object.IsBox())
     return LayoutRect();
diff --git a/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping_test.cc b/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping_test.cc
index 158faf8..59e815b9 100644
--- a/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping_test.cc
+++ b/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping_test.cc
@@ -501,17 +501,17 @@
   EXPECT_FALSE(graphics_layer->MaskLayer());
   EXPECT_FALSE(graphics_layer->ContentsClippingMaskLayer());
 
-  video_element->setAttribute(HTMLNames::styleAttr, style_with_border_radius);
+  video_element->setAttribute(html_names::kStyleAttr, style_with_border_radius);
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_FALSE(graphics_layer->MaskLayer());
   EXPECT_TRUE(graphics_layer->ContentsClippingMaskLayer());
 
-  video_element->setAttribute(HTMLNames::styleAttr, style_with_clip_path);
+  video_element->setAttribute(html_names::kStyleAttr, style_with_clip_path);
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_TRUE(graphics_layer->MaskLayer());
   EXPECT_FALSE(graphics_layer->ContentsClippingMaskLayer());
 
-  video_element->setAttribute(HTMLNames::styleAttr, style_without_clipping);
+  video_element->setAttribute(html_names::kStyleAttr, style_without_clipping);
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_FALSE(graphics_layer->MaskLayer());
   EXPECT_FALSE(graphics_layer->ContentsClippingMaskLayer());
@@ -1097,7 +1097,7 @@
   EXPECT_TRUE(mapping->DecorationOutlineLayer());
 
   // No decoration outline layer is created when not composited scrolling.
-  element->setAttribute(HTMLNames::styleAttr, "overflow: visible;");
+  element->setAttribute(html_names::kStyleAttr, "overflow: visible;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   paint_layer = ToLayoutBoxModelObject(element->GetLayoutObject())->Layer();
   ASSERT_TRUE(paint_layer);
@@ -1131,7 +1131,7 @@
 
   // The decoration outline layer is created when composited scrolling
   // with an outline drawn over the composited scrolling region.
-  scroller->setAttribute(HTMLNames::styleAttr, "outline-offset: -2px;");
+  scroller->setAttribute(html_names::kStyleAttr, "outline-offset: -2px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   paint_layer = ToLayoutBoxModelObject(scroller->GetLayoutObject())->Layer();
   ASSERT_TRUE(paint_layer);
@@ -1142,7 +1142,7 @@
 
   // The decoration outline layer is destroyed when the scrolling region
   // will not be covered up by the outline.
-  scroller->removeAttribute(HTMLNames::styleAttr);
+  scroller->removeAttribute(html_names::kStyleAttr);
   GetDocument().View()->UpdateAllLifecyclePhases();
   paint_layer = ToLayoutBoxModelObject(scroller->GetLayoutObject())->Layer();
   ASSERT_TRUE(paint_layer);
@@ -1291,7 +1291,7 @@
   ASSERT_FALSE(child_paint_layer);
 
   // Making the child conposited causes creation of an AncestorClippingLayer.
-  child->setAttribute(HTMLNames::styleAttr, "will-change: transform");
+  child->setAttribute(html_names::kStyleAttr, "will-change: transform");
   GetDocument().View()->UpdateAllLifecyclePhases();
   child_paint_layer = ToLayoutBoxModelObject(child->GetLayoutObject())->Layer();
   ASSERT_TRUE(child_paint_layer);
@@ -1304,7 +1304,7 @@
 
   // Adding border radius to the ancestor requires an
   // ancestorClippingMaskLayer for the child
-  ancestor->setAttribute(HTMLNames::styleAttr, "border-radius: 40px;");
+  ancestor->setAttribute(html_names::kStyleAttr, "border-radius: 40px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   child_paint_layer = ToLayoutBoxModelObject(child->GetLayoutObject())->Layer();
   ASSERT_TRUE(child_paint_layer);
@@ -1316,7 +1316,7 @@
 
   // Removing the border radius should remove the ancestorClippingMaskLayer
   // for the child
-  ancestor->setAttribute(HTMLNames::styleAttr, "border-radius: 0px;");
+  ancestor->setAttribute(html_names::kStyleAttr, "border-radius: 0px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   child_paint_layer = ToLayoutBoxModelObject(child->GetLayoutObject())->Layer();
   ASSERT_TRUE(child_paint_layer);
@@ -1327,12 +1327,12 @@
   EXPECT_FALSE(child_mapping->AncestorClippingMaskLayer());
 
   // Add border radius back so we can test one more case
-  ancestor->setAttribute(HTMLNames::styleAttr, "border-radius: 40px;");
+  ancestor->setAttribute(html_names::kStyleAttr, "border-radius: 40px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   // Now change the overflow to remove the need for an ancestor clip
   // on the child
-  ancestor->setAttribute(HTMLNames::styleAttr, "overflow: visible");
+  ancestor->setAttribute(html_names::kStyleAttr, "overflow: visible");
   GetDocument().View()->UpdateAllLifecyclePhases();
   child_paint_layer = ToLayoutBoxModelObject(child->GetLayoutObject())->Layer();
   ASSERT_TRUE(child_paint_layer);
@@ -1388,7 +1388,7 @@
   ASSERT_FALSE(child2_mapping);
 
   // Making child1 composited causes creation of an AncestorClippingLayer.
-  child1->setAttribute(HTMLNames::styleAttr, "will-change: transform");
+  child1->setAttribute(html_names::kStyleAttr, "will-change: transform");
   GetDocument().View()->UpdateAllLifecyclePhases();
   child1_paint_layer =
       ToLayoutBoxModelObject(child1->GetLayoutObject())->Layer();
@@ -1406,7 +1406,7 @@
 
   // Adding border radius to the ancestor requires an
   // ancestorClippingMaskLayer for child1
-  ancestor->setAttribute(HTMLNames::styleAttr, "border-radius: 40px;");
+  ancestor->setAttribute(html_names::kStyleAttr, "border-radius: 40px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   child1_paint_layer =
       ToLayoutBoxModelObject(child1->GetLayoutObject())->Layer();
@@ -1424,7 +1424,7 @@
 
   // Making child2 composited causes creation of an AncestorClippingLayer
   // and a mask layer.
-  child2->setAttribute(HTMLNames::styleAttr, "will-change: transform");
+  child2->setAttribute(html_names::kStyleAttr, "will-change: transform");
   GetDocument().View()->UpdateAllLifecyclePhases();
   child1_paint_layer =
       ToLayoutBoxModelObject(child1->GetLayoutObject())->Layer();
@@ -1445,7 +1445,7 @@
 
   // Removing will-change: transform on child1 should result in the removal
   // of all clipping and masking layers
-  child1->setAttribute(HTMLNames::styleAttr, "will-change: none");
+  child1->setAttribute(html_names::kStyleAttr, "will-change: none");
   GetDocument().View()->UpdateAllLifecyclePhases();
   child1_paint_layer =
       ToLayoutBoxModelObject(child1->GetLayoutObject())->Layer();
@@ -1463,7 +1463,7 @@
 
   // Now change the overflow to remove the need for an ancestor clip
   // on the children
-  ancestor->setAttribute(HTMLNames::styleAttr, "overflow: visible");
+  ancestor->setAttribute(html_names::kStyleAttr, "overflow: visible");
   GetDocument().View()->UpdateAllLifecyclePhases();
   child1_paint_layer =
       ToLayoutBoxModelObject(child1->GetLayoutObject())->Layer();
@@ -1526,7 +1526,7 @@
   ASSERT_FALSE(grandchild_mapping);
 
   // Making grandchild composited causes creation of an AncestorClippingLayer.
-  grandchild->setAttribute(HTMLNames::styleAttr, "will-change: transform");
+  grandchild->setAttribute(html_names::kStyleAttr, "will-change: transform");
   GetDocument().View()->UpdateAllLifecyclePhases();
   child_paint_layer = ToLayoutBoxModelObject(child->GetLayoutObject())->Layer();
   ASSERT_TRUE(child_paint_layer);
@@ -1543,7 +1543,7 @@
 
   // Adding border radius to the ancestor requires an
   // ancestorClippingMaskLayer for grandchild
-  ancestor->setAttribute(HTMLNames::styleAttr, "border-radius: 40px;");
+  ancestor->setAttribute(html_names::kStyleAttr, "border-radius: 40px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   child_paint_layer = ToLayoutBoxModelObject(child->GetLayoutObject())->Layer();
   ASSERT_TRUE(child_paint_layer);
@@ -1561,7 +1561,7 @@
   // Moving the grandchild out of the clip region should result in removal
   // of the mask layer. It also removes the grandchild from its own mapping
   // because it is now squashed.
-  grandchild->setAttribute(HTMLNames::styleAttr,
+  grandchild->setAttribute(html_names::kStyleAttr,
                            "left: 250px; will-change: transform");
   GetDocument().View()->UpdateAllLifecyclePhases();
   child_paint_layer = ToLayoutBoxModelObject(child->GetLayoutObject())->Layer();
@@ -1579,7 +1579,7 @@
 
   // Now change the overflow to remove the need for an ancestor clip
   // on the children
-  ancestor->setAttribute(HTMLNames::styleAttr, "overflow: visible");
+  ancestor->setAttribute(html_names::kStyleAttr, "overflow: visible");
   GetDocument().View()->UpdateAllLifecyclePhases();
   child_paint_layer = ToLayoutBoxModelObject(child->GetLayoutObject())->Layer();
   ASSERT_TRUE(child_paint_layer);
@@ -2435,7 +2435,7 @@
                   .is_sticky);
 
   // Make the scroller no longer scrollable.
-  GetDocument().getElementById("spacer")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("spacer")->setAttribute(html_names::kStyleAttr,
                                                        "height: 0;");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
@@ -2449,7 +2449,7 @@
                    .is_sticky);
 
   // Make the scroller scrollable again.
-  GetDocument().getElementById("spacer")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("spacer")->setAttribute(html_names::kStyleAttr,
                                                        "height: 2000px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
@@ -2493,13 +2493,13 @@
   EXPECT_EQ(100, scrolling_layer->scroll_container_bounds().height());
 
   scrollerElement->setScrollTop(300);
-  scrollerElement->setAttribute(HTMLNames::styleAttr, "max-height: 25px;");
+  scrollerElement->setAttribute(html_names::kStyleAttr, "max-height: 25px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(50, scrolling_layer->CurrentScrollOffset().y());
   EXPECT_EQ(150, scrolling_layer->bounds().height());
   EXPECT_EQ(25, scrolling_layer->scroll_container_bounds().height());
 
-  scrollerElement->setAttribute(HTMLNames::styleAttr, "max-height: 300px;");
+  scrollerElement->setAttribute(html_names::kStyleAttr, "max-height: 300px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(50, scrolling_layer->CurrentScrollOffset().y());
   EXPECT_EQ(150, scrolling_layer->bounds().height());
@@ -2515,7 +2515,7 @@
 
   Color base_background(255, 0, 0);
   GetDocument().View()->SetBaseBackgroundColor(base_background);
-  GetDocument().body()->setAttribute(HTMLNames::styleAttr,
+  GetDocument().body()->setAttribute(html_names::kStyleAttr,
                                      "background: rgba(0, 255, 0, 0.5)");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(base_background, GetDocument().View()->BaseBackgroundColor());
@@ -2542,7 +2542,7 @@
   EXPECT_EQ(Color::kTransparent, graphics_layer->BackgroundColor());
   EXPECT_EQ(Color::kTransparent, scrolling_contents_layer->BackgroundColor());
 
-  target->setAttribute(HTMLNames::classAttr, "color");
+  target->setAttribute(html_names::kClassAttr, "color");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(Color(0, 0, 255), graphics_layer->BackgroundColor());
   EXPECT_EQ(Color(0, 0, 255), scrolling_contents_layer->BackgroundColor());
diff --git a/third_party/blink/renderer/core/paint/compositing/compositing_reason_finder_test.cc b/third_party/blink/renderer/core/paint/compositing/compositing_reason_finder_test.cc
index e02efa25..f755256 100644
--- a/third_party/blink/renderer/core/paint/compositing/compositing_reason_finder_test.cc
+++ b/third_party/blink/renderer/core/paint/compositing/compositing_reason_finder_test.cc
@@ -205,14 +205,14 @@
   EXPECT_TRUE(paint_layer->GraphicsLayerBacking()->ContentsOpaque());
 
   // Change the parent to have a transform.
-  parent->setAttribute(HTMLNames::styleAttr, "transform: translate(1px, 0);");
+  parent->setAttribute(html_names::kStyleAttr, "transform: translate(1px, 0);");
   GetDocument().View()->UpdateAllLifecyclePhases();
   paint_layer = ToLayoutBoxModelObject(fixed->GetLayoutObject())->Layer();
   ASSERT_TRUE(paint_layer);
   EXPECT_EQ(kNotComposited, paint_layer->GetCompositingState());
 
   // Change the parent to have no transform again.
-  parent->removeAttribute(HTMLNames::styleAttr);
+  parent->removeAttribute(html_names::kStyleAttr);
   GetDocument().View()->UpdateAllLifecyclePhases();
   paint_layer = ToLayoutBoxModelObject(fixed->GetLayoutObject())->Layer();
   ASSERT_TRUE(paint_layer);
@@ -220,7 +220,7 @@
   EXPECT_TRUE(paint_layer->GraphicsLayerBacking()->ContentsOpaque());
 
   // Apply a transform to the fixed directly.
-  fixed->setAttribute(HTMLNames::styleAttr, "transform: translate(1px, 0);");
+  fixed->setAttribute(html_names::kStyleAttr, "transform: translate(1px, 0);");
   GetDocument().View()->UpdateAllLifecyclePhases();
   paint_layer = ToLayoutBoxModelObject(fixed->GetLayoutObject())->Layer();
   ASSERT_TRUE(paint_layer);
@@ -253,14 +253,14 @@
   EXPECT_TRUE(paint_layer->GraphicsLayerBacking()->ContentsOpaque());
 
   // Change the parent to be partially translucent.
-  parent->setAttribute(HTMLNames::styleAttr, "opacity: 0.5;");
+  parent->setAttribute(html_names::kStyleAttr, "opacity: 0.5;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   paint_layer = ToLayoutBoxModelObject(fixed->GetLayoutObject())->Layer();
   ASSERT_TRUE(paint_layer);
   EXPECT_EQ(kNotComposited, paint_layer->GetCompositingState());
 
   // Change the parent to be opaque again.
-  parent->setAttribute(HTMLNames::styleAttr, "opacity: 1;");
+  parent->setAttribute(html_names::kStyleAttr, "opacity: 1;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   paint_layer = ToLayoutBoxModelObject(fixed->GetLayoutObject())->Layer();
   ASSERT_TRUE(paint_layer);
@@ -268,7 +268,7 @@
   EXPECT_TRUE(paint_layer->GraphicsLayerBacking()->ContentsOpaque());
 
   // Make the fixed translucent.
-  fixed->setAttribute(HTMLNames::styleAttr, "opacity: 0.5");
+  fixed->setAttribute(html_names::kStyleAttr, "opacity: 0.5");
   GetDocument().View()->UpdateAllLifecyclePhases();
   paint_layer = ToLayoutBoxModelObject(fixed->GetLayoutObject())->Layer();
   ASSERT_TRUE(paint_layer);
diff --git a/third_party/blink/renderer/core/paint/compositing/compositing_requirements_updater_test.cc b/third_party/blink/renderer/core/paint/compositing/compositing_requirements_updater_test.cc
index db17154..5329121 100644
--- a/third_party/blink/renderer/core/paint/compositing/compositing_requirements_updater_test.cc
+++ b/third_party/blink/renderer/core/paint/compositing/compositing_requirements_updater_test.cc
@@ -69,7 +69,7 @@
   EXPECT_FALSE(target->GetCompositingReasons());
 
   // Now make |target| self-painting.
-  GetDocument().getElementById("target")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("target")->setAttribute(html_names::kStyleAttr,
                                                        "position: relative");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
@@ -96,7 +96,7 @@
   EXPECT_FALSE(target->GetCompositingReasons());
 
   // Now make |target| self-painting.
-  GetDocument().getElementById("target")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("target")->setAttribute(html_names::kStyleAttr,
                                                        "position: relative");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(CompositingReason::kAssumedOverlap,
@@ -123,7 +123,7 @@
   EXPECT_FALSE(target->GetCompositingReasons());
 
   // Now make |target| self-painting.
-  GetDocument().getElementById("target")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("target")->setAttribute(html_names::kStyleAttr,
                                                        "position: relative");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(CompositingReason::kClipsCompositingDescendants,
@@ -160,7 +160,7 @@
 
   GetDocument().View()->SetTracksPaintInvalidations(true);
 
-  GetDocument().getElementById("target")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("target")->setAttribute(html_names::kStyleAttr,
                                                        "display: none");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
diff --git a/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor_test.cc b/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor_test.cc
index 936bc1c..c6ee1c8 100644
--- a/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor_test.cc
+++ b/third_party/blink/renderer/core/paint/compositing/paint_layer_compositor_test.cc
@@ -104,7 +104,7 @@
 
   // Force CompositedLayerMapping to update the internal layer hierarchy.
   auto* box = GetDocument().getElementById("box");
-  box->setAttribute(HTMLNames::styleAttr, "height: 1000px;");
+  box->setAttribute(html_names::kStyleAttr, "height: 1000px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   EXPECT_EQ(main_graphics_layer_parent, main_graphics_layer->Parent());
diff --git a/third_party/blink/renderer/core/paint/image_element_timing.cc b/third_party/blink/renderer/core/paint/image_element_timing.cc
index 7f212ef..d20e0edf 100644
--- a/third_party/blink/renderer/core/paint/image_element_timing.cc
+++ b/third_party/blink/renderer/core/paint/image_element_timing.cc
@@ -90,7 +90,7 @@
   visible_new_visual_rect.Intersect(viewport);
 
   const AtomicString attr =
-      element->FastGetAttribute(HTMLNames::elementtimingAttr);
+      element->FastGetAttribute(html_names::kElementtimingAttr);
   // Do not create an entry if 'elementtiming' is not present or the image is
   // below a certain size threshold.
   if (attr.IsEmpty() &&
@@ -103,7 +103,7 @@
   // empty, use the ID. If empty, use 'img'.
   AtomicString name = attr;
   if (name.IsEmpty())
-    name = element->FastGetAttribute(HTMLNames::idAttr);
+    name = element->FastGetAttribute(html_names::kIdAttr);
   if (name.IsEmpty())
     name = "img";
   element_timings_.emplace_back(name, visible_new_visual_rect);
diff --git a/third_party/blink/renderer/core/paint/image_paint_timing_detector_test.cc b/third_party/blink/renderer/core/paint/image_paint_timing_detector_test.cc
index b3a7092..a231137 100644
--- a/third_party/blink/renderer/core/paint/image_paint_timing_detector_test.cc
+++ b/third_party/blink/renderer/core/paint/image_paint_timing_detector_test.cc
@@ -395,8 +395,8 @@
   EXPECT_GE(result1, time1);
   EXPECT_GE(time2, result1);
 
-  Element* image = GetDocument().CreateRawElement(HTMLNames::imgTag);
-  image->setAttribute(HTMLNames::idAttr, "target2");
+  Element* image = GetDocument().CreateRawElement(html_names::kImgTag);
+  image->setAttribute(html_names::kIdAttr, "target2");
   GetDocument().getElementById("parent")->appendChild(image);
   SetImageAndPaint("target2", 2, 2);
   UpdateAllLifecyclePhasesAndInvokeCallbackIfAny();
diff --git a/third_party/blink/renderer/core/paint/inline_text_box_painter.cc b/third_party/blink/renderer/core/paint/inline_text_box_painter.cc
index f1cecb6..d964d84 100644
--- a/third_party/blink/renderer/core/paint/inline_text_box_painter.cc
+++ b/third_party/blink/renderer/core/paint/inline_text_box_painter.cc
@@ -77,7 +77,7 @@
       return current;
 
     if (Node* node = current.GetNode()) {
-      if (IsHTMLAnchorElement(node) || node->HasTagName(HTMLNames::fontTag))
+      if (IsHTMLAnchorElement(node) || node->HasTagName(html_names::kFontTag))
         return current;
     }
   }
diff --git a/third_party/blink/renderer/core/paint/link_highlight_impl.cc b/third_party/blink/renderer/core/paint/link_highlight_impl.cc
index a2bcd67..353c2dd 100644
--- a/third_party/blink/renderer/core/paint/link_highlight_impl.cc
+++ b/third_party/blink/renderer/core/paint/link_highlight_impl.cc
@@ -348,6 +348,12 @@
 };
 
 void LinkHighlightImpl::UpdateGeometry() {
+  if (!node_ || !node_->GetLayoutObject()) {
+    ClearGraphicsLayerLinkHighlightPointer();
+    ReleaseResources();
+    return;
+  }
+
   // To avoid unnecessary updates (e.g. other entities have requested animations
   // from our WebViewImpl), only proceed if we actually requested an update.
   if (!geometry_needs_update_)
@@ -355,28 +361,22 @@
 
   geometry_needs_update_ = false;
 
-  bool has_layout_object = node_ && node_->GetLayoutObject();
-  if (has_layout_object) {
-    const LayoutBoxModelObject& paint_invalidation_container =
-        node_->GetLayoutObject()->ContainerForPaintInvalidation();
-    AttachLinkHighlightToCompositingLayer(paint_invalidation_container);
-    if (ComputeHighlightLayerPathAndPosition(paint_invalidation_container)) {
-      // We only need to invalidate the layer if the highlight size has changed,
-      // otherwise we can just re-position the layer without needing to
-      // repaint.
-      content_layer_->SetNeedsDisplay();
+  const LayoutBoxModelObject& paint_invalidation_container =
+      node_->GetLayoutObject()->ContainerForPaintInvalidation();
+  AttachLinkHighlightToCompositingLayer(paint_invalidation_container);
+  if (ComputeHighlightLayerPathAndPosition(paint_invalidation_container)) {
+    // We only need to invalidate the layer if the highlight size has changed,
+    // otherwise we can just re-position the layer without needing to
+    // repaint.
+    content_layer_->SetNeedsDisplay();
 
-      if (current_graphics_layer_) {
-        gfx::Rect rect = gfx::ToEnclosingRect(
-            gfx::RectF(Layer()->position(), gfx::SizeF(Layer()->bounds())));
-        current_graphics_layer_->TrackRasterInvalidation(
-            LinkHighlightDisplayItemClientForTracking(), IntRect(rect),
-            PaintInvalidationReason::kFullLayer);
-      }
+    if (current_graphics_layer_) {
+      gfx::Rect rect = gfx::ToEnclosingRect(
+          gfx::RectF(Layer()->position(), gfx::SizeF(Layer()->bounds())));
+      current_graphics_layer_->TrackRasterInvalidation(
+          LinkHighlightDisplayItemClientForTracking(), IntRect(rect),
+          PaintInvalidationReason::kFullLayer);
     }
-  } else {
-    ClearGraphicsLayerLinkHighlightPointer();
-    ReleaseResources();
   }
 }
 
diff --git a/third_party/blink/renderer/core/paint/paint_and_raster_invalidation_test.cc b/third_party/blink/renderer/core/paint/paint_and_raster_invalidation_test.cc
index 6132c98..cc537b3 100644
--- a/third_party/blink/renderer/core/paint/paint_and_raster_invalidation_test.cc
+++ b/third_party/blink/renderer/core/paint/paint_and_raster_invalidation_test.cc
@@ -63,7 +63,7 @@
     // for tracing.
     ScopedPaintUnderInvalidationCheckingForTest checking(true);
 
-    target->setAttribute(HTMLNames::styleAttr, "height: 200px");
+    target->setAttribute(html_names::kStyleAttr, "height: 200px");
     GetDocument().View()->UpdateAllLifecyclePhases();
     EXPECT_THAT(GetCcLayerClient()->TakeDebugInfo(GetCcLayer())->ToString(),
                 MatchesRegex(
@@ -72,7 +72,7 @@
                     "\"reason\":\"incremental\","
                     "\"client\":\"LayoutBlockFlow DIV id='target'\"\\}\\]\\}"));
 
-    target->setAttribute(HTMLNames::styleAttr, "height: 200px; width: 200px");
+    target->setAttribute(html_names::kStyleAttr, "height: 200px; width: 200px");
     GetDocument().View()->UpdateAllLifecyclePhases();
     EXPECT_THAT(GetCcLayerClient()->TakeDebugInfo(GetCcLayer())->ToString(),
                 MatchesRegex(
@@ -82,7 +82,7 @@
                     "\"client\":\"LayoutBlockFlow DIV id='target'\"\\}\\]\\}"));
   }
 
-  target->setAttribute(HTMLNames::styleAttr, "height: 300px; width: 300px");
+  target->setAttribute(html_names::kStyleAttr, "height: 300px; width: 300px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(std::string::npos, GetCcLayerClient()
                                    ->TakeDebugInfo(GetCcLayer())
@@ -96,7 +96,7 @@
   auto* object = target->GetLayoutObject();
 
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  target->setAttribute(HTMLNames::styleAttr, "width: 100px; height: 200px");
+  target->setAttribute(html_names::kStyleAttr, "width: 100px; height: 200px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_THAT(GetRasterInvalidationTracking()->Invalidations(),
               UnorderedElementsAre(
@@ -115,7 +115,7 @@
   auto* object = target->GetLayoutObject();
 
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  target->setAttribute(HTMLNames::styleAttr, "width: 20px; height: 80px");
+  target->setAttribute(html_names::kStyleAttr, "width: 20px; height: 80px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_THAT(GetRasterInvalidationTracking()->Invalidations(),
               UnorderedElementsAre(
@@ -134,7 +134,7 @@
   auto* object = target->GetLayoutObject();
 
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  target->setAttribute(HTMLNames::styleAttr, "width: 100px; height: 80px");
+  target->setAttribute(html_names::kStyleAttr, "width: 100px; height: 80px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_THAT(GetRasterInvalidationTracking()->Invalidations(),
               UnorderedElementsAre(
@@ -153,7 +153,8 @@
   auto* object = target->GetLayoutObject();
 
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  target->setAttribute(HTMLNames::styleAttr, "width: 100.6px; height: 70.3px");
+  target->setAttribute(html_names::kStyleAttr,
+                       "width: 100.6px; height: 70.3px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_THAT(GetRasterInvalidationTracking()->Invalidations(),
               UnorderedElementsAre(
@@ -166,7 +167,7 @@
   GetDocument().View()->SetTracksPaintInvalidations(false);
 
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  target->setAttribute(HTMLNames::styleAttr, "width: 50px; height: 100px");
+  target->setAttribute(html_names::kStyleAttr, "width: 50px; height: 100px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_THAT(GetRasterInvalidationTracking()->Invalidations(),
               UnorderedElementsAre(
@@ -183,11 +184,12 @@
   SetUpHTML(*this);
   Element* target = GetDocument().getElementById("target");
   auto* object = target->GetLayoutObject();
-  target->setAttribute(HTMLNames::classAttr, "background transform");
+  target->setAttribute(html_names::kClassAttr, "background transform");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  target->setAttribute(HTMLNames::styleAttr, "width: 100.6px; height: 70.3px");
+  target->setAttribute(html_names::kStyleAttr,
+                       "width: 100.6px; height: 70.3px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_THAT(GetRasterInvalidationTracking()->Invalidations(),
               UnorderedElementsAre(
@@ -200,7 +202,7 @@
   GetDocument().View()->SetTracksPaintInvalidations(false);
 
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  target->setAttribute(HTMLNames::styleAttr, "width: 50px; height: 100px");
+  target->setAttribute(html_names::kStyleAttr, "width: 50px; height: 100px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_THAT(GetRasterInvalidationTracking()->Invalidations(),
               UnorderedElementsAre(
@@ -220,7 +222,7 @@
   EXPECT_EQ(LayoutRect(0, 0, 50, 100), object->FirstFragment().VisualRect());
 
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  target->setAttribute(HTMLNames::styleAttr,
+  target->setAttribute(html_names::kStyleAttr,
                        "margin-top: 0.6px; width: 50px; height: 99.3px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(LayoutRect(0, 0, 50, 100), object->FirstFragment().VisualRect());
@@ -231,7 +233,7 @@
   GetDocument().View()->SetTracksPaintInvalidations(false);
 
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  target->setAttribute(HTMLNames::styleAttr,
+  target->setAttribute(html_names::kStyleAttr,
                        "margin-top: 0.6px; width: 49.3px; height: 98.5px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(LayoutRect(0, 0, 50, 100), object->FirstFragment().VisualRect());
@@ -246,11 +248,11 @@
   SetUpHTML(*this);
   Element* target = GetDocument().getElementById("target");
   auto* object = target->GetLayoutObject();
-  target->setAttribute(HTMLNames::styleAttr, "transform: rotate(45deg)");
+  target->setAttribute(html_names::kStyleAttr, "transform: rotate(45deg)");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  target->setAttribute(HTMLNames::styleAttr,
+  target->setAttribute(html_names::kStyleAttr,
                        "transform: rotate(45deg); width: 200px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   auto expected_rect = EnclosingIntRect(
@@ -266,7 +268,7 @@
 TEST_P(PaintAndRasterInvalidationTest, ResizeRotatedChild) {
   SetUpHTML(*this);
   Element* target = GetDocument().getElementById("target");
-  target->setAttribute(HTMLNames::styleAttr,
+  target->setAttribute(html_names::kStyleAttr,
                        "transform: rotate(45deg); width: 200px");
   target->SetInnerHTMLFromString(
       "<div id=child style='width: 50px; height: 50px; background: "
@@ -276,7 +278,7 @@
   auto* child_object = child->GetLayoutObject();
 
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  child->setAttribute(HTMLNames::styleAttr,
+  child->setAttribute(html_names::kStyleAttr,
                       "width: 100px; height: 50px; background: red");
   GetDocument().View()->UpdateAllLifecyclePhases();
   auto expected_rect = EnclosingIntRect(
@@ -296,8 +298,8 @@
 
   SetUpHTML(*this);
   Element* target = GetDocument().getElementById("target");
-  target->setAttribute(HTMLNames::classAttr, "");
-  target->setAttribute(HTMLNames::styleAttr, "height: 2000px");
+  target->setAttribute(html_names::kClassAttr, "");
+  target->setAttribute(html_names::kStyleAttr, "height: 2000px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(kBackgroundPaintInScrollingContents,
             GetLayoutView().GetBackgroundPaintLocation());
@@ -307,7 +309,7 @@
 
   // Resize the content.
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  target->setAttribute(HTMLNames::styleAttr, "height: 3000px");
+  target->setAttribute(html_names::kStyleAttr, "height: 3000px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_THAT(
       GetRasterInvalidationTracking()->Invalidations(),
@@ -331,10 +333,10 @@
     return;
 
   SetUpHTML(*this);
-  GetDocument().body()->setAttribute(HTMLNames::classAttr, "gradient");
+  GetDocument().body()->setAttribute(html_names::kClassAttr, "gradient");
   Element* target = GetDocument().getElementById("target");
-  target->setAttribute(HTMLNames::classAttr, "");
-  target->setAttribute(HTMLNames::styleAttr, "height: 2000px");
+  target->setAttribute(html_names::kClassAttr, "");
+  target->setAttribute(html_names::kStyleAttr, "height: 2000px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(kBackgroundPaintInScrollingContents,
             GetLayoutView().GetBackgroundPaintLocation());
@@ -344,7 +346,7 @@
 
   // Resize the content.
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  target->setAttribute(HTMLNames::styleAttr, "height: 3000px");
+  target->setAttribute(html_names::kStyleAttr, "height: 3000px");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   EXPECT_THAT(
@@ -390,7 +392,7 @@
 
   // Resize the content.
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  content->setAttribute(HTMLNames::styleAttr, "height: 500px");
+  content->setAttribute(html_names::kStyleAttr, "height: 500px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   // No invalidation because the changed part of layout overflow is clipped.
   EXPECT_FALSE(GetRasterInvalidationTracking()->HasInvalidations());
@@ -398,7 +400,7 @@
 
   // Resize the iframe.
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  iframe->setAttribute(HTMLNames::styleAttr, "height: 200px");
+  iframe->setAttribute(html_names::kStyleAttr, "height: 200px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   // The iframe doesn't have anything visible by itself, so we only issue raster
   // invalidation for the frame contents.
@@ -439,7 +441,7 @@
 
   // Resize the content.
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  content->setAttribute(HTMLNames::styleAttr, "height: 500px");
+  content->setAttribute(html_names::kStyleAttr, "height: 500px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_THAT(
       GetRasterInvalidationTracking()->Invalidations(),
@@ -450,7 +452,7 @@
 
   // Resize the iframe.
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  iframe->setAttribute(HTMLNames::styleAttr, "height: 200px");
+  iframe->setAttribute(html_names::kStyleAttr, "height: 200px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   // The iframe doesn't have anything visible by itself, so we only issue raster
   // invalidation for the frame contents.
@@ -470,8 +472,8 @@
 
   SetUpHTML(*this);
   Element* target = GetDocument().getElementById("target");
-  target->setAttribute(HTMLNames::classAttr, "background local-background");
-  target->setAttribute(HTMLNames::styleAttr, "will-change: transform");
+  target->setAttribute(html_names::kClassAttr, "background local-background");
+  target->setAttribute(html_names::kStyleAttr, "will-change: transform");
   target->SetInnerHTMLFromString(
       "<div id=child style='width: 500px; height: 500px'></div>",
       ASSERT_NO_EXCEPTION);
@@ -504,7 +506,7 @@
 
   // Resize the content.
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  child->setAttribute(HTMLNames::styleAttr, "width: 500px; height: 1000px");
+  child->setAttribute(html_names::kStyleAttr, "width: 500px; height: 1000px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   // No invalidation on the container layer.
   EXPECT_FALSE(container_raster_invalidation_tracking()->HasInvalidations());
@@ -519,7 +521,7 @@
 
   // Resize the container.
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  target->setAttribute(HTMLNames::styleAttr,
+  target->setAttribute(html_names::kStyleAttr,
                        "will-change: transform; height: 200px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   // No invalidation for composited layer resize.
@@ -536,8 +538,8 @@
 
   SetUpHTML(*this);
   Element* target = GetDocument().getElementById("target");
-  target->setAttribute(HTMLNames::classAttr, "local-background gradient");
-  target->setAttribute(HTMLNames::styleAttr, "will-change: transform");
+  target->setAttribute(html_names::kClassAttr, "local-background gradient");
+  target->setAttribute(html_names::kStyleAttr, "will-change: transform");
   target->SetInnerHTMLFromString(
       "<div id='child' style='width: 500px; height: 500px'></div>",
       ASSERT_NO_EXCEPTION);
@@ -546,7 +548,7 @@
 
   // Resize the content.
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  child->setAttribute(HTMLNames::styleAttr, "width: 500px; height: 1000px");
+  child->setAttribute(html_names::kStyleAttr, "width: 500px; height: 1000px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   LayoutBoxModelObject* target_obj =
       ToLayoutBoxModelObject(target->GetLayoutObject());
@@ -574,7 +576,7 @@
 
   // Resize the container.
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  target->setAttribute(HTMLNames::styleAttr,
+  target->setAttribute(html_names::kStyleAttr,
                        "will-change: transform; height: 200px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   // No explicit raster invalidation for composited layer resize.
@@ -590,7 +592,7 @@
   SetUpHTML(*this);
   Element* target = GetDocument().getElementById("target");
   auto* object = target->GetLayoutObject();
-  target->setAttribute(HTMLNames::classAttr, "background local-background");
+  target->setAttribute(html_names::kClassAttr, "background local-background");
   target->SetInnerHTMLFromString(
       "<div id=child style='width: 500px; height: 500px'></div>",
       ASSERT_NO_EXCEPTION);
@@ -602,14 +604,14 @@
 
   // Resize the content.
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  child->setAttribute(HTMLNames::styleAttr, "width: 500px; height: 1000px");
+  child->setAttribute(html_names::kStyleAttr, "width: 500px; height: 1000px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   // No invalidation because the changed part is invisible.
   EXPECT_FALSE(GetRasterInvalidationTracking()->HasInvalidations());
 
   // Resize the container.
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  target->setAttribute(HTMLNames::styleAttr, "height: 200px");
+  target->setAttribute(html_names::kStyleAttr, "height: 200px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_THAT(GetRasterInvalidationTracking()->Invalidations(),
               UnorderedElementsAre(RasterInvalidationInfo{
@@ -630,14 +632,14 @@
 
   SetUpHTML(*this);
   Element* target = GetDocument().getElementById("target");
-  target->setAttribute(HTMLNames::classAttr, "solid-composited-scroller");
+  target->setAttribute(html_names::kClassAttr, "solid-composited-scroller");
   target->SetInnerHTMLFromString("<div style='height: 500px'></div>",
                                  ASSERT_NO_EXCEPTION);
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   // Resize the scroller.
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  target->setAttribute(HTMLNames::styleAttr, "width: 100px");
+  target->setAttribute(html_names::kStyleAttr, "width: 100px");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   LayoutBoxModelObject* target_object =
@@ -700,7 +702,7 @@
       GetDocument().GetLayoutView()->ShouldCheckForPaintInvalidation());
 
   Element* container = GetDocument().getElementById("container");
-  container->setAttribute(HTMLNames::styleAttr,
+  container->setAttribute(html_names::kStyleAttr,
                           "transform: translateY(1000px);");
   GetDocument().UpdateStyleAndLayoutTree();
 
@@ -725,7 +727,7 @@
   EXPECT_EQ(LayoutRect(0, 0, 100, 100),
             child_layout_view->FirstFragment().VisualRect());
 
-  iframe->setAttribute(HTMLNames::styleAttr, "border: 20px solid blue");
+  iframe->setAttribute(html_names::kStyleAttr, "border: 20px solid blue");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(GetDocument().GetLayoutView(),
             &child_layout_view->ContainerForPaintInvalidation());
@@ -885,12 +887,12 @@
   SetUpHTML(*this);
   Element* target = GetDocument().getElementById("target");
   auto* object = target->GetLayoutObject();
-  target->setAttribute(HTMLNames::classAttr, "background transform");
+  target->setAttribute(html_names::kClassAttr, "background transform");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   auto* layer = ToLayoutBoxModelObject(object)->Layer();
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  target->setAttribute(HTMLNames::styleAttr, "transform: scale(3)");
+  target->setAttribute(html_names::kStyleAttr, "transform: scale(3)");
   GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
   EXPECT_FALSE(layer->NeedsRepaint());
   const auto* transform =
@@ -921,7 +923,7 @@
 
   Element* target = GetDocument().getElementById("target");
   GetDocument().View()->SetTracksPaintInvalidations(true);
-  target->setAttribute(HTMLNames::styleAttr, "width: 200px; height: 200px");
+  target->setAttribute(html_names::kStyleAttr, "width: 200px; height: 200px");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   // No raster invalidations because the resized-div doesn't paint anything by
@@ -1019,7 +1021,7 @@
 
   ResetInvalidationRecorded();
 
-  target->setAttribute(HTMLNames::styleAttr, "opacity: 0.98");
+  target->setAttribute(html_names::kStyleAttr, "opacity: 0.98");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   EXPECT_TRUE(InvalidationRecorded());
diff --git a/third_party/blink/renderer/core/paint/paint_controller_paint_test.cc b/third_party/blink/renderer/core/paint/paint_controller_paint_test.cc
index 0bee538..b2cc0f5a 100644
--- a/third_party/blink/renderer/core/paint/paint_controller_paint_test.cc
+++ b/third_party/blink/renderer/core/paint/paint_controller_paint_test.cc
@@ -61,7 +61,7 @@
       TestDisplayItem(ViewScrollingBackgroundClient(), kDocumentBackgroundType),
       TestDisplayItem(first_text_box, kForegroundType));
 
-  div.setAttribute(HTMLNames::styleAttr, "width: 10px; height: 200px");
+  div.setAttribute(html_names::kStyleAttr, "width: 10px; height: 200px");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   LayoutText& new_text = *ToLayoutText(div_block.FirstChild());
diff --git a/third_party/blink/renderer/core/paint/paint_layer.cc b/third_party/blink/renderer/core/paint/paint_layer.cc
index c59cff51..8f18734 100644
--- a/third_party/blink/renderer/core/paint/paint_layer.cc
+++ b/third_party/blink/renderer/core/paint/paint_layer.cc
@@ -124,8 +124,6 @@
 
 }  // namespace
 
-using namespace HTMLNames;
-
 PaintLayerRareData::PaintLayerRareData()
     : enclosing_pagination_layer(nullptr),
       potential_compositing_reasons_from_style(CompositingReason::kNone),
diff --git a/third_party/blink/renderer/core/paint/paint_layer_painter_test.cc b/third_party/blink/renderer/core/paint/paint_layer_painter_test.cc
index 07913ce..3e46a1b 100644
--- a/third_party/blink/renderer/core/paint/paint_layer_painter_test.cc
+++ b/third_party/blink/renderer/core/paint/paint_layer_painter_test.cc
@@ -155,7 +155,7 @@
   check_chunks();
 
   ToHTMLElement(content1.GetNode())
-      ->setAttribute(HTMLNames::styleAttr,
+      ->setAttribute(html_names::kStyleAttr,
                      "position: absolute; width: 100px; height: 100px; "
                      "background-color: green");
   GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
@@ -327,7 +327,7 @@
       TestDisplayItem(content2, kBackgroundType));
 
   ToHTMLElement(content1.GetNode())
-      ->setAttribute(HTMLNames::styleAttr,
+      ->setAttribute(html_names::kStyleAttr,
                      "position: absolute; width: 100px; height: 100px; "
                      "background-color: green");
   GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
@@ -362,7 +362,7 @@
   LayoutObject& outline_div =
       *GetDocument().getElementById("outline")->GetLayoutObject();
   ToHTMLElement(outline_div.GetNode())
-      ->setAttribute(HTMLNames::styleAttr, style_without_outline);
+      ->setAttribute(html_names::kStyleAttr, style_without_outline);
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   LayoutBoxModelObject& self_painting_layer_object = *ToLayoutBoxModelObject(
@@ -383,7 +383,7 @@
   // Outline on the self-painting-layer node itself doesn't affect
   // PaintPhaseDescendantOutlines.
   ToHTMLElement(self_painting_layer_object.GetNode())
-      ->setAttribute(HTMLNames::styleAttr,
+      ->setAttribute(html_names::kStyleAttr,
                      "position: absolute; outline: 1px solid green");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_FALSE(self_painting_layer.NeedsPaintPhaseDescendantOutlines());
@@ -395,7 +395,7 @@
   // needsPaintPhaseDescendantOutlines should be set when any descendant on the
   // same layer has outline.
   ToHTMLElement(outline_div.GetNode())
-      ->setAttribute(HTMLNames::styleAttr, style_with_outline);
+      ->setAttribute(html_names::kStyleAttr, style_with_outline);
   GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
   EXPECT_TRUE(self_painting_layer.NeedsPaintPhaseDescendantOutlines());
   EXPECT_FALSE(non_self_painting_layer.NeedsPaintPhaseDescendantOutlines());
@@ -407,7 +407,7 @@
   // needsPaintPhaseDescendantOutlines should be reset when no outline is
   // actually painted.
   ToHTMLElement(outline_div.GetNode())
-      ->setAttribute(HTMLNames::styleAttr, style_without_outline);
+      ->setAttribute(html_names::kStyleAttr, style_without_outline);
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_FALSE(self_painting_layer.NeedsPaintPhaseDescendantOutlines());
 }
@@ -429,7 +429,7 @@
   LayoutObject& float_div =
       *GetDocument().getElementById("float")->GetLayoutObject();
   ToHTMLElement(float_div.GetNode())
-      ->setAttribute(HTMLNames::styleAttr, style_without_float);
+      ->setAttribute(html_names::kStyleAttr, style_without_float);
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   LayoutBoxModelObject& self_painting_layer_object = *ToLayoutBoxModelObject(
@@ -450,7 +450,7 @@
   // needsPaintPhaseFloat should be set when any descendant on the same layer
   // has float.
   ToHTMLElement(float_div.GetNode())
-      ->setAttribute(HTMLNames::styleAttr, style_with_float);
+      ->setAttribute(html_names::kStyleAttr, style_with_float);
   GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
   EXPECT_TRUE(self_painting_layer.NeedsPaintPhaseFloat());
   EXPECT_FALSE(non_self_painting_layer.NeedsPaintPhaseFloat());
@@ -462,7 +462,7 @@
   // needsPaintPhaseFloat should be reset when there is no float actually
   // painted.
   ToHTMLElement(float_div.GetNode())
-      ->setAttribute(HTMLNames::styleAttr, style_without_float);
+      ->setAttribute(html_names::kStyleAttr, style_without_float);
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_FALSE(self_painting_layer.NeedsPaintPhaseFloat());
 }
@@ -522,7 +522,7 @@
   LayoutObject& background_div =
       *GetDocument().getElementById("background")->GetLayoutObject();
   ToHTMLElement(background_div.GetNode())
-      ->setAttribute(HTMLNames::styleAttr, style_without_background);
+      ->setAttribute(html_names::kStyleAttr, style_without_background);
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   LayoutBoxModelObject& self_painting_layer_object = *ToLayoutBoxModelObject(
@@ -544,7 +544,7 @@
   // Background on the self-painting-layer node itself doesn't affect
   // PaintPhaseDescendantBlockBackgrounds.
   ToHTMLElement(self_painting_layer_object.GetNode())
-      ->setAttribute(HTMLNames::styleAttr,
+      ->setAttribute(html_names::kStyleAttr,
                      "position: absolute; background: green");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_FALSE(self_painting_layer.NeedsPaintPhaseDescendantBlockBackgrounds());
@@ -557,7 +557,7 @@
   // needsPaintPhaseDescendantBlockBackgrounds should be set when any descendant
   // on the same layer has Background.
   ToHTMLElement(background_div.GetNode())
-      ->setAttribute(HTMLNames::styleAttr, style_with_background);
+      ->setAttribute(html_names::kStyleAttr, style_with_background);
   GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
   EXPECT_TRUE(self_painting_layer.NeedsPaintPhaseDescendantBlockBackgrounds());
   EXPECT_FALSE(
@@ -570,7 +570,7 @@
   // needsPaintPhaseDescendantBlockBackgrounds should be reset when no outline
   // is actually painted.
   ToHTMLElement(background_div.GetNode())
-      ->setAttribute(HTMLNames::styleAttr, style_without_background);
+      ->setAttribute(html_names::kStyleAttr, style_without_background);
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_FALSE(self_painting_layer.NeedsPaintPhaseDescendantBlockBackgrounds());
 }
@@ -602,7 +602,7 @@
   EXPECT_FALSE(html_layer.NeedsPaintPhaseFloat());
   EXPECT_FALSE(html_layer.NeedsPaintPhaseDescendantBlockBackgrounds());
 
-  ToHTMLElement(layer_div.GetNode())->setAttribute(HTMLNames::styleAttr, "");
+  ToHTMLElement(layer_div.GetNode())->setAttribute(html_names::kStyleAttr, "");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   EXPECT_FALSE(layer_div.HasLayer());
@@ -635,7 +635,7 @@
   EXPECT_TRUE(html_layer.NeedsPaintPhaseDescendantBlockBackgrounds());
 
   ToHTMLElement(layer_div.GetNode())
-      ->setAttribute(HTMLNames::styleAttr, "position: relative");
+      ->setAttribute(html_names::kStyleAttr, "position: relative");
   GetDocument().View()->UpdateAllLifecyclePhases();
   ASSERT_TRUE(layer_div.HasLayer());
   PaintLayer& layer = *layer_div.Layer();
@@ -671,7 +671,7 @@
 
   ToHTMLElement(layer_div.GetNode())
       ->setAttribute(
-          HTMLNames::styleAttr,
+          html_names::kStyleAttr,
           "width: 100px; height: 100px; overflow: hidden; position: relative");
   GetDocument().View()->UpdateAllLifecyclePhases();
   PaintLayer& layer = *layer_div.Layer();
@@ -710,7 +710,7 @@
   EXPECT_FALSE(html_layer.NeedsPaintPhaseDescendantBlockBackgrounds());
 
   ToHTMLElement(layer_div.GetNode())
-      ->setAttribute(HTMLNames::styleAttr,
+      ->setAttribute(html_names::kStyleAttr,
                      "width: 100px; height: 100px; overflow: hidden");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_FALSE(layer.IsSelfPaintingLayer());
@@ -757,7 +757,7 @@
   EXPECT_FALSE(layer.NeedsPaintPhaseDescendantBlockBackgrounds());
 
   ToHTMLElement(table.GetNode())
-      ->setAttribute(HTMLNames::styleAttr,
+      ->setAttribute(html_names::kStyleAttr,
                      "position: relative; border-collapse: collapse");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_TRUE(layer.NeedsPaintPhaseDescendantBlockBackgrounds());
diff --git a/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc b/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc
index 88a6a8c..c5c5713 100644
--- a/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc
+++ b/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc
@@ -2314,7 +2314,9 @@
 
   const TopDocumentRootScrollerController& controller =
       GetLayoutBox()->GetDocument().GetPage()->GlobalRootScrollerController();
-  return controller.RootScrollerArea() == this;
+
+  return root_scroller_util::ScrollableAreaForRootScroller(
+             controller.GlobalRootScroller()) == this;
 }
 
 bool PaintLayerScrollableArea::ScheduleAnimation() {
diff --git a/third_party/blink/renderer/core/paint/paint_layer_scrollable_area_test.cc b/third_party/blink/renderer/core/paint/paint_layer_scrollable_area_test.cc
index f70cb56..902a9eb 100644
--- a/third_party/blink/renderer/core/paint/paint_layer_scrollable_area_test.cc
+++ b/third_party/blink/renderer/core/paint/paint_layer_scrollable_area_test.cc
@@ -346,7 +346,7 @@
 
   // Change the background to transparent
   scroller->setAttribute(
-      HTMLNames::styleAttr,
+      html_names::kStyleAttr,
       "background: rgba(255,255,255,0.5) local content-box;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   paint_layer = ToLayoutBoxModelObject(scroller->GetLayoutObject())->Layer();
@@ -373,7 +373,7 @@
   EXPECT_FALSE(paint_layer->NeedsCompositedScrolling());
 
   // Change the background to opaque
-  scroller->setAttribute(HTMLNames::styleAttr,
+  scroller->setAttribute(html_names::kStyleAttr,
                          "background: white local content-box;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   paint_layer = ToLayoutBoxModelObject(scroller->GetLayoutObject())->Layer();
@@ -411,7 +411,7 @@
   EXPECT_TRUE(paint_layer->GraphicsLayerBacking()->ContentsOpaque());
 
   // Change the parent to have a transform.
-  parent->setAttribute(HTMLNames::styleAttr, "transform: translate(1px, 0);");
+  parent->setAttribute(html_names::kStyleAttr, "transform: translate(1px, 0);");
   GetDocument().View()->UpdateAllLifecyclePhases();
   paint_layer = ToLayoutBoxModelObject(scroller->GetLayoutObject())->Layer();
   ASSERT_TRUE(paint_layer);
@@ -419,7 +419,7 @@
   EXPECT_FALSE(paint_layer->GraphicsLayerBacking());
 
   // Change the parent to have no transform again.
-  parent->removeAttribute(HTMLNames::styleAttr);
+  parent->removeAttribute(html_names::kStyleAttr);
   GetDocument().View()->UpdateAllLifecyclePhases();
   paint_layer = ToLayoutBoxModelObject(scroller->GetLayoutObject())->Layer();
   ASSERT_TRUE(paint_layer);
@@ -429,7 +429,8 @@
   EXPECT_TRUE(paint_layer->GraphicsLayerBacking()->ContentsOpaque());
 
   // Apply a transform to the scroller directly.
-  scroller->setAttribute(HTMLNames::styleAttr, "transform: translate(1px, 0);");
+  scroller->setAttribute(html_names::kStyleAttr,
+                         "transform: translate(1px, 0);");
   GetDocument().View()->UpdateAllLifecyclePhases();
   paint_layer = ToLayoutBoxModelObject(scroller->GetLayoutObject())->Layer();
   ASSERT_TRUE(paint_layer);
@@ -463,7 +464,7 @@
   EXPECT_TRUE(paint_layer->GraphicsLayerBacking()->ContentsOpaque());
 
   // Change the parent to be partially translucent.
-  parent->setAttribute(HTMLNames::styleAttr, "opacity: 0.5;");
+  parent->setAttribute(html_names::kStyleAttr, "opacity: 0.5;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   paint_layer = ToLayoutBoxModelObject(scroller->GetLayoutObject())->Layer();
   ASSERT_TRUE(paint_layer);
@@ -471,7 +472,7 @@
   EXPECT_FALSE(paint_layer->GraphicsLayerBacking());
 
   // Change the parent to be opaque again.
-  parent->setAttribute(HTMLNames::styleAttr, "opacity: 1;");
+  parent->setAttribute(html_names::kStyleAttr, "opacity: 1;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   paint_layer = ToLayoutBoxModelObject(scroller->GetLayoutObject())->Layer();
   ASSERT_TRUE(paint_layer);
@@ -481,7 +482,7 @@
   EXPECT_TRUE(paint_layer->GraphicsLayerBacking()->ContentsOpaque());
 
   // Make the scroller translucent.
-  scroller->setAttribute(HTMLNames::styleAttr, "opacity: 0.5");
+  scroller->setAttribute(html_names::kStyleAttr, "opacity: 0.5");
   GetDocument().View()->UpdateAllLifecyclePhases();
   paint_layer = ToLayoutBoxModelObject(scroller->GetLayoutObject())->Layer();
   ASSERT_TRUE(paint_layer);
@@ -602,7 +603,7 @@
   EXPECT_TRUE(paint_layer->NeedsCompositedScrolling());
 
   // Add clip to scroller.
-  scroller->setAttribute(HTMLNames::classAttr, "clip");
+  scroller->setAttribute(html_names::kClassAttr, "clip");
   GetDocument().View()->UpdateAllLifecyclePhases();
   paint_layer = ToLayoutBoxModelObject(scroller->GetLayoutObject())->Layer();
   ASSERT_TRUE(paint_layer);
diff --git a/third_party/blink/renderer/core/paint/paint_layer_test.cc b/third_party/blink/renderer/core/paint/paint_layer_test.cc
index a56863c..137f2c5e 100644
--- a/third_party/blink/renderer/core/paint/paint_layer_test.cc
+++ b/third_party/blink/renderer/core/paint/paint_layer_test.cc
@@ -324,7 +324,7 @@
   EXPECT_TRUE(parent->HasStickyPositionDescendant());
   EXPECT_FALSE(child->HasStickyPositionDescendant());
 
-  GetDocument().getElementById("child")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("child")->setAttribute(html_names::kStyleAttr,
                                                       "position: relative");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
@@ -344,7 +344,7 @@
   EXPECT_TRUE(parent->HasFixedPositionDescendant());
   EXPECT_FALSE(child->HasFixedPositionDescendant());
 
-  GetDocument().getElementById("child")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("child")->setAttribute(html_names::kStyleAttr,
                                                       "position: relative");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
@@ -371,7 +371,7 @@
   EXPECT_FALSE(child1->HasStickyPositionDescendant());
   EXPECT_FALSE(child2->HasStickyPositionDescendant());
 
-  GetDocument().getElementById("child1")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("child1")->setAttribute(html_names::kStyleAttr,
                                                        "position: relative");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
@@ -382,7 +382,7 @@
   EXPECT_FALSE(child1->HasStickyPositionDescendant());
   EXPECT_FALSE(child2->HasStickyPositionDescendant());
 
-  GetDocument().getElementById("child2")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("child2")->setAttribute(html_names::kStyleAttr,
                                                        "position: relative");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
@@ -406,14 +406,14 @@
   EXPECT_FALSE(parent->HasNonContainedAbsolutePositionDescendant());
   EXPECT_FALSE(child->HasNonContainedAbsolutePositionDescendant());
 
-  GetDocument().getElementById("child")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("child")->setAttribute(html_names::kStyleAttr,
                                                       "position: absolute");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   EXPECT_TRUE(parent->HasNonContainedAbsolutePositionDescendant());
   EXPECT_FALSE(child->HasNonContainedAbsolutePositionDescendant());
 
-  GetDocument().getElementById("parent")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("parent")->setAttribute(html_names::kStyleAttr,
                                                        "position: relative");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_FALSE(parent->HasNonContainedAbsolutePositionDescendant());
@@ -565,7 +565,7 @@
 
   GetDocument()
       .getElementById("grandchild1")
-      ->setAttribute(HTMLNames::styleAttr, "isolation: isolate");
+      ->setAttribute(html_names::kStyleAttr, "isolation: isolate");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   EXPECT_FALSE(parent->SupportsSubsequenceCaching());
@@ -612,7 +612,7 @@
   EXPECT_TRUE(target->StackingNode()->HasNegativeZOrderList());
   EXPECT_FALSE(target->StackingNode()->HasPositiveZOrderList());
 
-  GetDocument().getElementById("child")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("child")->setAttribute(html_names::kStyleAttr,
                                                       "z-index: 1");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
@@ -682,7 +682,7 @@
   EXPECT_FALSE(child->Has3DTransformedDescendant());
 
   GetDocument().getElementById("child")->setAttribute(
-      HTMLNames::styleAttr, "transform: translateZ(1px)");
+      html_names::kStyleAttr, "transform: translateZ(1px)");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   EXPECT_TRUE(parent->Has3DTransformedDescendant());
@@ -738,7 +738,7 @@
 
   // Move the child frame offscreen so it becomes available for throttling.
   auto* iframe = ToHTMLIFrameElement(GetDocument().getElementById("iframe"));
-  iframe->setAttribute(HTMLNames::styleAttr, "transform: translateY(5555px)");
+  iframe->setAttribute(html_names::kStyleAttr, "transform: translateY(5555px)");
   GetDocument().View()->UpdateAllLifecyclePhases();
   // Ensure intersection observer notifications get delivered.
   test::RunPendingTasks();
@@ -1353,7 +1353,7 @@
   // Removing column-width: 10px makes target layer no longer self-painting,
   // and change its compositing container. The original compositing container
   // span_layer should be marked NeedsRepaint.
-  target_element->setAttribute(HTMLNames::styleAttr,
+  target_element->setAttribute(html_names::kStyleAttr,
                                "overflow: hidden; float: left");
   GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
   EXPECT_FALSE(target_layer->IsSelfPaintingLayer());
@@ -1381,8 +1381,8 @@
   EXPECT_NE(body_layer, target_layer->CompositingContainer());
   auto* old_compositing_container = target_layer->CompositingContainer();
 
-  body->setAttribute(HTMLNames::styleAttr, "margin-top: 0");
-  target_element->setAttribute(HTMLNames::styleAttr, "top: 0");
+  body->setAttribute(html_names::kStyleAttr, "margin-top: 0");
+  target_element->setAttribute(html_names::kStyleAttr, "top: 0");
   GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
 
   EXPECT_FALSE(target_object->HasLayer());
diff --git a/third_party/blink/renderer/core/paint/paint_property_tree_builder_test.cc b/third_party/blink/renderer/core/paint/paint_property_tree_builder_test.cc
index 5e4f024..a80d3fd 100644
--- a/third_party/blink/renderer/core/paint/paint_property_tree_builder_test.cc
+++ b/third_party/blink/renderer/core/paint/paint_property_tree_builder_test.cc
@@ -558,7 +558,7 @@
                           inner->GetLayoutObject(),
                           GetDocument().View()->GetLayoutView());
 
-  perspective->setAttribute(HTMLNames::styleAttr, "perspective: 200px");
+  perspective->setAttribute(html_names::kStyleAttr, "perspective: 200px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(TransformationMatrix().ApplyPerspective(200),
             perspective_properties->Perspective()->Matrix());
@@ -574,7 +574,8 @@
               perspective_properties->Perspective()->Parent());
   }
 
-  perspective->setAttribute(HTMLNames::styleAttr, "perspective-origin: 5% 20%");
+  perspective->setAttribute(html_names::kStyleAttr,
+                            "perspective-origin: 5% 20%");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(TransformationMatrix().ApplyPerspective(100),
             perspective_properties->Perspective()->Matrix());
@@ -625,14 +626,14 @@
                           GetDocument().View()->GetLayoutView());
 
   transform->setAttribute(
-      HTMLNames::styleAttr,
+      html_names::kStyleAttr,
       "margin-left: 50px; margin-top: 100px; width: 400px; height: 300px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(nullptr,
             transform->GetLayoutObject()->FirstFragment().PaintProperties());
 
   transform->setAttribute(
-      HTMLNames::styleAttr,
+      html_names::kStyleAttr,
       "margin-left: 50px; margin-top: 100px; width: 400px; height: 300px; "
       "transform: translate3d(123px, 456px, 789px)");
   GetDocument().View()->UpdateAllLifecyclePhases();
@@ -752,14 +753,14 @@
                           GetDocument().View()->GetLayoutView());
 
   transform->setAttribute(
-      HTMLNames::styleAttr,
+      html_names::kStyleAttr,
       "margin-left: 50px; margin-top: 100px; width: 400px; height: 300px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(nullptr,
             transform->GetLayoutObject()->FirstFragment().PaintProperties());
 
   transform->setAttribute(
-      HTMLNames::styleAttr,
+      html_names::kStyleAttr,
       "margin-left: 50px; margin-top: 100px; width: 400px; height: 300px; "
       "will-change: transform");
   GetDocument().View()->UpdateAllLifecyclePhases();
@@ -1902,7 +1903,7 @@
 
   // This causes a tree topology change which forces the subtree to be updated.
   // However, isolation stops this recursion.
-  GetDocument().getElementById("parent")->setAttribute(HTMLNames::classAttr,
+  GetDocument().getElementById("parent")->setAttribute(html_names::kClassAttr,
                                                        "transformed");
   frame_view->UpdateAllLifecyclePhases();
 
@@ -3254,7 +3255,7 @@
   // Change transform of b. B's transform node should be a new node with the new
   // value, and a and c's transform nodes should be unchanged (with c's parent
   // adjusted).
-  b->setAttribute(HTMLNames::styleAttr, "transform: translate(111px, 222px)");
+  b->setAttribute(html_names::kStyleAttr, "transform: translate(111px, 222px)");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   EXPECT_EQ(a_properties,
@@ -3283,7 +3284,7 @@
   // Remove transform from b. B's transform node should be removed from the
   // tree, and a and c's transform nodes should be unchanged (with c's parent
   // adjusted).
-  b->setAttribute(HTMLNames::styleAttr, "");
+  b->setAttribute(html_names::kStyleAttr, "");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   EXPECT_EQ(a_properties,
@@ -3307,7 +3308,7 @@
   // Re-add transform to b. B's transform node should be inserted into the tree,
   // and a and c's transform nodes should be unchanged (with c's parent
   // adjusted).
-  b->setAttribute(HTMLNames::styleAttr, "transform: translate(4px, 5px)");
+  b->setAttribute(html_names::kStyleAttr, "transform: translate(4px, 5px)");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   EXPECT_EQ(a_properties,
@@ -4660,7 +4661,7 @@
   EXPECT_EQ(LayoutUnit(20), target->FirstFragment().LogicalTopInFlowThread());
   Element* target_element = GetDocument().getElementById("target");
 
-  target_element->setAttribute(HTMLNames::styleAttr, "position: absolute");
+  target_element->setAttribute(html_names::kStyleAttr, "position: absolute");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(LayoutPoint(0, 0), target->FirstFragment().PaginationOffset());
   EXPECT_EQ(LayoutUnit(), target->FirstFragment().LogicalTopInFlowThread());
@@ -4819,7 +4820,7 @@
             descendant->FirstFragment().LocalBorderBoxProperties().Clip());
 
   ToElement(ancestor->GetNode())
-      ->setAttribute(HTMLNames::styleAttr, "position: static");
+      ->setAttribute(html_names::kStyleAttr, "position: static");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_NE(ancestor->FirstFragment().PaintProperties()->OverflowClip(),
             descendant->FirstFragment().LocalBorderBoxProperties().Clip());
@@ -5274,7 +5275,7 @@
   // And the scroll node should not.
   EXPECT_EQ(IntRect(0, 0, 100, 100), scroll_node->ContainerRect());
 
-  scroller->setAttribute(HTMLNames::styleAttr, "border: 20px solid black;");
+  scroller->setAttribute(html_names::kStyleAttr, "border: 20px solid black;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   // The paint offset node should be offset by the margin.
   EXPECT_EQ(FloatSize(7, 11),
@@ -5282,7 +5283,7 @@
   // The scroll node should be offset by the border.
   EXPECT_EQ(IntRect(20, 20, 100, 100), scroll_node->ContainerRect());
 
-  scroller->setAttribute(HTMLNames::styleAttr,
+  scroller->setAttribute(html_names::kStyleAttr,
                          "border: 20px solid black;"
                          "transform: translate(20px, 30px);");
   GetDocument().View()->UpdateAllLifecyclePhases();
@@ -5328,7 +5329,7 @@
     EXPECT_EQ(nullptr, transform);
   }
 
-  ToElement(target->GetNode())->setAttribute(HTMLNames::styleAttr, "");
+  ToElement(target->GetNode())->setAttribute(html_names::kStyleAttr, "");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(LayoutPoint(60, 50), target->FirstFragment().PaintOffset());
   EXPECT_EQ(nullptr, target->FirstFragment().PaintProperties());
@@ -5553,7 +5554,7 @@
 
   EXPECT_FALSE(ToLayoutBoxModelObject(target)->Layer()->NeedsRepaint());
 
-  opacity_element->setAttribute(HTMLNames::styleAttr, "opacity: 0.5");
+  opacity_element->setAttribute(html_names::kStyleAttr, "opacity: 0.5");
   GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
 
   // All paint chunks contained by the new opacity effect node need to be
@@ -5632,7 +5633,7 @@
 
   // Remove scrolling from the root.
   Element* force_scroll_element = GetDocument().getElementById("forceScroll");
-  force_scroll_element->setAttribute(HTMLNames::styleAttr, "");
+  force_scroll_element->setAttribute(html_names::kStyleAttr, "");
   GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
   // TODO(crbug.com/732611): SPv2 invalidations are incorrect if there is
   // scrolling.
@@ -5749,7 +5750,7 @@
   auto* child_layer = ToLayoutBox(GetLayoutObjectByElementId("child"))->Layer();
   EXPECT_FALSE(child_layer->NeedsRepaint());
 
-  GetDocument().body()->setAttribute(HTMLNames::classAttr, "noscrollbars");
+  GetDocument().body()->setAttribute(html_names::kClassAttr, "noscrollbars");
   GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
   EXPECT_FALSE(child_layer->NeedsRepaint());
 }
@@ -6093,7 +6094,7 @@
   }
 
   GetDocument().getElementById("target")->setAttribute(
-      HTMLNames::styleAttr, "padding: 1px 2px 3px 4px;");
+      html_names::kStyleAttr, "padding: 1px 2px 3px 4px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   {
@@ -6309,7 +6310,7 @@
   EXPECT_FLOAT_EQ(properties->Effect()->Opacity(), 1.f);
 
   auto* div = GetDocument().getElementById("div");
-  div->setAttribute(HTMLNames::classAttr, "transluscent");
+  div->setAttribute(html_names::kClassAttr, "transluscent");
   GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
   EXPECT_FALSE(ToLayoutBox(div->GetLayoutObject())->Layer()->NeedsRepaint());
 
diff --git a/third_party/blink/renderer/core/paint/paint_property_tree_update_tests.cc b/third_party/blink/renderer/core/paint/paint_property_tree_update_tests.cc
index 15c553c..42dc2d35 100644
--- a/third_party/blink/renderer/core/paint/paint_property_tree_update_tests.cc
+++ b/third_party/blink/renderer/core/paint/paint_property_tree_update_tests.cc
@@ -127,7 +127,7 @@
                    ->HasBackgroundAttachmentFixedDescendants());
 
   // Adding a main thread scrolling reason should update the entire tree.
-  overflow_b->setAttribute(HTMLNames::classAttr, "backgroundAttachmentFixed");
+  overflow_b->setAttribute(html_names::kClassAttr, "backgroundAttachmentFixed");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_TRUE(DocScroll()->HasBackgroundAttachmentFixedDescendants());
   EXPECT_TRUE(overflow_a->GetLayoutObject()
@@ -168,13 +168,13 @@
 
   // Removing a main thread scrolling reason should update the entire tree.
   auto* fixed_background = GetDocument().getElementById("fixedBackground");
-  fixed_background->removeAttribute(HTMLNames::classAttr);
+  fixed_background->removeAttribute(html_names::kClassAttr);
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_FALSE(DocScroll(parent)->HasBackgroundAttachmentFixedDescendants());
   EXPECT_FALSE(DocScroll(child)->HasBackgroundAttachmentFixedDescendants());
 
   // Adding a main thread scrolling reason should update the entire tree.
-  fixed_background->setAttribute(HTMLNames::classAttr, "fixedBackground");
+  fixed_background->setAttribute(html_names::kClassAttr, "fixedBackground");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_TRUE(DocScroll(parent)->HasBackgroundAttachmentFixedDescendants());
   EXPECT_TRUE(DocScroll(child)->HasBackgroundAttachmentFixedDescendants());
@@ -206,13 +206,13 @@
 
   // Removing a main thread scrolling reason should update the entire tree.
   auto* fixed_background = ChildDocument().getElementById("fixedBackground");
-  fixed_background->removeAttribute(HTMLNames::classAttr);
+  fixed_background->removeAttribute(html_names::kClassAttr);
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_FALSE(DocScroll(parent)->HasBackgroundAttachmentFixedDescendants());
   EXPECT_FALSE(DocScroll(child)->HasBackgroundAttachmentFixedDescendants());
 
   // Adding a main thread scrolling reason should update the entire tree.
-  fixed_background->setAttribute(HTMLNames::classAttr, "fixedBackground");
+  fixed_background->setAttribute(html_names::kClassAttr, "fixedBackground");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_FALSE(DocScroll(parent)->HasBackgroundAttachmentFixedDescendants());
   EXPECT_TRUE(DocScroll(child)->HasBackgroundAttachmentFixedDescendants());
@@ -392,7 +392,7 @@
 
   // Move the child frame offscreen so it becomes available for throttling.
   auto* iframe = ToHTMLIFrameElement(GetDocument().getElementById("iframe"));
-  iframe->setAttribute(HTMLNames::styleAttr, "transform: translateY(5555px)");
+  iframe->setAttribute(html_names::kStyleAttr, "transform: translateY(5555px)");
   GetDocument().View()->UpdateAllLifecyclePhases();
   // Ensure intersection observer notifications get delivered.
   test::RunPendingTasks();
@@ -467,57 +467,57 @@
     </div>
   )HTML");
   auto* div = GetDocument().getElementById("div");
-  div->setAttribute(HTMLNames::styleAttr, "display:inline-block; width:7px;");
+  div->setAttribute(html_names::kStyleAttr, "display:inline-block; width:7px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   auto* clip_properties =
       div->GetLayoutObject()->FirstFragment().PaintProperties()->OverflowClip();
   EXPECT_EQ(FloatRect(0, 0, 7, 0), clip_properties->ClipRect().Rect());
 
   // Width changes should update the overflow clip.
-  div->setAttribute(HTMLNames::styleAttr, "display:inline-block; width:7px;");
+  div->setAttribute(html_names::kStyleAttr, "display:inline-block; width:7px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   clip_properties =
       div->GetLayoutObject()->FirstFragment().PaintProperties()->OverflowClip();
   EXPECT_EQ(FloatRect(0, 0, 7, 0), clip_properties->ClipRect().Rect());
-  div->setAttribute(HTMLNames::styleAttr, "display:inline-block; width:9px;");
+  div->setAttribute(html_names::kStyleAttr, "display:inline-block; width:9px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(FloatRect(0, 0, 9, 0), clip_properties->ClipRect().Rect());
 
   // An inline block's overflow clip should be updated when padding changes,
   // even if the border box remains unchanged.
-  div->setAttribute(HTMLNames::styleAttr,
+  div->setAttribute(html_names::kStyleAttr,
                     "display:inline-block; width:7px; padding-right:3px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   clip_properties =
       div->GetLayoutObject()->FirstFragment().PaintProperties()->OverflowClip();
   EXPECT_EQ(FloatRect(0, 0, 10, 0), clip_properties->ClipRect().Rect());
-  div->setAttribute(HTMLNames::styleAttr,
+  div->setAttribute(html_names::kStyleAttr,
                     "display:inline-block; width:8px; padding-right:2px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(FloatRect(0, 0, 10, 0), clip_properties->ClipRect().Rect());
-  div->setAttribute(HTMLNames::styleAttr,
+  div->setAttribute(html_names::kStyleAttr,
                     "display:inline-block; width:8px;"
                     "padding-right:1px; padding-left:1px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(FloatRect(0, 0, 10, 0), clip_properties->ClipRect().Rect());
 
   // An block's overflow clip should be updated when borders change.
-  div->setAttribute(HTMLNames::styleAttr, "border-right:3px solid red;");
+  div->setAttribute(html_names::kStyleAttr, "border-right:3px solid red;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   clip_properties =
       div->GetLayoutObject()->FirstFragment().PaintProperties()->OverflowClip();
   EXPECT_EQ(FloatRect(0, 0, 797, 0), clip_properties->ClipRect().Rect());
-  div->setAttribute(HTMLNames::styleAttr, "border-right:5px solid red;");
+  div->setAttribute(html_names::kStyleAttr, "border-right:5px solid red;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(FloatRect(0, 0, 795, 0), clip_properties->ClipRect().Rect());
 
   // Removing overflow clip should remove the property.
-  div->setAttribute(HTMLNames::styleAttr, "overflow:hidden;");
+  div->setAttribute(html_names::kStyleAttr, "overflow:hidden;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   clip_properties =
       div->GetLayoutObject()->FirstFragment().PaintProperties()->OverflowClip();
   EXPECT_EQ(FloatRect(0, 0, 800, 0), clip_properties->ClipRect().Rect());
-  div->setAttribute(HTMLNames::styleAttr, "overflow:visible;");
+  div->setAttribute(html_names::kStyleAttr, "overflow:visible;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_TRUE(!div->GetLayoutObject()->FirstFragment().PaintProperties() ||
               !div->GetLayoutObject()
@@ -542,7 +542,7 @@
       div->GetLayoutObject()->FirstFragment().PaintProperties()->OverflowClip();
   EXPECT_EQ(FloatRect(0, 0, 7, 6), properties->ClipRect().Rect());
 
-  div->setAttribute(HTMLNames::styleAttr, "");
+  div->setAttribute(html_names::kStyleAttr, "");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_TRUE(!div->GetLayoutObject()->FirstFragment().PaintProperties() ||
               !div->GetLayoutObject()
@@ -557,7 +557,7 @@
   auto* div = GetDocument().getElementById("div");
 
   GetDocument().View()->UpdateAllLifecyclePhases();
-  div->setAttribute(HTMLNames::styleAttr, "background-color: green");
+  div->setAttribute(html_names::kStyleAttr, "background-color: green");
   GetDocument().View()->UpdateLifecycleToLayoutClean();
   EXPECT_FALSE(div->GetLayoutObject()->NeedsPaintPropertyUpdate());
 }
@@ -582,7 +582,7 @@
   EXPECT_NE(nullptr, DocScroll(child_doc));
 
   auto* iframe_container = GetDocument().getElementById("iframeContainer");
-  iframe_container->setAttribute(HTMLNames::styleAttr, "visibility: hidden;");
+  iframe_container->setAttribute(html_names::kStyleAttr, "visibility: hidden;");
   frame_view->UpdateAllLifecyclePhases();
 
   EXPECT_EQ(nullptr, DocScroll());
@@ -599,7 +599,7 @@
     EXPECT_TRUE(properties->Transform()->HasDirectCompositingReasons());
 
   // Removing the animation should remove the transform node.
-  target->removeAttribute(HTMLNames::classAttr);
+  target->removeAttribute(html_names::kClassAttr);
   GetDocument().View()->UpdateAllLifecyclePhases();
   // Ensure the paint properties object was cleared as it is no longer needed.
   EXPECT_EQ(nullptr,
@@ -616,7 +616,7 @@
     EXPECT_TRUE(properties->Effect()->HasDirectCompositingReasons());
 
   // Removing the animation should remove the effect node.
-  target->removeAttribute(HTMLNames::classAttr);
+  target->removeAttribute(html_names::kClassAttr);
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(nullptr,
             target->GetLayoutObject()->FirstFragment().PaintProperties());
@@ -630,7 +630,7 @@
   LoadTestData("transform-animation.html");
 
   Element* target = GetDocument().getElementById("target");
-  target->setAttribute(HTMLNames::styleAttr, "transform: translateX(2em)");
+  target->setAttribute(html_names::kStyleAttr, "transform: translateX(2em)");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   const ObjectPaintProperties* properties =
@@ -639,7 +639,7 @@
             properties->Transform()->GetCompositorElementId());
 
   // Remove the animation but keep the transform on the element.
-  target->removeAttribute(HTMLNames::classAttr);
+  target->removeAttribute(html_names::kClassAttr);
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_NE(CompositorElementId(),
             properties->Transform()->GetCompositorElementId());
@@ -653,7 +653,7 @@
   LoadTestData("opacity-animation.html");
 
   Element* target = GetDocument().getElementById("target");
-  target->setAttribute(HTMLNames::styleAttr, "opacity: 0.2");
+  target->setAttribute(html_names::kStyleAttr, "opacity: 0.2");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   const ObjectPaintProperties* properties =
@@ -661,7 +661,7 @@
   EXPECT_NE(CompositorElementId(),
             properties->Effect()->GetCompositorElementId());
 
-  target->removeAttribute(HTMLNames::classAttr);
+  target->removeAttribute(html_names::kClassAttr);
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_NE(CompositorElementId(),
             properties->Effect()->GetCompositorElementId());
@@ -692,7 +692,7 @@
       perspective->FirstFragment().PaintProperties()->Perspective()->Origin());
 
   auto* contents = GetDocument().getElementById("contents");
-  contents->setAttribute(HTMLNames::styleAttr, "height: 200px;");
+  contents->setAttribute(html_names::kStyleAttr, "height: 200px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(
       TransformationMatrix().ApplyPerspective(100),
@@ -723,7 +723,8 @@
                 ->Transform()
                 ->Matrix());
 
-  transform->setAttribute(HTMLNames::styleAttr, "width: 200px; height: 300px;");
+  transform->setAttribute(html_names::kStyleAttr,
+                          "width: 200px; height: 300px;");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(TransformationMatrix().Translate3d(100, 150, 0),
             transform_object->FirstFragment()
@@ -757,7 +758,7 @@
       FloatRect(45, 50, 105, 100),
       clip->FirstFragment().PaintProperties()->CssClip()->ClipRect().Rect());
 
-  outer->setAttribute(HTMLNames::styleAttr, "height: 200px");
+  outer->setAttribute(html_names::kStyleAttr, "height: 200px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(
       FloatRect(45, 50, 105, 200),
@@ -781,7 +782,7 @@
   EXPECT_EQ(IntSize(200, 200), scroll_node->ContentsSize());
 
   GetDocument().getElementById("content")->setAttribute(
-      HTMLNames::styleAttr, "width: 200px; height: 300px");
+      html_names::kStyleAttr, "width: 200px; height: 300px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(scroll_node, container->FirstFragment()
                              .PaintProperties()
@@ -827,7 +828,7 @@
       container->FirstFragment().PaintProperties()->OverflowClip();
   EXPECT_EQ(FloatSize(80, 80), overflow_clip->ClipRect().Rect().Size());
 
-  auto* new_style = GetDocument().CreateRawElement(HTMLNames::styleTag);
+  auto* new_style = GetDocument().CreateRawElement(html_names::kStyleTag);
   new_style->setTextContent("::-webkit-scrollbar {width: 40px; height: 40px}");
   GetDocument().body()->AppendChild(new_style);
 
@@ -849,7 +850,7 @@
   EXPECT_TRUE(transform->FlattensInheritedTransform());
 
   GetDocument().getElementById("parent")->setAttribute(
-      HTMLNames::styleAttr, "transform-style: preserve-3d");
+      html_names::kStyleAttr, "transform-style: preserve-3d");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(transform, child->FirstFragment().PaintProperties()->Transform());
   EXPECT_FALSE(transform->FlattensInheritedTransform());
@@ -883,7 +884,7 @@
   EXPECT_EQ(nullptr, PaintPropertiesForElement("target"));
 
   auto* target = GetDocument().getElementById("target");
-  target->setAttribute(HTMLNames::styleAttr,
+  target->setAttribute(html_names::kStyleAttr,
                        "-webkit-mask: linear-gradient(red, blue)");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
@@ -895,7 +896,7 @@
   ASSERT_NE(nullptr, mask_clip);
   EXPECT_EQ(FloatRoundedRect(8, 8, 100, 100), mask_clip->ClipRect());
 
-  target->setAttribute(HTMLNames::styleAttr, "");
+  target->setAttribute(html_names::kStyleAttr, "");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(nullptr, PaintPropertiesForElement("target"));
 }
@@ -920,7 +921,7 @@
   ASSERT_NE(nullptr, mask_clip);
   EXPECT_EQ(FloatRoundedRect(8, 8, 100, 100), mask_clip->ClipRect());
 
-  GetDocument().getElementById("target")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("target")->setAttribute(html_names::kStyleAttr,
                                                        "height: 200px");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
@@ -935,7 +936,7 @@
   EXPECT_EQ(nullptr, PaintPropertiesForElement("target"));
 
   auto* target = GetDocument().getElementById("target");
-  target->setAttribute(HTMLNames::styleAttr,
+  target->setAttribute(html_names::kStyleAttr,
                        "-webkit-mask: linear-gradient(red, blue)");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
@@ -947,7 +948,7 @@
   ASSERT_NE(nullptr, mask_clip);
   EXPECT_EQ(50, mask_clip->ClipRect().Rect().Width());
 
-  target->setAttribute(HTMLNames::styleAttr, "");
+  target->setAttribute(html_names::kStyleAttr, "");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(nullptr, PaintPropertiesForElement("target"));
 }
@@ -965,7 +966,7 @@
   ASSERT_NE(nullptr, mask_clip);
   EXPECT_EQ(50, mask_clip->ClipRect().Rect().Width());
 
-  GetDocument().getElementById("img")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("img")->setAttribute(html_names::kStyleAttr,
                                                     "width: 100px");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
@@ -1047,14 +1048,14 @@
             fixed->FirstFragment().LocalBorderBoxProperties().Transform());
 
   ToElement(container->GetNode())
-      ->setAttribute(HTMLNames::styleAttr, "will-change: top");
+      ->setAttribute(html_names::kStyleAttr, "will-change: top");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(
       GetLayoutView().FirstFragment().LocalBorderBoxProperties().Transform(),
       fixed->FirstFragment().LocalBorderBoxProperties().Transform());
 
   ToElement(container->GetNode())
-      ->setAttribute(HTMLNames::styleAttr, "will-change: transform");
+      ->setAttribute(html_names::kStyleAttr, "will-change: transform");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(container->FirstFragment().PaintProperties()->Transform(),
             fixed->FirstFragment().LocalBorderBoxProperties().Transform());
@@ -1087,7 +1088,7 @@
   ASSERT_TRUE(filter);
   EXPECT_FALSE(filter->HasDirectCompositingReasons());
 
-  target->setAttribute(HTMLNames::styleAttr, "transform: translateX(11px)");
+  target->setAttribute(html_names::kStyleAttr, "transform: translateX(11px)");
   GetDocument().View()->UpdateAllLifecyclePhases();
   if (RuntimeEnabledFeatures::SlimmingPaintV2Enabled()) {
     EXPECT_TRUE(transform->HasDirectCompositingReasons());
@@ -1095,7 +1096,7 @@
   }
   EXPECT_FALSE(filter->HasDirectCompositingReasons());
 
-  target->setAttribute(HTMLNames::styleAttr,
+  target->setAttribute(html_names::kStyleAttr,
                        "transform: translateX(11px); filter: opacity(40%)");
   GetDocument().View()->UpdateAllLifecyclePhases();
   // The transform animation still continues.
@@ -1227,7 +1228,7 @@
 
   GetDocument()
       .getElementById("container")
-      ->setAttribute(HTMLNames::styleAttr, "width: 500px");
+      ->setAttribute(html_names::kStyleAttr, "width: 500px");
   GetDocument().View()->UpdateAllLifecyclePhases();
   ASSERT_EQ(2u, NumFragments(flow_thread));
   EXPECT_EQ(1000000, FragmentAt(flow_thread, 0)
@@ -1265,7 +1266,7 @@
   ASSERT_TRUE(props->Effect());
   EXPECT_EQ(props->Effect()->BlendMode(), SkBlendMode::kDarken);
 
-  blended_element->setAttribute(HTMLNames::styleAttr,
+  blended_element->setAttribute(html_names::kStyleAttr,
                                 "mix-blend-mode: lighten;");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
@@ -1340,12 +1341,12 @@
   EXPECT_EQ(nullptr, effect_properties->Effect()->OutputClip());
 
   auto* descendant = GetDocument().getElementById("descendant");
-  descendant->setAttribute(HTMLNames::styleAttr, "position: relative");
+  descendant->setAttribute(html_names::kStyleAttr, "position: relative");
   GetDocument().View()->UpdateAllLifecyclePhases();
   EXPECT_EQ(clip_properties->OverflowClip(),
             effect_properties->Effect()->OutputClip());
 
-  descendant->setAttribute(HTMLNames::styleAttr, "position: absolute");
+  descendant->setAttribute(html_names::kStyleAttr, "position: absolute");
   GetDocument().View()->UpdateAllLifecyclePhases();
   // The effect's OutputClip is nullptr because of the absolute descendant.
   EXPECT_EQ(nullptr, effect_properties->Effect()->OutputClip());
diff --git a/third_party/blink/renderer/core/paint/pre_paint_tree_walk_test.cc b/third_party/blink/renderer/core/paint/pre_paint_tree_walk_test.cc
index cca36ab..56be19a 100644
--- a/third_party/blink/renderer/core/paint/pre_paint_tree_walk_test.cc
+++ b/third_party/blink/renderer/core/paint/pre_paint_tree_walk_test.cc
@@ -77,7 +77,7 @@
   EXPECT_EQ(nullptr, transformed_properties->Transform());
 
   // Cause a paint invalidation.
-  transformed_element->setAttribute(HTMLNames::classAttr, "border");
+  transformed_element->setAttribute(html_names::kClassAttr, "border");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   // Should have changed back.
@@ -115,7 +115,7 @@
             transformed_properties->Transform()->Matrix());
 
   // Invalidate the CSS transform property.
-  transformed_element->setAttribute(HTMLNames::classAttr, "transformB");
+  transformed_element->setAttribute(html_names::kClassAttr, "transformB");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   // The transform should have changed.
@@ -138,7 +138,7 @@
   EXPECT_EQ(0.9f, transparent_properties->Effect()->Opacity());
 
   // Invalidate the opacity property.
-  transparent_element->setAttribute(HTMLNames::classAttr, "opacityB");
+  transparent_element->setAttribute(html_names::kClassAttr, "opacityB");
   GetDocument().View()->UpdateAllLifecyclePhases();
 
   // The opacity should have changed.
@@ -165,7 +165,7 @@
   EXPECT_FALSE(child_paint_layer->NeedsRepaint());
   EXPECT_FALSE(child_paint_layer->NeedsPaintPhaseFloat());
 
-  parent->setAttribute(HTMLNames::classAttr, "clip");
+  parent->setAttribute(html_names::kClassAttr, "clip");
   GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
 
   EXPECT_TRUE(child_paint_layer->NeedsRepaint());
@@ -191,7 +191,7 @@
   EXPECT_FALSE(child_paint_layer->NeedsRepaint());
   EXPECT_FALSE(child_paint_layer->NeedsPaintPhaseFloat());
 
-  parent->setAttribute(HTMLNames::classAttr, "clip");
+  parent->setAttribute(html_names::kClassAttr, "clip");
   GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
 
   EXPECT_TRUE(child_paint_layer->NeedsRepaint());
@@ -220,7 +220,7 @@
 
   // This changes clips for absolute-positioned descendants of "child" but not
   // normal-position ones, which are already clipped to 50x50.
-  parent->setAttribute(HTMLNames::classAttr, "clip");
+  parent->setAttribute(html_names::kClassAttr, "clip");
   GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
 
   EXPECT_TRUE(child_paint_layer->NeedsRepaint());
@@ -249,7 +249,7 @@
 
   // This changes clips for absolute-positioned descendants of "child" but not
   // normal-position ones, which are already clipped to 50x50.
-  parent->setAttribute(HTMLNames::classAttr, "clip");
+  parent->setAttribute(html_names::kClassAttr, "clip");
   GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
 
   EXPECT_TRUE(child_paint_layer->NeedsRepaint());
@@ -295,7 +295,7 @@
 
   auto* target = GetDocument().getElementById("target");
   auto* target_object = ToLayoutBoxModelObject(target->GetLayoutObject());
-  target->setAttribute(HTMLNames::styleAttr, "border-radius: 5px");
+  target->setAttribute(html_names::kStyleAttr, "border-radius: 5px");
   GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
   EXPECT_TRUE(target_object->Layer()->NeedsRepaint());
   // And should not trigger any assert failure.
@@ -396,7 +396,7 @@
 
   GetDocument()
       .getElementById("touchaction")
-      ->setAttribute(HTMLNames::classAttr, "touchaction");
+      ->setAttribute(html_names::kClassAttr, "touchaction");
   GetDocument().View()->UpdateLifecycleToLayoutClean();
   EXPECT_FALSE(ancestor.EffectiveWhitelistedTouchActionChanged());
   EXPECT_TRUE(touchaction.EffectiveWhitelistedTouchActionChanged());
@@ -424,7 +424,7 @@
     </div>
   )HTML");
 
-  GetDocument().getElementById("parent")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("parent")->setAttribute(html_names::kStyleAttr,
                                                        "border-radius: 5px");
 
   GetDocument().View()->UpdateAllLifecyclePhases();
@@ -442,7 +442,7 @@
 
   // Cause the child clip to change without changing paint property tree
   // topology.
-  GetDocument().getElementById("parent")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("parent")->setAttribute(html_names::kStyleAttr,
                                                        "border-radius: 6px");
 
   GetDocument().View()->UpdateAllLifecyclePhases();
diff --git a/third_party/blink/renderer/core/paint/text_paint_timing_detector_test.cc b/third_party/blink/renderer/core/paint/text_paint_timing_detector_test.cc
index 1b2c2085..df51f97 100644
--- a/third_party/blink/renderer/core/paint/text_paint_timing_detector_test.cc
+++ b/third_party/blink/renderer/core/paint/text_paint_timing_detector_test.cc
@@ -125,11 +125,11 @@
   UpdateAllLifecyclePhasesAndSimulateSwapTime();
 
   TimeTicks time2 = CurrentTimeTicks();
-  GetDocument().getElementById("b")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("b")->setAttribute(html_names::kStyleAttr,
                                                   AtomicString("height:50px"));
   UpdateAllLifecyclePhasesAndSimulateSwapTime();
 
-  GetDocument().getElementById("b")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("b")->setAttribute(html_names::kStyleAttr,
                                                   AtomicString("height:100px"));
   UpdateAllLifecyclePhasesAndSimulateSwapTime();
 
@@ -239,7 +239,7 @@
   // viewport.
   GetDocument()
       .getElementById("shorteningText")
-      ->setAttribute(HTMLNames::styleAttr,
+      ->setAttribute(html_names::kStyleAttr,
                      AtomicString("position:fixed;left:-10px"));
   UpdateAllLifecyclePhasesAndSimulateSwapTime();
   TextRecord* record = GetPaintTracker()
@@ -301,11 +301,11 @@
   UpdateAllLifecyclePhasesAndSimulateSwapTime();
 
   TimeTicks time2 = CurrentTimeTicks();
-  GetDocument().getElementById("b")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("b")->setAttribute(html_names::kStyleAttr,
                                                   AtomicString("height:50px"));
   UpdateAllLifecyclePhasesAndSimulateSwapTime();
 
-  GetDocument().getElementById("b")->setAttribute(HTMLNames::styleAttr,
+  GetDocument().getElementById("b")->setAttribute(html_names::kStyleAttr,
                                                   AtomicString("height:100px"));
   UpdateAllLifecyclePhasesAndSimulateSwapTime();
 
@@ -344,9 +344,9 @@
   UpdateAllLifecyclePhasesAndSimulateSwapTime();
 
   for (int i = 1; i <= 4999; i++) {
-    Element* div = GetDocument().CreateRawElement(HTMLNames::divTag);
+    Element* div = GetDocument().CreateRawElement(html_names::kDivTag);
     div->appendChild(GetDocument().createTextNode(WTF::String::Number(i)));
-    div->setAttribute(HTMLNames::styleAttr,
+    div->setAttribute(html_names::kStyleAttr,
                       AtomicString("position:fixed;left:0px"));
     GetDocument().body()->AppendChild(div);
   }
diff --git a/third_party/blink/renderer/core/paint/theme_painter.cc b/third_party/blink/renderer/core/paint/theme_painter.cc
index bdf67c30..19d69d08 100644
--- a/third_party/blink/renderer/core/paint/theme_painter.cc
+++ b/third_party/blink/renderer/core/paint/theme_painter.cc
@@ -99,14 +99,14 @@
     case kCheckboxPart: {
       COUNT_APPEARANCE(doc, Checkbox);
       auto* input = ToHTMLInputElementOrNull(node);
-      if (!input || input->type() != InputTypeNames::checkbox)
+      if (!input || input->type() != input_type_names::kCheckbox)
         COUNT_APPEARANCE(doc, CheckboxForOthers);
       return PaintCheckbox(node, o.GetDocument(), style, paint_info, r);
     }
     case kRadioPart: {
       COUNT_APPEARANCE(doc, Radio);
       auto* input = ToHTMLInputElementOrNull(node);
-      if (!input || input->type() != InputTypeNames::radio)
+      if (!input || input->type() != input_type_names::kRadio)
         COUNT_APPEARANCE(doc, RadioForOthers);
       return PaintRadio(node, o.GetDocument(), style, paint_info, r);
     }
@@ -120,7 +120,7 @@
     case kSquareButtonPart: {
       COUNT_APPEARANCE(doc, SquareButton);
       auto* input = ToHTMLInputElementOrNull(node);
-      if (!input || input->type() != InputTypeNames::color)
+      if (!input || input->type() != input_type_names::kColor)
         COUNT_APPEARANCE(doc, SquareButtonForOthers);
       return PaintButton(node, o.GetDocument(), style, paint_info, r);
     }
@@ -148,14 +148,14 @@
     case kSliderHorizontalPart: {
       COUNT_APPEARANCE(doc, SliderHorizontal);
       auto* input = ToHTMLInputElementOrNull(node);
-      if (!input || input->type() != InputTypeNames::range)
+      if (!input || input->type() != input_type_names::kRange)
         COUNT_APPEARANCE(doc, SliderHorizontalForOthers);
       return PaintSliderTrack(o, paint_info, r);
     }
     case kSliderVerticalPart: {
       COUNT_APPEARANCE(doc, SliderVertical);
       auto* input = ToHTMLInputElementOrNull(node);
-      if (!input || input->type() != InputTypeNames::range)
+      if (!input || input->type() != input_type_names::kRange)
         COUNT_APPEARANCE(doc, SliderVerticalForOthers);
       return PaintSliderTrack(o, paint_info, r);
     }
@@ -163,7 +163,7 @@
       COUNT_APPEARANCE(doc, SliderThumbHorizontal);
       auto* input =
           ToHTMLInputElementOrNull(node ? node->OwnerShadowHost() : nullptr);
-      if (!input || input->type() != InputTypeNames::range)
+      if (!input || input->type() != input_type_names::kRange)
         COUNT_APPEARANCE(doc, SliderThumbHorizontalForOthers);
       return PaintSliderThumb(node, style, paint_info, r);
     }
@@ -171,7 +171,7 @@
       COUNT_APPEARANCE(doc, SliderThumbVertical);
       auto* input =
           ToHTMLInputElementOrNull(node ? node->OwnerShadowHost() : nullptr);
-      if (!input || input->type() != InputTypeNames::range)
+      if (!input || input->type() != input_type_names::kRange)
         COUNT_APPEARANCE(doc, SliderThumbVerticalForOthers);
       return PaintSliderThumb(node, style, paint_info, r);
     }
@@ -205,7 +205,7 @@
     case kSearchFieldPart: {
       COUNT_APPEARANCE(doc, SearchField);
       auto* input = ToHTMLInputElementOrNull(node);
-      if (!input || input->type() != InputTypeNames::search)
+      if (!input || input->type() != input_type_names::kSearch)
         COUNT_APPEARANCE(doc, SearchFieldForOthers);
       return PaintSearchField(node, style, paint_info, r);
     }
@@ -213,7 +213,7 @@
       COUNT_APPEARANCE(doc, SearchCancel);
       auto* element = ToElementOrNull(node);
       if (!element || !element->OwnerShadowHost() ||
-          element->FastGetAttribute(HTMLNames::idAttr) !=
+          element->FastGetAttribute(html_names::kIdAttr) !=
               ShadowElementNames::SearchClearButton())
         COUNT_APPEARANCE(doc, SearchCancelForOthers);
       return PaintSearchFieldCancelButton(o, paint_info, r);
@@ -237,7 +237,7 @@
         UseCounter::Count(node->GetDocument(),
                           WebFeature::kCSSValueAppearanceTextFieldRendered);
         if (auto* input = ToHTMLInputElementOrNull(node)) {
-          if (input->type() == InputTypeNames::search) {
+          if (input->type() == input_type_names::kSearch) {
             UseCounter::Count(
                 node->GetDocument(),
                 WebFeature::kCSSValueAppearanceTextFieldForSearch);
@@ -326,7 +326,7 @@
     return;
 
   HTMLInputElement* input = ToHTMLInputElement(node);
-  if (input->type() != InputTypeNames::range ||
+  if (input->type() != input_type_names::kRange ||
       !input->UserAgentShadowRoot()->HasChildren())
     return;
 
diff --git a/third_party/blink/renderer/core/probe/core_probes.json5 b/third_party/blink/renderer/core/probe/core_probes.json5
index ef19904db..37748538 100644
--- a/third_party/blink/renderer/core/probe/core_probes.json5
+++ b/third_party/blink/renderer/core/probe/core_probes.json5
@@ -208,13 +208,6 @@
         "willSendRequest",
       ]
     },
-    InspectorWorkerAgent: {
-      probes: [
-        "didStartWorker",
-        "shouldWaitForDebuggerOnWorkerStart",
-        "workerTerminated",
-      ]
-    },
     InspectorSession: {
       probes: [
         "didStartProvisionalLoad",
diff --git a/third_party/blink/renderer/core/probe/core_probes.pidl b/third_party/blink/renderer/core/probe/core_probes.pidl
index 11322da0..4b743cf 100644
--- a/third_party/blink/renderer/core/probe/core_probes.pidl
+++ b/third_party/blink/renderer/core/probe/core_probes.pidl
@@ -122,8 +122,6 @@
   void frameStoppedLoading([Keep] LocalFrame*);
   void frameScheduledNavigation([Keep] LocalFrame*, ScheduledNavigation*);
   void frameClearedScheduledNavigation([Keep] LocalFrame*);
-  void didStartWorker(ExecutionContext*, WorkerInspectorProxy* proxy, bool waitingForDebugger);
-  void workerTerminated(ExecutionContext*, WorkerInspectorProxy* proxy);
   void didCreateWebSocket([Keep] ExecutionContext*, unsigned long identifier, const KURL& requestURL, const String& protocol);
   void willSendWebSocketHandshakeRequest([Keep] ExecutionContext*, unsigned long identifier, network::mojom::blink::WebSocketHandshakeRequest* request);
   void didReceiveWebSocketHandshakeResponse([Keep] ExecutionContext*, unsigned long identifier, network::mojom::blink::WebSocketHandshakeRequest* request, network::mojom::blink::WebSocketHandshakeResponse* response);
@@ -153,7 +151,6 @@
   V8Compile([Keep] ExecutionContext* context, const String& file_name, int line, int column);
   ParseHTML(Document* document, HTMLDocumentParser* parser);
   void forcePseudoState([Keep] Element* element, CSSSelector::PseudoType pseudoState, bool* result);
-  void shouldWaitForDebuggerOnWorkerStart(ExecutionContext* context, bool* result);
   void shouldForceCORSPreflight(ExecutionContext*, bool* result);
   void shouldBlockRequest(ExecutionContext*, const KURL&, bool* result);
   void shouldBypassServiceWorker(ExecutionContext* context, bool* result);
diff --git a/third_party/blink/renderer/core/scheduler/frame_throttling_test.cc b/third_party/blink/renderer/core/scheduler/frame_throttling_test.cc
index 1893df4..ecbeb0d 100644
--- a/third_party/blink/renderer/core/scheduler/frame_throttling_test.cc
+++ b/third_party/blink/renderer/core/scheduler/frame_throttling_test.cc
@@ -35,7 +35,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 // NOTE: This test uses <iframe sandbox> to create cross origin iframes.
 
@@ -94,13 +94,13 @@
   EXPECT_FALSE(frame_document->View()->IsHiddenForThrottling());
 
   // Moving the child fully outside the parent makes it invisible.
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   CompositeFrame();
   EXPECT_FALSE(GetDocument().View()->IsHiddenForThrottling());
   EXPECT_TRUE(frame_document->View()->IsHiddenForThrottling());
 
   // A partially visible child is considered visible.
-  frame_element->setAttribute(styleAttr,
+  frame_element->setAttribute(kStyleAttr,
                               "transform: translate(-50px, 0px, 0px)");
   CompositeFrame();
   EXPECT_FALSE(GetDocument().View()->IsHiddenForThrottling());
@@ -128,7 +128,7 @@
   EXPECT_FALSE(inner_frame_document->View()->CanThrottleRendering());
 
   // Hidden same origin frames are not throttled.
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   CompositeFrame();
   EXPECT_FALSE(GetDocument().View()->CanThrottleRendering());
   EXPECT_FALSE(frame_document->View()->CanThrottleRendering());
@@ -157,7 +157,7 @@
   EXPECT_FALSE(inner_frame_document->View()->CanThrottleRendering());
 
   // Hidden cross origin frames are throttled.
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   CompositeFrame();
   EXPECT_FALSE(GetDocument().View()->CanThrottleRendering());
   EXPECT_FALSE(frame_document->View()->CanThrottleRendering());
@@ -185,7 +185,7 @@
       GetDocument().Lifecycle());
 
   // Hidden cross origin frames are throttled.
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   CompositeFrame();
   EXPECT_FALSE(GetDocument().View()->CanThrottleRendering());
   EXPECT_FALSE(frame_document->View()->CanThrottleRendering());
@@ -250,7 +250,7 @@
   EXPECT_FALSE(inner_frame_document->View()->CanThrottleRendering());
 
   // The frame is not throttled because its dimensions are 0x0.
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   CompositeFrame();
   EXPECT_FALSE(GetDocument().View()->CanThrottleRendering());
   EXPECT_FALSE(frame_document->View()->CanThrottleRendering());
@@ -268,7 +268,7 @@
   auto* frame_document = frame_element->contentDocument();
 
   // Enable throttling for the child frame.
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   CompositeFrame();
   EXPECT_TRUE(frame_document->View()->CanThrottleRendering());
   EXPECT_EQ(DocumentLifecycle::kPaintClean,
@@ -279,7 +279,7 @@
   // TODO(skyostil): these expectations are either wrong, or the test is
   // not exercising the code correctly. PaintClean means the entire lifecycle
   // ran.
-  frame_element->setAttribute(widthAttr, "50");
+  frame_element->setAttribute(kWidthAttr, "50");
   CompositeFrame();
   EXPECT_EQ(DocumentLifecycle::kPaintClean,
             frame_document->Lifecycle().GetState());
@@ -300,13 +300,13 @@
       ToHTMLIFrameElement(GetDocument().getElementById("frame"));
 
   // First make the child hidden to enable throttling.
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   CompositeFrame();
   EXPECT_TRUE(frame_element->contentDocument()->View()->CanThrottleRendering());
   EXPECT_FALSE(Compositor().NeedsBeginFrame());
 
   // Then bring it back on-screen. This should schedule an animation update.
-  frame_element->setAttribute(styleAttr, "");
+  frame_element->setAttribute(kStyleAttr, "");
   CompositeFrame();
   EXPECT_TRUE(Compositor().NeedsBeginFrame());
 }
@@ -327,17 +327,17 @@
       ToHTMLIFrameElement(GetDocument().getElementById("frame"));
 
   // Move the frame offscreen to throttle it.
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   CompositeFrame();
   EXPECT_TRUE(frame_element->contentDocument()->View()->CanThrottleRendering());
 
   // Mutating the throttled frame should not cause an animation to be scheduled.
   frame_element->contentDocument()->documentElement()->setAttribute(
-      styleAttr, "background: green");
+      kStyleAttr, "background: green");
   EXPECT_FALSE(Compositor().NeedsBeginFrame());
 
   // Move the frame back on screen to unthrottle it.
-  frame_element->setAttribute(styleAttr, "");
+  frame_element->setAttribute(kStyleAttr, "");
   EXPECT_TRUE(Compositor().NeedsBeginFrame());
 
   // The first frame we composite after unthrottling won't contain the
@@ -364,12 +364,12 @@
   auto* frame_element =
       ToHTMLIFrameElement(GetDocument().getElementById("frame"));
 
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   CompositeFrame();
 
   // Change the size of a div in the throttled frame.
   auto* div_element = frame_element->contentDocument()->getElementById("div");
-  div_element->setAttribute(styleAttr, "width: 50px");
+  div_element->setAttribute(kStyleAttr, "width: 50px");
 
   // Querying the width of the div should do a synchronous layout update even
   // though the frame is being throttled.
@@ -388,7 +388,7 @@
   // Move the frame offscreen to throttle it.
   auto* frame_element =
       ToHTMLIFrameElement(GetDocument().getElementById("frame"));
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   EXPECT_FALSE(
       frame_element->contentDocument()->View()->CanThrottleRendering());
   CompositeFrame();
@@ -427,7 +427,7 @@
   // Move the frame offscreen to throttle it.
   auto* frame_element =
       ToHTMLIFrameElement(GetDocument().getElementById("frame"));
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   EXPECT_FALSE(
       frame_element->contentDocument()->View()->CanThrottleRendering());
   CompositeFrame();
@@ -457,14 +457,14 @@
   // Move the frame offscreen to throttle it.
   auto* frame_element =
       ToHTMLIFrameElement(GetDocument().getElementById("frame"));
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   EXPECT_FALSE(
       frame_element->contentDocument()->View()->CanThrottleRendering());
   CompositeFrame();
   EXPECT_TRUE(frame_element->contentDocument()->View()->CanThrottleRendering());
 
   // Change the background color of the frame's contents from red to green.
-  frame_element->contentDocument()->body()->setAttribute(styleAttr,
+  frame_element->contentDocument()->body()->setAttribute(kStyleAttr,
                                                          "background: green");
 
   // Scroll down to unthrottle the frame.
@@ -541,7 +541,7 @@
   // Move the frame offscreen to throttle it.
   auto* frame_element =
       ToHTMLIFrameElement(GetDocument().getElementById("frame"));
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   EXPECT_FALSE(
       frame_element->contentDocument()->View()->CanThrottleRendering());
   CompositeFrame();
@@ -552,7 +552,7 @@
   EXPECT_FALSE(Compositor().HasSelection());
   GetDocument().GetPage()->GetFocusController().SetFocusedFrame(
       frame_element->contentDocument()->GetFrame());
-  GetDocument().body()->setAttribute(styleAttr, "background: green");
+  GetDocument().body()->setAttribute(kStyleAttr, "background: green");
   CompositeFrame();
   EXPECT_FALSE(Compositor().HasSelection());
 }
@@ -575,7 +575,7 @@
   // Move the frame offscreen to throttle it.
   auto* frame_element =
       ToHTMLIFrameElement(GetDocument().getElementById("frame"));
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   EXPECT_FALSE(
       frame_element->contentDocument()->View()->CanThrottleRendering());
   CompositeFrame();
@@ -583,11 +583,11 @@
 
   // Change style of the frame's content to make it in VisualUpdatePending
   // state.
-  frame_element->contentDocument()->body()->setAttribute(styleAttr,
+  frame_element->contentDocument()->body()->setAttribute(kStyleAttr,
                                                          "background: green");
   // Change root frame's layout so that the next lifecycle update will call
   // ScrollingCoordinator::UpdateAfterPaint().
-  GetDocument().body()->setAttribute(styleAttr, "margin: 20px");
+  GetDocument().body()->setAttribute(kStyleAttr, "margin: 20px");
   EXPECT_EQ(DocumentLifecycle::kVisualUpdatePending,
             frame_element->contentDocument()->Lifecycle().GetState());
 
@@ -607,7 +607,7 @@
 
   // Make the frame visible by changing its transform. This doesn't cause a
   // layout, but should still unthrottle the frame.
-  frame_element->setAttribute(styleAttr, "transform: translateY(0px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(0px)");
   CompositeFrame();
   EXPECT_FALSE(
       frame_element->contentDocument()->View()->CanThrottleRendering());
@@ -639,7 +639,7 @@
   // Move the frame offscreen to throttle it.
   auto* frame_element =
       ToHTMLIFrameElement(GetDocument().getElementById("frame"));
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   EXPECT_FALSE(
       frame_element->contentDocument()->View()->CanThrottleRendering());
   CompositeFrame();
@@ -647,11 +647,11 @@
 
   // Change style of the frame's content to make it in VisualUpdatePending
   // state.
-  frame_element->contentDocument()->body()->setAttribute(styleAttr,
+  frame_element->contentDocument()->body()->setAttribute(kStyleAttr,
                                                          "background: green");
   // Change root frame's layout so that the next lifecycle update will call
   // ScrollingCoordinator::UpdateAfterPaint().
-  GetDocument().body()->setAttribute(styleAttr, "margin: 20px");
+  GetDocument().body()->setAttribute(kStyleAttr, "margin: 20px");
   EXPECT_EQ(DocumentLifecycle::kVisualUpdatePending,
             frame_element->contentDocument()->Lifecycle().GetState());
 
@@ -681,7 +681,7 @@
   // Move the frame offscreen to throttle it.
   auto* frame_element =
       ToHTMLIFrameElement(GetDocument().getElementById("frame"));
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   EXPECT_FALSE(
       frame_element->contentDocument()->View()->CanThrottleRendering());
   CompositeFrame();
@@ -689,11 +689,11 @@
 
   // Change style of the frame's content to make it in VisualUpdatePending
   // state.
-  frame_element->contentDocument()->body()->setAttribute(styleAttr,
+  frame_element->contentDocument()->body()->setAttribute(kStyleAttr,
                                                          "background: green");
   // Change root frame's layout so that the next lifecycle update will call
   // ScrollingCoordinator::UpdateAfterPaint().
-  GetDocument().body()->setAttribute(styleAttr, "margin: 20px");
+  GetDocument().body()->setAttribute(kStyleAttr, "margin: 20px");
   EXPECT_EQ(DocumentLifecycle::kVisualUpdatePending,
             frame_element->contentDocument()->Lifecycle().GetState());
 
@@ -708,7 +708,7 @@
 
   // Make the frame visible by changing its transform. This doesn't cause a
   // layout, but should still unthrottle the frame.
-  frame_element->setAttribute(styleAttr, "transform: translateY(0px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(0px)");
   CompositeFrame();  // Unthrottle the frame.
 
   EXPECT_FALSE(
@@ -739,7 +739,7 @@
   // Move the frame offscreen to throttle it.
   auto* frame_element =
       ToHTMLIFrameElement(GetDocument().getElementById("frame"));
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   EXPECT_FALSE(
       frame_element->contentDocument()->View()->CanThrottleRendering());
   CompositeFrame();
@@ -747,7 +747,7 @@
 
   // Make the frame visible by changing its transform. This doesn't cause a
   // layout, but should still unthrottle the frame.
-  frame_element->setAttribute(styleAttr, "transform: translateY(0px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(0px)");
   CompositeFrame();
   EXPECT_FALSE(
       frame_element->contentDocument()->View()->CanThrottleRendering());
@@ -777,7 +777,7 @@
   )HTML");
   auto* frame_element =
       ToHTMLIFrameElement(GetDocument().getElementById("frame"));
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   DocumentLifecycle::AllowThrottlingScope throttling_scope(
       GetDocument().Lifecycle());
   CompositeFrame();  // Throttle the frame.
@@ -807,7 +807,7 @@
   // Unthrottling the frame makes the touch handlers active again. Note that
   // both handlers get combined into the same rectangle in the region, so
   // there is only one rectangle in total.
-  frame_element->setAttribute(styleAttr, "transform: translateY(0px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(0px)");
   CompositeFrame();  // Unthrottle the frame.
   CompositeFrame();  // Update touch handler regions.
   EXPECT_EQ(1u, TouchHandlerRegionSize());
@@ -838,7 +838,7 @@
   )HTML");
   auto* frame_element =
       ToHTMLIFrameElement(GetDocument().getElementById("frame"));
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   DocumentLifecycle::AllowThrottlingScope throttling_scope(
       GetDocument().Lifecycle());
   CompositeFrame();  // Throttle the frame.
@@ -866,7 +866,7 @@
     EXPECT_EQ(0u, TouchHandlerRegionSize());
 
   // Unthrottling the frame makes the touch handler active again.
-  frame_element->setAttribute(styleAttr, "transform: translateY(0px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(0px)");
   CompositeFrame();  // Unthrottle the frame.
   CompositeFrame();  // Update touch handler regions.
   EXPECT_EQ(1u, TouchHandlerRegionSize());
@@ -885,7 +885,7 @@
   frame_resource.Complete("");
   auto* frame_element =
       ToHTMLIFrameElement(GetDocument().getElementById("frame"));
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   CompositeFrame();
   EXPECT_TRUE(frame_element->contentDocument()->View()->CanThrottleRendering());
 
@@ -924,7 +924,7 @@
   // graphics layer.
   auto* frame_element =
       ToHTMLIFrameElement(GetDocument().getElementById("frame"));
-  frame_element->setAttribute(styleAttr,
+  frame_element->setAttribute(kStyleAttr,
                               "transform: translateY(480px) translateZ(0px)");
   EXPECT_FALSE(
       frame_element->contentDocument()->View()->CanThrottleRendering());
@@ -965,7 +965,7 @@
   EXPECT_EQ(7u, commands_not_throttled.DrawCount());
 
   // Move the frame offscreen to throttle it.
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   EXPECT_FALSE(
       frame_element->contentDocument()->View()->CanThrottleRendering());
   CompositeFrame();
@@ -980,7 +980,7 @@
   EXPECT_EQ(5u, commands_throttled.DrawCount());
 
   // Remove compositing trigger of inner_div.
-  inner_div->setAttribute(styleAttr, "background: yellow; overflow: hidden");
+  inner_div->setAttribute(kStyleAttr, "background: yellow; overflow: hidden");
   // Do an unthrottled style and layout update, simulating the situation
   // triggered by script style/layout access.
   GetDocument().View()->UpdateLifecycleToLayoutClean();
@@ -1003,7 +1003,7 @@
   EXPECT_EQ(5u, commands_throttled1.DrawCount());
 
   // Move the frame back on screen.
-  frame_element->setAttribute(styleAttr, "");
+  frame_element->setAttribute(kStyleAttr, "");
   CompositeFrame();
   EXPECT_FALSE(
       frame_element->contentDocument()->View()->CanThrottleRendering());
@@ -1034,7 +1034,7 @@
       ToHTMLIFrameElement(GetDocument().getElementById("frame"));
   auto* child_frame_element = ToHTMLIFrameElement(
       frame_element->contentDocument()->getElementById("child-frame"));
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   Compositor().BeginFrame();
   EXPECT_FALSE(
       frame_element->contentDocument()->View()->CanThrottleRendering());
@@ -1061,7 +1061,7 @@
       child_frame_element->contentDocument()->View()->CanThrottleRendering());
 
   // Move the frame back on screen but don't update throttling yet.
-  frame_element->setAttribute(styleAttr, "transform: translateY(0px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(0px)");
   Compositor().BeginFrame();
   EXPECT_TRUE(frame_element->contentDocument()->View()->CanThrottleRendering());
   EXPECT_TRUE(
@@ -1102,7 +1102,7 @@
 
   auto* frame_element =
       ToHTMLIFrameElement(GetDocument().getElementById("frame"));
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   CompositeFrame();
   EXPECT_TRUE(frame_element->contentDocument()->View()->CanThrottleRendering());
 
@@ -1149,7 +1149,7 @@
   // Throttle the first frame.
   auto* first_frame_element =
       ToHTMLIFrameElement(GetDocument().getElementById("first"));
-  first_frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  first_frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   CompositeFrame();
   EXPECT_TRUE(
       first_frame_element->contentDocument()->View()->CanThrottleRendering());
@@ -1217,14 +1217,15 @@
   auto* inner_div_object = inner_div->GetLayoutObject();
   EXPECT_FALSE(frame_document->View()->ShouldThrottleRendering());
 
-  frame_element->setAttribute(HTMLNames::styleAttr,
+  frame_element->setAttribute(html_names::kStyleAttr,
                               "transform: translateY(1000px)");
   CompositeFrame();
   EXPECT_TRUE(frame_document->View()->CanThrottleRendering());
   EXPECT_FALSE(inner_div_object->FirstFragment().PaintProperties());
 
   // Mutating the throttled frame should not cause paint property update.
-  inner_div->setAttribute(HTMLNames::styleAttr, "transform: translateY(20px)");
+  inner_div->setAttribute(html_names::kStyleAttr,
+                          "transform: translateY(20px)");
   EXPECT_FALSE(Compositor().NeedsBeginFrame());
   EXPECT_TRUE(frame_document->View()->CanThrottleRendering());
   {
@@ -1235,7 +1236,7 @@
   EXPECT_FALSE(inner_div_object->FirstFragment().PaintProperties());
 
   // Move the frame back on screen to unthrottle it.
-  frame_element->setAttribute(HTMLNames::styleAttr, "");
+  frame_element->setAttribute(html_names::kStyleAttr, "");
   // The first update unthrottles the frame, the second actually update layout
   // and paint properties etc.
   CompositeFrame();
@@ -1266,7 +1267,7 @@
   EXPECT_TRUE(frame_document->View()->CanThrottleRendering());
 
   // Setting display:none unthrottles the frame.
-  frame_element->setAttribute(styleAttr, "display: none");
+  frame_element->setAttribute(kStyleAttr, "display: none");
   CompositeFrame();
   EXPECT_FALSE(frame_document->View()->CanThrottleRendering());
 }
@@ -1289,7 +1290,7 @@
       ToHTMLIFrameElement(GetDocument().getElementById("frame"));
   auto* child_frame_element = ToHTMLIFrameElement(
       frame_element->contentDocument()->getElementById("child-frame"));
-  frame_element->setAttribute(styleAttr, "transform: translateY(480px)");
+  frame_element->setAttribute(kStyleAttr, "transform: translateY(480px)");
   CompositeFrame();
   EXPECT_TRUE(frame_element->contentDocument()->View()->CanThrottleRendering());
   EXPECT_TRUE(
@@ -1297,7 +1298,7 @@
 
   // Setting display:none for the parent frame unthrottles the parent but not
   // the child. This behavior matches Safari.
-  frame_element->setAttribute(styleAttr, "display: none");
+  frame_element->setAttribute(kStyleAttr, "display: none");
   CompositeFrame();
   EXPECT_FALSE(
       frame_element->contentDocument()->View()->CanThrottleRendering());
@@ -1354,7 +1355,7 @@
   auto* sibling_clm = sibling_layer->GetCompositedLayerMapping();
   ASSERT_TRUE(sibling_clm);
 
-  scroller_element->setAttribute(styleAttr, "overflow:visible;");
+  scroller_element->setAttribute(kStyleAttr, "overflow:visible;");
   EXPECT_EQ(DocumentLifecycle::kVisualUpdatePending,
             frame_element->contentDocument()->Lifecycle().GetState());
 
@@ -1402,7 +1403,7 @@
   EXPECT_TRUE(frame_document->View()->CanThrottleRendering());
   EXPECT_FALSE(frame_document->View()->ShouldThrottleRendering());
 
-  frame_document->getElementById("div")->setAttribute(styleAttr,
+  frame_document->getElementById("div")->setAttribute(kStyleAttr,
                                                       "will-change: transform");
   GetDocument().View()->UpdateLifecycleToCompositingCleanPlusScrolling();
 
diff --git a/third_party/blink/renderer/core/script/html_parser_script_runner.cc b/third_party/blink/renderer/core/script/html_parser_script_runner.cc
index 6ac9cbc1..563c7e4 100644
--- a/third_party/blink/renderer/core/script/html_parser_script_runner.cc
+++ b/third_party/blink/renderer/core/script/html_parser_script_runner.cc
@@ -142,8 +142,6 @@
 
 }  // namespace
 
-using namespace HTMLNames;
-
 HTMLParserScriptRunner::HTMLParserScriptRunner(
     HTMLParserReentryPermit* reentry_permit,
     Document* document,
diff --git a/third_party/blink/renderer/core/style/border_value.h b/third_party/blink/renderer/core/style/border_value.h
index e0b2d40..46ff113 100644
--- a/third_party/blink/renderer/core/style/border_value.h
+++ b/third_party/blink/renderer/core/style/border_value.h
@@ -60,10 +60,6 @@
     SetWidth(width);
   }
 
-  bool NonZero() const {
-    return Width() && (style_ != static_cast<unsigned>(EBorderStyle::kNone));
-  }
-
   bool IsTransparent() const {
     return !color_is_current_color_ && !color_.Alpha();
   }
diff --git a/third_party/blink/renderer/core/svg/svg_a_element.cc b/third_party/blink/renderer/core/svg/svg_a_element.cc
index 556a4fc..3e252ea 100644
--- a/third_party/blink/renderer/core/svg/svg_a_element.cc
+++ b/third_party/blink/renderer/core/svg/svg_a_element.cc
@@ -47,7 +47,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 inline SVGAElement::SVGAElement(Document& document)
     : SVGGraphicsElement(svg_names::kATag, document),
@@ -172,7 +172,7 @@
 }
 
 bool SVGAElement::IsURLAttribute(const Attribute& attribute) const {
-  return attribute.GetName().LocalName() == hrefAttr ||
+  return attribute.GetName().LocalName() == kHrefAttr ||
          SVGGraphicsElement::IsURLAttribute(attribute);
 }
 
diff --git a/third_party/blink/renderer/core/svg/svg_element.cc b/third_party/blink/renderer/core/svg/svg_element.cc
index 3a16cb7..095b455 100644
--- a/third_party/blink/renderer/core/svg/svg_element.cc
+++ b/third_party/blink/renderer/core/svg/svg_element.cc
@@ -61,7 +61,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 using namespace svg_names;
 
 SVGElement::SVGElement(const QualifiedName& tag_name,
@@ -69,7 +69,7 @@
                        ConstructionType construction_type)
     : Element(tag_name, &document, construction_type),
       svg_rare_data_(nullptr),
-      class_name_(SVGAnimatedString::Create(this, HTMLNames::classAttr)) {
+      class_name_(SVGAnimatedString::Create(this, html_names::kClassAttr)) {
   AddToPropertyMap(class_name_);
   SetHasCustomStyleCallbacks();
 }
@@ -376,12 +376,12 @@
   Element::InsertedInto(root_parent);
   UpdateRelativeLengthsInformation();
 
-  const AtomicString& nonce_value = FastGetAttribute(nonceAttr);
+  const AtomicString& nonce_value = FastGetAttribute(kNonceAttr);
   if (!nonce_value.IsEmpty()) {
     setNonce(nonce_value);
     if (InActiveDocument() &&
         GetDocument().GetContentSecurityPolicy()->HasHeaderDeliveredPolicy()) {
-      setAttribute(nonceAttr, g_empty_atom);
+      setAttribute(kNonceAttr, g_empty_atom);
     }
   }
   return kInsertionDone;
@@ -936,7 +936,7 @@
 void SVGElement::AttributeChanged(const AttributeModificationParams& params) {
   Element::AttributeChanged(params);
 
-  if (params.name == HTMLNames::idAttr) {
+  if (params.name == html_names::kIdAttr) {
     RebuildAllIncomingReferences();
     InvalidateInstances();
     return;
@@ -945,7 +945,7 @@
   // Changes to the style attribute are processed lazily (see
   // Element::getAttribute() and related methods), so we don't want changes to
   // the style attribute to result in extra work here.
-  if (params.name == HTMLNames::styleAttr)
+  if (params.name == html_names::kStyleAttr)
     return;
 
   SvgAttributeBaseValChanged(params.name);
@@ -959,7 +959,7 @@
     return;
   }
 
-  if (attr_name == HTMLNames::classAttr) {
+  if (attr_name == html_names::kClassAttr) {
     ClassAttributeChanged(AtomicString(class_name_->CurrentValue()->Value()));
     InvalidateInstances();
     return;
@@ -1226,7 +1226,7 @@
                                       svg_names::kZAttr,
                                   }));
 
-  if (name == classAttr)
+  if (name == kClassAttr)
     return true;
 
   return animatable_attributes.Contains(name);
diff --git a/third_party/blink/renderer/core/svg/svg_script_element.cc b/third_party/blink/renderer/core/svg/svg_script_element.cc
index 1385322..d9ddb127 100644
--- a/third_party/blink/renderer/core/svg/svg_script_element.cc
+++ b/third_party/blink/renderer/core/svg/svg_script_element.cc
@@ -47,7 +47,7 @@
 
 void SVGScriptElement::ParseAttribute(
     const AttributeModificationParams& params) {
-  if (params.name == HTMLNames::onerrorAttr) {
+  if (params.name == html_names::kOnerrorAttr) {
     SetAttributeEventListener(
         EventTypeNames::error,
         CreateAttributeEventListener(
diff --git a/third_party/blink/renderer/core/svg/svg_svg_element.cc b/third_party/blink/renderer/core/svg/svg_svg_element.cc
index 0d20b407..129e8aa 100644
--- a/third_party/blink/renderer/core/svg/svg_svg_element.cc
+++ b/third_party/blink/renderer/core/svg/svg_svg_element.cc
@@ -160,15 +160,15 @@
     bool set_listener = true;
 
     // Only handle events if we're the outermost <svg> element
-    if (name == HTMLNames::onunloadAttr) {
+    if (name == html_names::kOnunloadAttr) {
       GetDocument().SetWindowAttributeEventListener(
           EventTypeNames::unload,
           CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-    } else if (name == HTMLNames::onresizeAttr) {
+    } else if (name == html_names::kOnresizeAttr) {
       GetDocument().SetWindowAttributeEventListener(
           EventTypeNames::resize,
           CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-    } else if (name == HTMLNames::onscrollAttr) {
+    } else if (name == html_names::kOnscrollAttr) {
       GetDocument().SetWindowAttributeEventListener(
           EventTypeNames::scroll,
           CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
@@ -180,11 +180,11 @@
       return;
   }
 
-  if (name == HTMLNames::onabortAttr) {
+  if (name == html_names::kOnabortAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::abort,
         CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
-  } else if (name == HTMLNames::onerrorAttr) {
+  } else if (name == html_names::kOnerrorAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::error,
         CreateAttributeEventListener(
diff --git a/third_party/blink/renderer/core/svg/unsafe_svg_attribute_sanitization_test.cc b/third_party/blink/renderer/core/svg/unsafe_svg_attribute_sanitization_test.cc
index b8930eda..f046a18 100644
--- a/third_party/blink/renderer/core/svg/unsafe_svg_attribute_sanitization_test.cc
+++ b/third_party/blink/renderer/core/svg/unsafe_svg_attribute_sanitization_test.cc
@@ -59,7 +59,7 @@
   HTMLElement* body = page_holder->GetDocument().body();
 
   // Make the body editable, and put the caret in it.
-  body->setAttribute(HTMLNames::contenteditableAttr, "true");
+  body->setAttribute(html_names::kContenteditableAttr, "true");
   body->focus();
   frame.GetDocument()->UpdateStyleAndLayout();
   frame.Selection().SetSelectionAndEndTyping(
diff --git a/third_party/blink/renderer/core/testing/internals.cc b/third_party/blink/renderer/core/testing/internals.cc
index 8e5acb29..8560cd9e 100644
--- a/third_party/blink/renderer/core/testing/internals.cc
+++ b/third_party/blink/renderer/core/testing/internals.cc
@@ -1943,14 +1943,14 @@
 }
 
 AtomicString Internals::htmlNamespace() {
-  return HTMLNames::xhtmlNamespaceURI;
+  return html_names::xhtmlNamespaceURI;
 }
 
 Vector<AtomicString> Internals::htmlTags() {
-  Vector<AtomicString> tags(HTMLNames::kTagsCount);
+  Vector<AtomicString> tags(html_names::kTagsCount);
   std::unique_ptr<const HTMLQualifiedName* []> qualified_names =
-      HTMLNames::GetTags();
-  for (wtf_size_t i = 0; i < HTMLNames::kTagsCount; ++i)
+      html_names::GetTags();
+  for (wtf_size_t i = 0; i < html_names::kTagsCount; ++i)
     tags[i] = qualified_names[i]->LocalName();
   return tags;
 }
diff --git a/third_party/blink/renderer/core/timing/window_performance.cc b/third_party/blink/renderer/core/timing/window_performance.cc
index 366a16c..17d618fb 100644
--- a/third_party/blink/renderer/core/timing/window_performance.cc
+++ b/third_party/blink/renderer/core/timing/window_performance.cc
@@ -325,9 +325,9 @@
         culprit_dom_window->GetFrame()->DeprecatedLocalOwner();
     AddLongTaskTiming(
         start_time, end_time, attribution.first,
-        GetFrameAttribute(frame_owner, HTMLNames::srcAttr, false),
-        GetFrameAttribute(frame_owner, HTMLNames::idAttr, false),
-        GetFrameAttribute(frame_owner, HTMLNames::nameAttr, true),
+        GetFrameAttribute(frame_owner, html_names::kSrcAttr, false),
+        GetFrameAttribute(frame_owner, html_names::kIdAttr, false),
+        GetFrameAttribute(frame_owner, html_names::kNameAttr, true),
         IsSameOrigin(attribution.first) ? sub_task_attributions : empty_vector);
   }
 }
diff --git a/third_party/blink/renderer/core/workers/BUILD.gn b/third_party/blink/renderer/core/workers/BUILD.gn
index 17da109..eef62db 100644
--- a/third_party/blink/renderer/core/workers/BUILD.gn
+++ b/third_party/blink/renderer/core/workers/BUILD.gn
@@ -18,8 +18,6 @@
     "dedicated_worker_object_proxy.h",
     "dedicated_worker_thread.cc",
     "dedicated_worker_thread.h",
-    "execution_context_worker_registry.cc",
-    "execution_context_worker_registry.h",
     "experimental/task.cc",
     "experimental/task.h",
     "experimental/task_worklet.cc",
@@ -73,8 +71,6 @@
     "worker_content_settings_client.h",
     "worker_global_scope.cc",
     "worker_global_scope.h",
-    "worker_inspector_proxy.cc",
-    "worker_inspector_proxy.h",
     "worker_location.h",
     "worker_module_tree_client.cc",
     "worker_module_tree_client.h",
diff --git a/third_party/blink/renderer/core/workers/dedicated_worker.cc b/third_party/blink/renderer/core/workers/dedicated_worker.cc
index b88de052b..3f67b4c 100644
--- a/third_party/blink/renderer/core/workers/dedicated_worker.cc
+++ b/third_party/blink/renderer/core/workers/dedicated_worker.cc
@@ -312,17 +312,17 @@
 
 std::unique_ptr<GlobalScopeCreationParams>
 DedicatedWorker::CreateGlobalScopeCreationParams(const KURL& script_url) {
-  base::UnguessableToken devtools_worker_token;
+  base::UnguessableToken parent_devtools_token;
   std::unique_ptr<WorkerSettings> settings;
   if (auto* document = DynamicTo<Document>(GetExecutionContext())) {
-    devtools_worker_token = document->GetFrame()
-                                ? document->GetFrame()->GetDevToolsFrameToken()
-                                : base::UnguessableToken::Create();
+    if (document->GetFrame())
+      parent_devtools_token = document->GetFrame()->GetDevToolsFrameToken();
     settings = std::make_unique<WorkerSettings>(document->GetSettings());
   } else {
     WorkerGlobalScope* worker_global_scope =
         To<WorkerGlobalScope>(GetExecutionContext());
-    devtools_worker_token = worker_global_scope->GetParentDevToolsToken();
+    parent_devtools_token =
+        worker_global_scope->GetThread()->GetDevToolsWorkerToken();
     settings = WorkerSettings::Copy(worker_global_scope->GetWorkerSettings());
   }
 
@@ -336,7 +336,7 @@
       GetExecutionContext()->GetHttpsState(), CreateWorkerClients(),
       GetExecutionContext()->GetSecurityContext().AddressSpace(),
       OriginTrialContext::GetTokens(GetExecutionContext()).get(),
-      devtools_worker_token, std::move(settings), kV8CacheOptionsDefault,
+      parent_devtools_token, std::move(settings), kV8CacheOptionsDefault,
       nullptr /* worklet_module_responses_map */,
       ConnectToWorkerInterfaceProvider(GetExecutionContext(),
                                        SecurityOrigin::Create(script_url)),
diff --git a/third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc b/third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc
index 5320115..4200376 100644
--- a/third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc
+++ b/third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc
@@ -18,7 +18,6 @@
 #include "third_party/blink/renderer/core/workers/dedicated_worker.h"
 #include "third_party/blink/renderer/core/workers/dedicated_worker_object_proxy.h"
 #include "third_party/blink/renderer/core/workers/dedicated_worker_thread.h"
-#include "third_party/blink/renderer/core/workers/worker_inspector_proxy.h"
 #include "third_party/blink/renderer/core/workers/worker_options.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
diff --git a/third_party/blink/renderer/core/workers/execution_context_worker_registry.cc b/third_party/blink/renderer/core/workers/execution_context_worker_registry.cc
deleted file mode 100644
index af294e7..0000000
--- a/third_party/blink/renderer/core/workers/execution_context_worker_registry.cc
+++ /dev/null
@@ -1,55 +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 "third_party/blink/renderer/core/workers/execution_context_worker_registry.h"
-
-#include "third_party/blink/renderer/core/dom/document.h"
-#include "third_party/blink/renderer/core/inspector/inspector_trace_events.h"
-
-namespace blink {
-
-const char ExecutionContextWorkerRegistry::kSupplementName[] =
-    "ExecutionContextWorkerRegistry";
-
-ExecutionContextWorkerRegistry::ExecutionContextWorkerRegistry(
-    ExecutionContext& context)
-    : Supplement<ExecutionContext>(context) {}
-
-ExecutionContextWorkerRegistry::~ExecutionContextWorkerRegistry() {
-}
-
-ExecutionContextWorkerRegistry* ExecutionContextWorkerRegistry::From(
-    ExecutionContext& context) {
-  DCHECK(context.IsContextThread());
-  ExecutionContextWorkerRegistry* worker_registry =
-      Supplement<ExecutionContext>::From<ExecutionContextWorkerRegistry>(
-          context);
-  if (!worker_registry) {
-    worker_registry = new ExecutionContextWorkerRegistry(context);
-    Supplement<ExecutionContext>::ProvideTo(context, worker_registry);
-  }
-  return worker_registry;
-}
-
-void ExecutionContextWorkerRegistry::AddWorkerInspectorProxy(
-    WorkerInspectorProxy* proxy) {
-  proxies_.insert(proxy);
-}
-
-void ExecutionContextWorkerRegistry::RemoveWorkerInspectorProxy(
-    WorkerInspectorProxy* proxy) {
-  proxies_.erase(proxy);
-}
-
-const HeapHashSet<Member<WorkerInspectorProxy>>&
-ExecutionContextWorkerRegistry::GetWorkerInspectorProxies() {
-  return proxies_;
-}
-
-void ExecutionContextWorkerRegistry::Trace(Visitor* visitor) {
-  visitor->Trace(proxies_);
-  Supplement<ExecutionContext>::Trace(visitor);
-}
-
-}  // namespace blink
diff --git a/third_party/blink/renderer/core/workers/execution_context_worker_registry.h b/third_party/blink/renderer/core/workers/execution_context_worker_registry.h
deleted file mode 100644
index 391d9b78..0000000
--- a/third_party/blink/renderer/core/workers/execution_context_worker_registry.h
+++ /dev/null
@@ -1,42 +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 THIRD_PARTY_BLINK_RENDERER_CORE_WORKERS_EXECUTION_CONTEXT_WORKER_REGISTRY_H_
-#define THIRD_PARTY_BLINK_RENDERER_CORE_WORKERS_EXECUTION_CONTEXT_WORKER_REGISTRY_H_
-
-#include "third_party/blink/renderer/core/execution_context/execution_context.h"
-#include "third_party/blink/renderer/core/workers/worker_inspector_proxy.h"
-#include "third_party/blink/renderer/platform/supplementable.h"
-#include "third_party/blink/renderer/platform/wtf/hash_set.h"
-
-namespace blink {
-
-// Tracks the WorkerInspectorProxy objects created by a given ExecutionContext.
-class ExecutionContextWorkerRegistry final
-    : public GarbageCollectedFinalized<ExecutionContextWorkerRegistry>,
-      public Supplement<ExecutionContext> {
-  USING_GARBAGE_COLLECTED_MIXIN(ExecutionContextWorkerRegistry);
-
- public:
-  static const char kSupplementName[];
-
-  static ExecutionContextWorkerRegistry* From(ExecutionContext& context);
-
-  ~ExecutionContextWorkerRegistry();
-
-  void AddWorkerInspectorProxy(WorkerInspectorProxy* proxy);
-  void RemoveWorkerInspectorProxy(WorkerInspectorProxy* proxy);
-  const HeapHashSet<Member<WorkerInspectorProxy>>& GetWorkerInspectorProxies();
-
-  void Trace(Visitor* visitor) override;
-
- private:
-  explicit ExecutionContextWorkerRegistry(ExecutionContext& context);
-
-  HeapHashSet<Member<WorkerInspectorProxy>> proxies_;
-};
-
-}  // namespace blink
-
-#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_WORKERS_EXECUTION_CONTEXT_WORKER_REGISTRY_H_
diff --git a/third_party/blink/renderer/core/workers/experimental/task.cc b/third_party/blink/renderer/core/workers/experimental/task.cc
index 0af9482..9f5ac38a 100644
--- a/third_party/blink/renderer/core/workers/experimental/task.cc
+++ b/third_party/blink/renderer/core/workers/experimental/task.cc
@@ -4,6 +4,7 @@
 
 #include "third_party/blink/renderer/core/workers/experimental/task.h"
 
+#include "third_party/blink/renderer/bindings/core/v8/script_function.h"
 #include "third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_function.h"
@@ -16,6 +17,29 @@
 
 namespace blink {
 
+class ThreadPoolTask::AsyncFunctionCompleted : public ScriptFunction {
+ public:
+  static v8::Local<v8::Function> CreateFunction(ScriptState* script_state,
+                                                ThreadPoolTask* task,
+                                                State state) {
+    return (new AsyncFunctionCompleted(script_state, task, state))
+        ->BindToV8Function();
+  }
+
+  ScriptValue Call(ScriptValue v) override {
+    task_->TaskCompletedOnWorkerThread(v.V8Value(), state_);
+    return ScriptValue();
+  }
+
+ private:
+  AsyncFunctionCompleted(ScriptState* script_state,
+                         ThreadPoolTask* task,
+                         State state)
+      : ScriptFunction(script_state), task_(task), state_(state) {}
+  ThreadPoolTask* task_;
+  const State state_;
+};
+
 ThreadPoolTask::ThreadPoolTask(ThreadPoolThreadProvider* thread_provider,
                                ScriptState* script_state,
                                const ScriptValue& function,
@@ -232,29 +256,27 @@
     }
   }
 
-  WorkerOrWorkletGlobalScope* global_scope = worker_thread_->GlobalScope();
-  v8::Isolate* isolate = ToIsolate(global_scope);
-  ScriptState::Scope scope(global_scope->ScriptController()->GetScriptState());
-
-  v8::TryCatch block(isolate);
-  v8::Local<v8::Value> return_value;
   if (was_cancelled) {
-    return_value = V8String(isolate, "Task aborted");
-  } else {
-    return_value = RunTaskOnWorkerThread(isolate);
-    if (return_value.IsEmpty()) {
-      if (block.HasCaught())
-        return_value = block.Exception()->ToString(isolate);
-      else
-        return_value = V8String(isolate, "Invalid task");
-    }
+    WorkerOrWorkletGlobalScope* global_scope = worker_thread_->GlobalScope();
+    v8::Isolate* isolate = ToIsolate(global_scope);
+    ScriptState::Scope scope(
+        global_scope->ScriptController()->GetScriptState());
+    TaskCompletedOnWorkerThread(V8String(isolate, "Task aborted"),
+                                State::kFailed);
+    return;
   }
 
+  RunTaskOnWorkerThread();
+}
+
+void ThreadPoolTask::TaskCompletedOnWorkerThread(
+    v8::Local<v8::Value> return_value,
+    State state) {
+  DCHECK(worker_thread_->IsCurrentThread());
+
   scoped_refptr<SerializedScriptValue> local_result =
-      SerializedScriptValue::SerializeAndSwallowExceptions(isolate,
-                                                           return_value);
-  State local_state =
-      block.HasCaught() || was_cancelled ? State::kFailed : State::kCompleted;
+      SerializedScriptValue::SerializeAndSwallowExceptions(
+          ToIsolate(worker_thread_->GlobalScope()), return_value);
 
   function_ = nullptr;
   arguments_.clear();
@@ -263,13 +285,13 @@
   {
     MutexLocker lock(mutex_);
     serialized_result_ = local_result;
-    AdvanceState(local_state);
+    AdvanceState(state);
     dependents_to_notify.swap(dependents_);
   }
 
   for (auto& dependent : dependents_to_notify) {
     dependent->task->PrerequisiteFinished(dependent->index, return_value,
-                                          local_result, local_state);
+                                          local_result, state);
   }
 
   PostCrossThreadTask(
@@ -281,20 +303,23 @@
   // TaskCompleted may delete |this| at any time after this point.
 }
 
-v8::Local<v8::Value> ThreadPoolTask::RunTaskOnWorkerThread(
-    v8::Isolate* isolate) {
+void ThreadPoolTask::RunTaskOnWorkerThread() {
   DCHECK(worker_thread_->IsCurrentThread());
   // No other thread should be touching function_ or arguments_ at this point,
   // so no mutex needed while actually running the task.
+  WorkerOrWorkletGlobalScope* global_scope = worker_thread_->GlobalScope();
+  ScriptState::Scope scope(global_scope->ScriptController()->GetScriptState());
+  v8::Isolate* isolate = ToIsolate(global_scope);
   v8::Local<v8::Context> context = isolate->GetCurrentContext();
+
   v8::Local<v8::Function> script_function;
   v8::Local<v8::Value> receiver;
   if (function_) {
     String core_script =
         "(" + ToCoreString(function_->Deserialize(isolate).As<v8::String>()) +
         ")";
-    v8::MaybeLocal<v8::Script> script = v8::Script::Compile(
-        isolate->GetCurrentContext(), V8String(isolate, core_script));
+    v8::MaybeLocal<v8::Script> script =
+        v8::Script::Compile(context, V8String(isolate, core_script));
     script_function = script.ToLocalChecked()
                           ->Run(context)
                           .ToLocalChecked()
@@ -302,15 +327,18 @@
     receiver = script_function;
   } else if (worker_thread_->IsWorklet()) {
     TaskWorkletGlobalScope* task_worklet_global_scope =
-        static_cast<TaskWorkletGlobalScope*>(worker_thread_->GlobalScope());
+        static_cast<TaskWorkletGlobalScope*>(global_scope);
     script_function = task_worklet_global_scope->GetProcessFunctionForName(
         function_name_, isolate);
     receiver =
         task_worklet_global_scope->GetInstanceForName(function_name_, isolate);
   }
 
-  if (script_function.IsEmpty())
-    return v8::Local<v8::Value>();
+  if (script_function.IsEmpty()) {
+    TaskCompletedOnWorkerThread(V8String(isolate, "Invalid task"),
+                                State::kFailed);
+    return;
+  }
 
   Vector<v8::Local<v8::Value>> params(arguments_.size());
   for (size_t i = 0; i < arguments_.size(); i++) {
@@ -321,16 +349,33 @@
       params[i] = arguments_[i].v8_value->NewLocal(isolate);
   }
 
+  v8::TryCatch block(isolate);
   v8::MaybeLocal<v8::Value> ret =
       script_function->Call(context, receiver, params.size(), params.data());
-
-  v8::Local<v8::Value> return_value;
-  if (!ret.IsEmpty()) {
-    return_value = ret.ToLocalChecked();
-    if (return_value->IsPromise())
-      return_value = return_value.As<v8::Promise>()->Result();
+  if (block.HasCaught()) {
+    TaskCompletedOnWorkerThread(block.Exception()->ToString(isolate),
+                                State::kFailed);
+    return;
   }
-  return return_value;
+
+  DCHECK(!ret.IsEmpty());
+  v8::Local<v8::Value> return_value = ret.ToLocalChecked();
+  if (return_value->IsPromise()) {
+    v8::Local<v8::Promise> promise = return_value.As<v8::Promise>();
+    if (promise->State() == v8::Promise::kPending) {
+      // Wait for the promise to resolve before calling
+      // TaskCompletedOnWorkerThread.
+      ScriptState* script_state = ScriptState::Current(isolate);
+      ScriptPromise(script_state, promise)
+          .Then(AsyncFunctionCompleted::CreateFunction(script_state, this,
+                                                       State::kCompleted),
+                AsyncFunctionCompleted::CreateFunction(script_state, this,
+                                                       State::kFailed));
+      return;
+    }
+    return_value = promise->Result();
+  }
+  TaskCompletedOnWorkerThread(return_value, State::kCompleted);
 }
 
 void ThreadPoolTask::TaskCompleted() {
diff --git a/third_party/blink/renderer/core/workers/experimental/task.h b/third_party/blink/renderer/core/workers/experimental/task.h
index 0160883..2294cf7 100644
--- a/third_party/blink/renderer/core/workers/experimental/task.h
+++ b/third_party/blink/renderer/core/workers/experimental/task.h
@@ -54,8 +54,12 @@
                  const Vector<ScriptValue>& arguments,
                  TaskType);
 
+  class AsyncFunctionCompleted;
+
   void StartTaskOnWorkerThread() LOCKS_EXCLUDED(mutex_);
-  v8::Local<v8::Value> RunTaskOnWorkerThread(v8::Isolate*);
+  void RunTaskOnWorkerThread();
+  void TaskCompletedOnWorkerThread(v8::Local<v8::Value> return_value, State)
+      LOCKS_EXCLUDED(mutex_);
 
   // Called on ANY thread (main thread, worker_thread_, or a sibling worker).
   void MaybeStartTask() EXCLUSIVE_LOCKS_REQUIRED(mutex_);
diff --git a/third_party/blink/renderer/core/workers/shared_worker_reporting_proxy.cc b/third_party/blink/renderer/core/workers/shared_worker_reporting_proxy.cc
index 5433c74..a1def05 100644
--- a/third_party/blink/renderer/core/workers/shared_worker_reporting_proxy.cc
+++ b/third_party/blink/renderer/core/workers/shared_worker_reporting_proxy.cc
@@ -58,18 +58,6 @@
   // Not supported in SharedWorker.
 }
 
-void SharedWorkerReportingProxy::PostMessageToPageInspector(
-    int session_id,
-    const String& message) {
-  DCHECK(!IsMainThread());
-  PostCrossThreadTask(
-      *parent_execution_context_task_runners_->Get(
-          TaskType::kInternalInspector),
-      FROM_HERE,
-      CrossThreadBind(&WebSharedWorkerImpl::PostMessageToPageInspector,
-                      CrossThreadUnretained(worker_), session_id, message));
-}
-
 void SharedWorkerReportingProxy::DidCloseWorkerGlobalScope() {
   DCHECK(!IsMainThread());
   PostCrossThreadTask(
diff --git a/third_party/blink/renderer/core/workers/shared_worker_reporting_proxy.h b/third_party/blink/renderer/core/workers/shared_worker_reporting_proxy.h
index 280e2da2..ad84445 100644
--- a/third_party/blink/renderer/core/workers/shared_worker_reporting_proxy.h
+++ b/third_party/blink/renderer/core/workers/shared_worker_reporting_proxy.h
@@ -35,7 +35,6 @@
                             MessageLevel,
                             const String& message,
                             SourceLocation*) override;
-  void PostMessageToPageInspector(int session_id, const WTF::String&) override;
   void DidEvaluateClassicScript(bool success) override {}
   void DidCloseWorkerGlobalScope() override;
   void WillDestroyWorkerGlobalScope() override {}
diff --git a/third_party/blink/renderer/core/workers/threaded_messaging_proxy_base.cc b/third_party/blink/renderer/core/workers/threaded_messaging_proxy_base.cc
index 6435dec..1fbfca5 100644
--- a/third_party/blink/renderer/core/workers/threaded_messaging_proxy_base.cc
+++ b/third_party/blink/renderer/core/workers/threaded_messaging_proxy_base.cc
@@ -12,11 +12,11 @@
 #include "third_party/blink/renderer/core/frame/deprecation.h"
 #include "third_party/blink/renderer/core/frame/local_frame.h"
 #include "third_party/blink/renderer/core/frame/local_frame_client.h"
+#include "third_party/blink/renderer/core/inspector/console_message.h"
 #include "third_party/blink/renderer/core/loader/document_loader.h"
 #include "third_party/blink/renderer/core/loader/worker_fetch_context.h"
 #include "third_party/blink/renderer/core/workers/global_scope_creation_params.h"
 #include "third_party/blink/renderer/core/workers/worker_global_scope.h"
-#include "third_party/blink/renderer/core/workers/worker_inspector_proxy.h"
 #include "third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h"
 #include "third_party/blink/renderer/platform/wtf/time.h"
 
@@ -31,7 +31,6 @@
 ThreadedMessagingProxyBase::ThreadedMessagingProxyBase(
     ExecutionContext* execution_context)
     : execution_context_(execution_context),
-      worker_inspector_proxy_(WorkerInspectorProxy::Create()),
       parent_execution_context_task_runners_(
           ParentExecutionContextTaskRunners::Create(execution_context_.Get())),
       terminate_sync_load_event_(
@@ -53,7 +52,6 @@
 
 void ThreadedMessagingProxyBase::Trace(blink::Visitor* visitor) {
   visitor->Trace(execution_context_);
-  visitor->Trace(worker_inspector_proxy_);
 }
 
 void ThreadedMessagingProxyBase::InitializeWorkerThread(
@@ -89,12 +87,11 @@
   }
 
   worker_thread_ = CreateWorkerThread();
-  worker_thread_->Start(
-      std::move(global_scope_creation_params), thread_startup_data,
-      GetWorkerInspectorProxy()->ShouldPauseOnWorkerStart(execution_context_),
-      GetParentExecutionContextTaskRunners());
-  GetWorkerInspectorProxy()->WorkerThreadCreated(execution_context_,
-                                                 GetWorkerThread(), script_url);
+
+  worker_thread_->Start(std::move(global_scope_creation_params),
+                        thread_startup_data,
+                        DevToolsAgent::From(execution_context_.Get()),
+                        GetParentExecutionContextTaskRunners());
 
   if (auto* scope = DynamicTo<WorkerGlobalScope>(*execution_context_)) {
     scope->GetThread()->ChildThreadStartedOnWorkerThread(worker_thread_.get());
@@ -146,7 +143,10 @@
   if (auto* scope = DynamicTo<WorkerGlobalScope>(*execution_context_))
     parent_thread = scope->GetThread();
   std::unique_ptr<WorkerThread> child_thread = std::move(worker_thread_);
-  worker_inspector_proxy_->WorkerThreadTerminated();
+  if (child_thread) {
+    if (DevToolsAgent* agent = DevToolsAgent::From(execution_context_.Get()))
+      agent->ChildWorkerThreadTerminated(child_thread.get());
+  }
 
   // If the parent Worker/Worklet object was already destroyed, this will
   // destroy |this|.
@@ -165,18 +165,11 @@
 
   terminate_sync_load_event_.Signal();
 
-  if (worker_thread_)
-    worker_thread_->Terminate();
-
-  worker_inspector_proxy_->WorkerThreadTerminated();
-}
-
-void ThreadedMessagingProxyBase::PostMessageToPageInspector(
-    int session_id,
-    const String& message) {
-  DCHECK(IsParentContextThread());
-  if (worker_inspector_proxy_)
-    worker_inspector_proxy_->DispatchMessageFromWorker(session_id, message);
+  if (!worker_thread_)
+    return;
+  worker_thread_->Terminate();
+  if (DevToolsAgent* agent = DevToolsAgent::From(execution_context_.Get()))
+    agent->ChildWorkerThreadTerminated(worker_thread_.get());
 }
 
 ExecutionContext* ThreadedMessagingProxyBase::GetExecutionContext() const {
@@ -190,12 +183,6 @@
   return parent_execution_context_task_runners_;
 }
 
-WorkerInspectorProxy* ThreadedMessagingProxyBase::GetWorkerInspectorProxy()
-    const {
-  DCHECK(IsParentContextThread());
-  return worker_inspector_proxy_;
-}
-
 WorkerThread* ThreadedMessagingProxyBase::GetWorkerThread() const {
   DCHECK(IsParentContextThread());
   return worker_thread_.get();
diff --git a/third_party/blink/renderer/core/workers/threaded_messaging_proxy_base.h b/third_party/blink/renderer/core/workers/threaded_messaging_proxy_base.h
index fa6c682..d4b61b1 100644
--- a/third_party/blink/renderer/core/workers/threaded_messaging_proxy_base.h
+++ b/third_party/blink/renderer/core/workers/threaded_messaging_proxy_base.h
@@ -25,7 +25,6 @@
 
 class ExecutionContext;
 class SourceLocation;
-class WorkerInspectorProxy;
 struct GlobalScopeCreationParams;
 
 // The base proxy class to talk to Worker/WorkletGlobalScope on a worker thread
@@ -60,7 +59,6 @@
                             MessageLevel,
                             const String& message,
                             std::unique_ptr<SourceLocation>);
-  void PostMessageToPageInspector(int session_id, const String&);
 
   void WorkerThreadTerminated();
 
@@ -79,7 +77,6 @@
   ExecutionContext* GetExecutionContext() const;
   ParentExecutionContextTaskRunners* GetParentExecutionContextTaskRunners()
       const;
-  WorkerInspectorProxy* GetWorkerInspectorProxy() const;
 
   // May return nullptr after termination is requested.
   WorkerThread* GetWorkerThread() const;
@@ -93,7 +90,6 @@
   virtual std::unique_ptr<WorkerThread> CreateWorkerThread() = 0;
 
   Member<ExecutionContext> execution_context_;
-  Member<WorkerInspectorProxy> worker_inspector_proxy_;
 
   // Accessed cross-thread when worker thread posts tasks to the parent.
   CrossThreadPersistent<ParentExecutionContextTaskRunners>
diff --git a/third_party/blink/renderer/core/workers/threaded_object_proxy_base.cc b/third_party/blink/renderer/core/workers/threaded_object_proxy_base.cc
index 7784a284..f368899 100644
--- a/third_party/blink/renderer/core/workers/threaded_object_proxy_base.cc
+++ b/third_party/blink/renderer/core/workers/threaded_object_proxy_base.cc
@@ -43,19 +43,6 @@
                       WTF::Passed(location->Clone())));
 }
 
-void ThreadedObjectProxyBase::PostMessageToPageInspector(
-    int session_id,
-    const String& message) {
-  // The TaskType of Inspector tasks need to be Unthrottled because they need to
-  // run even on a suspended page.
-  PostCrossThreadTask(
-      *GetParentExecutionContextTaskRunners()->Get(
-          TaskType::kInternalInspector),
-      FROM_HERE,
-      CrossThreadBind(&ThreadedMessagingProxyBase::PostMessageToPageInspector,
-                      MessagingProxyWeakPtr(), session_id, message));
-}
-
 void ThreadedObjectProxyBase::DidCloseWorkerGlobalScope() {
   PostCrossThreadTask(
       *GetParentExecutionContextTaskRunners()->Get(TaskType::kInternalDefault),
diff --git a/third_party/blink/renderer/core/workers/threaded_object_proxy_base.h b/third_party/blink/renderer/core/workers/threaded_object_proxy_base.h
index 69c7850..b8bbe9e 100644
--- a/third_party/blink/renderer/core/workers/threaded_object_proxy_base.h
+++ b/third_party/blink/renderer/core/workers/threaded_object_proxy_base.h
@@ -35,7 +35,6 @@
                             MessageLevel,
                             const String& message,
                             SourceLocation*) override;
-  void PostMessageToPageInspector(int session_id, const String&) override;
   void DidCloseWorkerGlobalScope() override;
   void DidTerminateWorkerThread() override;
 
diff --git a/third_party/blink/renderer/core/workers/threaded_worklet_messaging_proxy.cc b/third_party/blink/renderer/core/workers/threaded_worklet_messaging_proxy.cc
index 16324e9..e516b397 100644
--- a/third_party/blink/renderer/core/workers/threaded_worklet_messaging_proxy.cc
+++ b/third_party/blink/renderer/core/workers/threaded_worklet_messaging_proxy.cc
@@ -19,7 +19,6 @@
 #include "third_party/blink/renderer/core/workers/threaded_worklet_object_proxy.h"
 #include "third_party/blink/renderer/core/workers/worker_clients.h"
 #include "third_party/blink/renderer/core/workers/worker_content_settings_client.h"
-#include "third_party/blink/renderer/core/workers/worker_inspector_proxy.h"
 #include "third_party/blink/renderer/core/workers/worklet_global_scope.h"
 #include "third_party/blink/renderer/core/workers/worklet_module_responses_map.h"
 #include "third_party/blink/renderer/core/workers/worklet_pending_tasks.h"
diff --git a/third_party/blink/renderer/core/workers/worker_inspector_proxy.cc b/third_party/blink/renderer/core/workers/worker_inspector_proxy.cc
deleted file mode 100644
index c06bfa4..0000000
--- a/third_party/blink/renderer/core/workers/worker_inspector_proxy.cc
+++ /dev/null
@@ -1,164 +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.
-
-#include "third_party/blink/renderer/core/workers/worker_inspector_proxy.h"
-
-#include "base/location.h"
-#include "third_party/blink/renderer/core/frame/frame_console.h"
-#include "third_party/blink/renderer/core/inspector/identifiers_factory.h"
-#include "third_party/blink/renderer/core/inspector/inspector_trace_events.h"
-#include "third_party/blink/renderer/core/inspector/inspector_worker_agent.h"
-#include "third_party/blink/renderer/core/inspector/worker_inspector_controller.h"
-#include "third_party/blink/renderer/core/probe/core_probes.h"
-#include "third_party/blink/renderer/core/workers/execution_context_worker_registry.h"
-#include "third_party/blink/renderer/core/workers/worker_global_scope.h"
-#include "third_party/blink/renderer/core/workers/worker_thread.h"
-#include "third_party/blink/renderer/platform/cross_thread_functional.h"
-#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
-#include "third_party/blink/renderer/platform/web_task_runner.h"
-#include "third_party/blink/renderer/platform/weborigin/kurl.h"
-
-namespace blink {
-
-WorkerInspectorProxy::WorkerInspectorProxy()
-    : worker_thread_(nullptr), execution_context_(nullptr) {}
-
-WorkerInspectorProxy* WorkerInspectorProxy::Create() {
-  return new WorkerInspectorProxy();
-}
-
-WorkerInspectorProxy::~WorkerInspectorProxy() = default;
-
-const String& WorkerInspectorProxy::InspectorId() {
-  if (inspector_id_.IsEmpty() && worker_thread_) {
-    inspector_id_ = IdentifiersFactory::IdFromToken(
-        worker_thread_->GetDevToolsWorkerToken());
-  }
-  return inspector_id_;
-}
-
-WorkerInspectorProxy::PauseOnWorkerStart
-WorkerInspectorProxy::ShouldPauseOnWorkerStart(
-    ExecutionContext* execution_context) {
-  bool result = false;
-  probe::shouldWaitForDebuggerOnWorkerStart(execution_context, &result);
-  return result ? PauseOnWorkerStart::kPause : PauseOnWorkerStart::kDontPause;
-}
-
-void WorkerInspectorProxy::WorkerThreadCreated(
-    ExecutionContext* execution_context,
-    WorkerThread* worker_thread,
-    const KURL& url) {
-  worker_thread_ = worker_thread;
-  execution_context_ = execution_context;
-  url_ = url.GetString();
-  DCHECK(execution_context_);
-  ExecutionContextWorkerRegistry::From(*execution_context_)
-      ->AddWorkerInspectorProxy(this);
-  // We expect everyone starting worker thread to synchronously ask for
-  // ShouldPauseOnWorkerStart() right before.
-  bool waiting_for_debugger = false;
-  probe::shouldWaitForDebuggerOnWorkerStart(execution_context_,
-                                            &waiting_for_debugger);
-  probe::didStartWorker(execution_context_, this, waiting_for_debugger);
-}
-
-void WorkerInspectorProxy::WorkerThreadTerminated() {
-  if (worker_thread_) {
-    ExecutionContextWorkerRegistry::From(*execution_context_)
-        ->RemoveWorkerInspectorProxy(this);
-    probe::workerTerminated(execution_context_, this);
-  }
-
-  worker_thread_ = nullptr;
-  page_inspectors_.clear();
-  execution_context_ = nullptr;
-}
-
-void WorkerInspectorProxy::DispatchMessageFromWorker(int session_id,
-                                                     const String& message) {
-  auto it = page_inspectors_.find(session_id);
-  if (it != page_inspectors_.end())
-    it->value->DispatchMessageFromWorker(this, session_id, message);
-}
-
-static void ConnectToWorkerGlobalScopeInspectorTask(WorkerThread* worker_thread,
-                                                    int session_id) {
-  if (WorkerInspectorController* inspector =
-          worker_thread->GetWorkerInspectorController()) {
-    inspector->ConnectFrontend(session_id);
-  }
-}
-
-void WorkerInspectorProxy::ConnectToInspector(
-    int session_id,
-    WorkerInspectorProxy::PageInspector* page_inspector) {
-  if (!worker_thread_)
-    return;
-  DCHECK(page_inspectors_.find(session_id) == page_inspectors_.end());
-  page_inspectors_.insert(session_id, page_inspector);
-  PostCrossThreadTask(
-      *worker_thread_->GetTaskRunner(TaskType::kInternalInspector), FROM_HERE,
-      CrossThreadBind(ConnectToWorkerGlobalScopeInspectorTask,
-                      CrossThreadUnretained(worker_thread_), session_id));
-}
-
-static void DisconnectFromWorkerGlobalScopeInspectorTask(
-    WorkerThread* worker_thread,
-    int session_id) {
-  if (WorkerInspectorController* inspector =
-          worker_thread->GetWorkerInspectorController()) {
-    inspector->DisconnectFrontend(session_id);
-  }
-}
-
-void WorkerInspectorProxy::DisconnectFromInspector(
-    int session_id,
-    WorkerInspectorProxy::PageInspector* page_inspector) {
-  DCHECK(page_inspectors_.at(session_id) == page_inspector);
-  page_inspectors_.erase(session_id);
-  if (worker_thread_) {
-    PostCrossThreadTask(
-        *worker_thread_->GetTaskRunner(TaskType::kInternalInspector), FROM_HERE,
-        CrossThreadBind(DisconnectFromWorkerGlobalScopeInspectorTask,
-                        CrossThreadUnretained(worker_thread_), session_id));
-  }
-}
-
-static void DispatchOnInspectorBackendTask(int session_id,
-                                           const String& message,
-                                           WorkerThread* worker_thread) {
-  if (WorkerInspectorController* inspector =
-          worker_thread->GetWorkerInspectorController()) {
-    inspector->DispatchMessageFromFrontend(session_id, message);
-  }
-}
-
-void WorkerInspectorProxy::SendMessageToInspector(int session_id,
-                                                  const String& message) {
-  if (!worker_thread_)
-    return;
-
-  String method;
-  protocol::UberDispatcher dispatcher(nullptr);
-  dispatcher.parseCommand(protocol::StringUtil::parseJSON(message).get(),
-                          nullptr, &method);
-
-  if (InspectorSession::ShouldInterruptForMethod(method)) {
-    worker_thread_->GetInspectorTaskRunner()->AppendTask(
-        CrossThreadBind(DispatchOnInspectorBackendTask, session_id, message,
-                        CrossThreadUnretained(worker_thread_)));
-  } else {
-    PostCrossThreadTask(
-        *worker_thread_->GetTaskRunner(TaskType::kInternalInspector), FROM_HERE,
-        CrossThreadBind(DispatchOnInspectorBackendTask, session_id, message,
-                        CrossThreadUnretained(worker_thread_)));
-  }
-}
-
-void WorkerInspectorProxy::Trace(blink::Visitor* visitor) {
-  visitor->Trace(execution_context_);
-}
-
-}  // namespace blink
diff --git a/third_party/blink/renderer/core/workers/worker_inspector_proxy.h b/third_party/blink/renderer/core/workers/worker_inspector_proxy.h
deleted file mode 100644
index c7e88483..0000000
--- a/third_party/blink/renderer/core/workers/worker_inspector_proxy.h
+++ /dev/null
@@ -1,72 +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 THIRD_PARTY_BLINK_RENDERER_CORE_WORKERS_WORKER_INSPECTOR_PROXY_H_
-#define THIRD_PARTY_BLINK_RENDERER_CORE_WORKERS_WORKER_INSPECTOR_PROXY_H_
-
-#include "base/macros.h"
-#include "third_party/blink/renderer/core/core_export.h"
-#include "third_party/blink/renderer/core/inspector/console_message.h"
-#include "third_party/blink/renderer/core/inspector/thread_debugger.h"
-#include "third_party/blink/renderer/platform/heap/handle.h"
-#include "third_party/blink/renderer/platform/wtf/forward.h"
-#include "third_party/blink/renderer/platform/wtf/hash_map.h"
-
-namespace blink {
-
-class ExecutionContext;
-class KURL;
-class WorkerThread;
-
-// A proxy for talking to the worker inspector on the worker thread.
-// All of these methods should be called on the main thread.
-class CORE_EXPORT WorkerInspectorProxy final
-    : public GarbageCollectedFinalized<WorkerInspectorProxy> {
- public:
-  enum class PauseOnWorkerStart { kPause, kDontPause };
-
-  static WorkerInspectorProxy* Create();
-
-  ~WorkerInspectorProxy();
-  void Trace(blink::Visitor*);
-
-  class CORE_EXPORT PageInspector {
-   public:
-    virtual ~PageInspector() = default;
-    virtual void DispatchMessageFromWorker(WorkerInspectorProxy*,
-                                           int session_id,
-                                           const String& message) = 0;
-  };
-
-  // Returns whether WorkerThread should pause to run debugger tasks on its
-  // startup.
-  PauseOnWorkerStart ShouldPauseOnWorkerStart(ExecutionContext*);
-
-  void WorkerThreadCreated(ExecutionContext*, WorkerThread*, const KURL&);
-  void WorkerThreadTerminated();
-  void DispatchMessageFromWorker(int session_id, const String&);
-
-  void ConnectToInspector(int session_id,
-                          PageInspector*);
-  void DisconnectFromInspector(int session_id, PageInspector*);
-  void SendMessageToInspector(int session_id, const String& message);
-
-  const String& Url() { return url_; }
-  ExecutionContext* GetExecutionContext() { return execution_context_; }
-  const String& InspectorId();
-  WorkerThread* GetWorkerThread() { return worker_thread_; }
-
- private:
-  WorkerInspectorProxy();
-
-  WorkerThread* worker_thread_;
-  Member<ExecutionContext> execution_context_;
-  HashMap<int, PageInspector*> page_inspectors_;
-  String url_;
-  String inspector_id_;
-};
-
-}  // namespace blink
-
-#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_WORKERS_WORKER_INSPECTOR_PROXY_H_
diff --git a/third_party/blink/renderer/core/workers/worker_reporting_proxy.h b/third_party/blink/renderer/core/workers/worker_reporting_proxy.h
index c801c3ef..6459c82 100644
--- a/third_party/blink/renderer/core/workers/worker_reporting_proxy.h
+++ b/third_party/blink/renderer/core/workers/worker_reporting_proxy.h
@@ -60,7 +60,6 @@
                                     MessageLevel,
                                     const String& message,
                                     SourceLocation*) {}
-  virtual void PostMessageToPageInspector(int session_id, const String&) {}
 
   // Invoked when the new WorkerGlobalScope is created on
   // WorkerThread::InitializeOnWorkerThread.
diff --git a/third_party/blink/renderer/core/workers/worker_thread.cc b/third_party/blink/renderer/core/workers/worker_thread.cc
index 364a572..d29be4ae 100644
--- a/third_party/blink/renderer/core/workers/worker_thread.cc
+++ b/third_party/blink/renderer/core/workers/worker_thread.cc
@@ -107,19 +107,6 @@
   DISALLOW_COPY_AND_ASSIGN(RefCountedWaitableEvent);
 };
 
-WorkerThread::ScopedDebuggerTask::ScopedDebuggerTask(WorkerThread* thread)
-    : thread_(thread) {
-  MutexLocker lock(thread_->mutex_);
-  DCHECK(thread_->IsCurrentThread());
-  thread_->debugger_task_counter_++;
-}
-
-WorkerThread::ScopedDebuggerTask::~ScopedDebuggerTask() {
-  MutexLocker lock(thread_->mutex_);
-  DCHECK(thread_->IsCurrentThread());
-  thread_->debugger_task_counter_--;
-}
-
 WorkerThread::~WorkerThread() {
   MutexLocker lock(ThreadSetMutex());
   DCHECK(WorkerThreads().Contains(this));
@@ -136,7 +123,7 @@
 void WorkerThread::Start(
     std::unique_ptr<GlobalScopeCreationParams> global_scope_creation_params,
     const base::Optional<WorkerBackingThreadStartupData>& thread_startup_data,
-    WorkerInspectorProxy::PauseOnWorkerStart pause_on_start,
+    DevToolsAgent* devtools_agent,
     ParentExecutionContextTaskRunners* parent_execution_context_task_runners) {
   DCHECK_CALLED_ON_VALID_THREAD(parent_thread_checker_);
   DCHECK(!parent_execution_context_task_runners_);
@@ -156,12 +143,24 @@
   inspector_task_runner_ =
       InspectorTaskRunner::Create(GetTaskRunner(TaskType::kInternalInspector));
 
+  bool wait_for_debugger = false;
+  mojom::blink::DevToolsAgentRequest devtools_agent_request;
+  mojom::blink::DevToolsAgentHostPtrInfo devtools_agent_host_ptr_info;
+  if (devtools_agent) {
+    devtools_agent->ChildWorkerThreadCreated(
+        this, global_scope_creation_params->script_url.Copy(),
+        devtools_agent_request, devtools_agent_host_ptr_info,
+        wait_for_debugger);
+  }
+
   GetWorkerBackingThread().BackingThread().PostTask(
       FROM_HERE,
       CrossThreadBind(&WorkerThread::InitializeOnWorkerThread,
                       CrossThreadUnretained(this),
                       WTF::Passed(std::move(global_scope_creation_params)),
-                      thread_startup_data, pause_on_start));
+                      thread_startup_data, wait_for_debugger,
+                      WTF::Passed(std::move(devtools_agent_request)),
+                      WTF::Passed(std::move(devtools_agent_host_ptr_info))));
 }
 
 void WorkerThread::EvaluateClassicScript(
@@ -275,9 +274,16 @@
   return GetWorkerBackingThread().BackingThread().IsCurrentThread();
 }
 
-InspectorTaskRunner* WorkerThread::GetInspectorTaskRunner() {
-  DCHECK_CALLED_ON_VALID_THREAD(parent_thread_checker_);
-  return inspector_task_runner_.get();
+void WorkerThread::DebuggerTaskStarted() {
+  MutexLocker lock(mutex_);
+  DCHECK(IsCurrentThread());
+  debugger_task_counter_++;
+}
+
+void WorkerThread::DebuggerTaskFinished() {
+  MutexLocker lock(mutex_);
+  DCHECK(IsCurrentThread());
+  debugger_task_counter_--;
 }
 
 WorkerOrWorkletGlobalScope* WorkerThread::GlobalScope() {
@@ -427,7 +433,9 @@
 void WorkerThread::InitializeOnWorkerThread(
     std::unique_ptr<GlobalScopeCreationParams> global_scope_creation_params,
     const base::Optional<WorkerBackingThreadStartupData>& thread_startup_data,
-    WorkerInspectorProxy::PauseOnWorkerStart pause_on_start) {
+    bool wait_for_debugger,
+    mojom::blink::DevToolsAgentRequest devtools_agent_request,
+    mojom::blink::DevToolsAgentHostPtrInfo devtools_agent_host_ptr_info) {
   DCHECK(IsCurrentThread());
   {
     MutexLocker lock(mutex_);
@@ -447,7 +455,10 @@
     global_scope_ =
         CreateWorkerGlobalScope(std::move(global_scope_creation_params));
     worker_reporting_proxy_.DidCreateWorkerGlobalScope(GlobalScope());
-    worker_inspector_controller_ = WorkerInspectorController::Create(this);
+
+    worker_inspector_controller_ = WorkerInspectorController::Create(
+        this, inspector_task_runner_, std::move(devtools_agent_request),
+        std::move(devtools_agent_host_ptr_info));
 
     // Since context initialization below may fail, we should notify debugger
     // about the new worker thread separately, so that it can resolve it by id
@@ -483,7 +494,7 @@
   // Otherwise, InspectorTaskRunner might interrupt isolate execution
   // from another thread and try to resume "pause on start" before
   // we even paused.
-  if (pause_on_start == WorkerInspectorProxy::PauseOnWorkerStart::kPause) {
+  if (wait_for_debugger) {
     WorkerThreadDebugger* debugger = WorkerThreadDebugger::From(GetIsolate());
     if (debugger)
       debugger->PauseWorkerOnStart(this);
diff --git a/third_party/blink/renderer/core/workers/worker_thread.h b/third_party/blink/renderer/core/workers/worker_thread.h
index ac88d94..bd1b085 100644
--- a/third_party/blink/renderer/core/workers/worker_thread.h
+++ b/third_party/blink/renderer/core/workers/worker_thread.h
@@ -39,9 +39,9 @@
 #include "third_party/blink/public/platform/web_thread_type.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/core/frame/csp/content_security_policy.h"
+#include "third_party/blink/renderer/core/inspector/devtools_agent.h"
 #include "third_party/blink/renderer/core/workers/parent_execution_context_task_runners.h"
 #include "third_party/blink/renderer/core/workers/worker_backing_thread_startup_data.h"
-#include "third_party/blink/renderer/core/workers/worker_inspector_proxy.h"
 #include "third_party/blink/renderer/platform/loader/fetch/access_control_status.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/worker_scheduler.h"
@@ -101,7 +101,7 @@
   // (https://crbug.com/710364)
   void Start(std::unique_ptr<GlobalScopeCreationParams>,
              const base::Optional<WorkerBackingThreadStartupData>&,
-             WorkerInspectorProxy::PauseOnWorkerStart,
+             DevToolsAgent*,
              ParentExecutionContextTaskRunners*);
 
   // Posts a task to evaluate a top-level classic script on the worker thread.
@@ -156,19 +156,9 @@
     return worker_reporting_proxy_;
   }
 
-  // Only constructible on the main thread.
-  class CORE_EXPORT ScopedDebuggerTask {
-    STACK_ALLOCATED();
-
-   public:
-    explicit ScopedDebuggerTask(WorkerThread*);
-    ~ScopedDebuggerTask();
-
-   private:
-    WorkerThread* thread_;
-    DISALLOW_COPY_AND_ASSIGN(ScopedDebuggerTask);
-  };
-  InspectorTaskRunner* GetInspectorTaskRunner();
+  // Only callable on the parent thread.
+  void DebuggerTaskStarted();
+  void DebuggerTaskFinished();
 
   // Callable on both the main thread and the worker thread.
   const base::UnguessableToken& GetDevToolsWorkerToken() const {
@@ -290,7 +280,9 @@
   void InitializeOnWorkerThread(
       std::unique_ptr<GlobalScopeCreationParams>,
       const base::Optional<WorkerBackingThreadStartupData>&,
-      WorkerInspectorProxy::PauseOnWorkerStart) LOCKS_EXCLUDED(mutex_);
+      bool wait_for_debugger,
+      mojom::blink::DevToolsAgentRequest,
+      mojom::blink::DevToolsAgentHostPtrInfo) LOCKS_EXCLUDED(mutex_);
 
   void EvaluateClassicScriptOnWorkerThread(
       const KURL& script_url,
diff --git a/third_party/blink/renderer/core/workers/worker_thread_test.cc b/third_party/blink/renderer/core/workers/worker_thread_test.cc
index 4c9c29a..fc0fb32 100644
--- a/third_party/blink/renderer/core/workers/worker_thread_test.cc
+++ b/third_party/blink/renderer/core/workers/worker_thread_test.cc
@@ -65,8 +65,9 @@
       *worker_thread->GetParentExecutionContextTaskRunners()->Get(
           TaskType::kInternalTest),
       FROM_HERE, CrossThreadBind(&test::ExitRunLoop));
-  WorkerThread::ScopedDebuggerTask debugger_task(worker_thread);
+  worker_thread->DebuggerTaskStarted();
   waitable_event->Wait();
+  worker_thread->DebuggerTaskFinished();
 }
 
 void TerminateParentOfNestedWorker(WorkerThread* parent_thread,
@@ -400,8 +401,7 @@
   // on initialization to run debugger tasks.
   worker_thread_->Start(std::move(global_scope_creation_params),
                         WorkerBackingThreadStartupData::CreateDefault(),
-                        WorkerInspectorProxy::PauseOnWorkerStart::kPause,
-                        ParentExecutionContextTaskRunners::Create());
+                        nullptr, ParentExecutionContextTaskRunners::Create());
 
   // Used to wait for worker thread termination in a debugger task on the
   // worker thread.
diff --git a/third_party/blink/renderer/core/workers/worker_thread_test_helper.h b/third_party/blink/renderer/core/workers/worker_thread_test_helper.h
index b7a8348..041e38ea 100644
--- a/third_party/blink/renderer/core/workers/worker_thread_test_helper.h
+++ b/third_party/blink/renderer/core/workers/worker_thread_test_helper.h
@@ -101,8 +101,7 @@
         kV8CacheOptionsDefault, nullptr /* worklet_module_responses_map */);
 
     Start(std::move(creation_params),
-          WorkerBackingThreadStartupData::CreateDefault(),
-          WorkerInspectorProxy::PauseOnWorkerStart::kDontPause,
+          WorkerBackingThreadStartupData::CreateDefault(), nullptr,
           parent_execution_context_task_runners);
     EvaluateClassicScript(script_url, kOpaqueResource, source,
                           nullptr /* cached_meta_data */,
diff --git a/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc b/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc
index 2daf073..b747a7b 100644
--- a/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc
+++ b/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc
@@ -79,7 +79,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 // FIXME: HTMLConstructionSite has a limit of 512, should these match?
 static const unsigned kMaxXMLTreeDepth = 5000;
@@ -452,8 +452,8 @@
   // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-xhtml-syntax.html#xml-fragment-parsing-algorithm
   // For now we have a hack for script/style innerHTML support:
   if (context_element &&
-      (context_element->HasLocalName(scriptTag.LocalName()) ||
-       context_element->HasLocalName(styleTag.LocalName()))) {
+      (context_element->HasLocalName(kScriptTag.LocalName()) ||
+       context_element->HasLocalName(kStyleTag.LocalName()))) {
     fragment->ParserAppendChild(fragment->GetDocument().createTextNode(chunk));
     return true;
   }
@@ -977,7 +977,7 @@
                           prefix_to_namespace_map_, exception_state);
   AtomicString is;
   for (const auto& attr : prefixed_attributes) {
-    if (attr.GetName() == isAttr) {
+    if (attr.GetName() == kIsAttr) {
       is = attr.Value();
       break;
     }
diff --git a/third_party/blink/renderer/core/xml/parser/xml_errors.cc b/third_party/blink/renderer/core/xml/parser/xml_errors.cc
index e9aee86..e444927 100644
--- a/third_party/blink/renderer/core/xml/parser/xml_errors.cc
+++ b/third_party/blink/renderer/core/xml/parser/xml_errors.cc
@@ -38,7 +38,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 const int kMaxErrors = 25;
 
@@ -103,26 +103,26 @@
 
   Vector<Attribute> report_attributes;
   report_attributes.push_back(Attribute(
-      styleAttr,
+      kStyleAttr,
       "display: block; white-space: pre; border: 2px solid #c77; padding: 0 "
       "1em 0 1em; margin: 1em; background-color: #fdd; color: black"));
   report_element->ParserSetAttributes(report_attributes);
 
-  Element* h3 = doc->CreateRawElement(h3Tag, flags);
+  Element* h3 = doc->CreateRawElement(kH3Tag, flags);
   report_element->ParserAppendChild(h3);
   h3->ParserAppendChild(
       doc->createTextNode("This page contains the following errors:"));
 
-  Element* fixed = doc->CreateRawElement(divTag, flags);
+  Element* fixed = doc->CreateRawElement(kDivTag, flags);
   Vector<Attribute> fixed_attributes;
   fixed_attributes.push_back(
-      Attribute(styleAttr, "font-family:monospace;font-size:12px"));
+      Attribute(kStyleAttr, "font-family:monospace;font-size:12px"));
   fixed->ParserSetAttributes(fixed_attributes);
   report_element->ParserAppendChild(fixed);
 
   fixed->ParserAppendChild(doc->createTextNode(error_messages));
 
-  h3 = doc->CreateRawElement(h3Tag, flags);
+  h3 = doc->CreateRawElement(kH3Tag, flags);
   report_element->ParserAppendChild(h3);
   h3->ParserAppendChild(doc->createTextNode(
       "Below is a rendering of the page up to the first error."));
@@ -139,22 +139,22 @@
   const CreateElementFlags flags = CreateElementFlags::ByParser();
   Element* document_element = document_->documentElement();
   if (!document_element) {
-    Element* root_element = document_->CreateRawElement(htmlTag, flags);
-    Element* body = document_->CreateRawElement(bodyTag, flags);
+    Element* root_element = document_->CreateRawElement(kHTMLTag, flags);
+    Element* body = document_->CreateRawElement(kBodyTag, flags);
     root_element->ParserAppendChild(body);
     document_->ParserAppendChild(root_element);
     document_element = body;
   } else if (document_element->namespaceURI() == svg_names::kNamespaceURI) {
-    Element* root_element = document_->CreateRawElement(htmlTag, flags);
-    Element* head = document_->CreateRawElement(headTag, flags);
-    Element* style = document_->CreateRawElement(styleTag, flags);
+    Element* root_element = document_->CreateRawElement(kHTMLTag, flags);
+    Element* head = document_->CreateRawElement(kHeadTag, flags);
+    Element* style = document_->CreateRawElement(kStyleTag, flags);
     head->ParserAppendChild(style);
     style->ParserAppendChild(
         document_->createTextNode("html, body { height: 100% } parsererror + "
                                   "svg { width: 100%; height: 100% }"));
     style->FinishParsingChildren();
     root_element->ParserAppendChild(head);
-    Element* body = document_->CreateRawElement(bodyTag, flags);
+    Element* body = document_->CreateRawElement(kBodyTag, flags);
     root_element->ParserAppendChild(body);
 
     document_->ParserRemoveChild(*document_element);
@@ -171,8 +171,8 @@
 
   if (DocumentXSLT::HasTransformSourceDocument(*document_)) {
     Vector<Attribute> attributes;
-    attributes.push_back(Attribute(styleAttr, "white-space: normal"));
-    Element* paragraph = document_->CreateRawElement(pTag, flags);
+    attributes.push_back(Attribute(kStyleAttr, "white-space: normal"));
+    Element* paragraph = document_->CreateRawElement(kPTag, flags);
     paragraph->ParserSetAttributes(attributes);
     paragraph->ParserAppendChild(document_->createTextNode(
         "This document was created as the result of an XSL transformation. The "
diff --git a/third_party/blink/renderer/devtools/front_end/devtools_compatibility.js b/third_party/blink/renderer/devtools/front_end/devtools_compatibility.js
index 4489c397..f7e69a15 100644
--- a/third_party/blink/renderer/devtools/front_end/devtools_compatibility.js
+++ b/third_party/blink/renderer/devtools/front_end/devtools_compatibility.js
@@ -1166,30 +1166,34 @@
   }
 
   function installBackwardsCompatibility() {
-    if (window.location.href.indexOf('/remote/') === -1)
+    const majorVersion = getRemoteMajorVersion();
+    if (!majorVersion)
       return;
 
-    // Support for legacy (<M65) frontends.
-    /** @type {(!function(number, number):Element|undefined)} */
-    ShadowRoot.prototype.__originalShadowRootElementFromPoint;
+    /** @type {!Array<string>} */
+    const styleRules = [];
 
-    if (!ShadowRoot.prototype.__originalShadowRootElementFromPoint) {
-      ShadowRoot.prototype.__originalShadowRootElementFromPoint = ShadowRoot.prototype.elementFromPoint;
-      /**
-       *  @param {number} x
-       *  @param {number} y
-       *  @return {Element}
-       */
-      ShadowRoot.prototype.elementFromPoint = function(x, y) {
-        const originalResult = ShadowRoot.prototype.__originalShadowRootElementFromPoint.apply(this, arguments);
-        if (this.host && originalResult === this.host)
-          return null;
-        return originalResult;
-      };
+    if (majorVersion <= 66) {
+      /** @type {(!function(number, number):Element|undefined)} */
+      ShadowRoot.prototype.__originalShadowRootElementFromPoint;
+
+      if (!ShadowRoot.prototype.__originalShadowRootElementFromPoint) {
+        ShadowRoot.prototype.__originalShadowRootElementFromPoint = ShadowRoot.prototype.elementFromPoint;
+        /**
+         *  @param {number} x
+         *  @param {number} y
+         *  @return {Element}
+         */
+        ShadowRoot.prototype.elementFromPoint = function(x, y) {
+          const originalResult = ShadowRoot.prototype.__originalShadowRootElementFromPoint.apply(this, arguments);
+          if (this.host && originalResult === this.host)
+            return null;
+          return originalResult;
+        };
+      }
     }
 
-    // Support for legacy (<M53) frontends.
-    if (!window.KeyboardEvent.prototype.hasOwnProperty('keyIdentifier')) {
+    if (majorVersion <= 53) {
       Object.defineProperty(window.KeyboardEvent.prototype, 'keyIdentifier', {
         /**
          * @return {string}
@@ -1201,63 +1205,108 @@
       });
     }
 
-    // Support for legacy (<M50) frontends.
-    installObjectObserve();
+    if (majorVersion <= 50)
+      installObjectObserve();
 
-    /**
-     * @param {string} property
-     * @return {!CSSValue|null}
-     * @this {CSSStyleDeclaration}
-     */
-    function getValue(property) {
-      // Note that |property| comes from another context, so we can't use === here.
-      // eslint-disable-next-line eqeqeq
-      if (property == 'padding-left') {
-        return /** @type {!CSSValue} */ ({
-          /**
-           * @return {number}
-           * @this {!{__paddingLeft: number}}
-           */
-          getFloatValue: function() {
-            return this.__paddingLeft;
-          },
-          __paddingLeft: parseFloat(this.paddingLeft)
-        });
+    if (majorVersion <= 45) {
+      /**
+       * @param {string} property
+       * @return {!CSSValue|null}
+       * @this {CSSStyleDeclaration}
+       */
+      function getValue(property) {
+        // Note that |property| comes from another context, so we can't use === here.
+        // eslint-disable-next-line eqeqeq
+        if (property == 'padding-left') {
+          return /** @type {!CSSValue} */ ({
+            /**
+             * @return {number}
+             * @this {!{__paddingLeft: number}}
+             */
+            getFloatValue: function() {
+              return this.__paddingLeft;
+            },
+            __paddingLeft: parseFloat(this.paddingLeft)
+          });
+        }
+        throw new Error('getPropertyCSSValue is undefined');
       }
-      throw new Error('getPropertyCSSValue is undefined');
+
+      window.CSSStyleDeclaration.prototype.getPropertyCSSValue = getValue;
+
+      function CSSPrimitiveValue() {
+      }
+      CSSPrimitiveValue.CSS_PX = 5;
+      window.CSSPrimitiveValue = CSSPrimitiveValue;
     }
 
-    // Support for legacy (<M41) frontends.
-    window.CSSStyleDeclaration.prototype.getPropertyCSSValue = getValue;
+    if (majorVersion <= 45)
+      styleRules.push('* { min-width: 0; min-height: 0; }');
 
-    function CSSPrimitiveValue() {
+    if (majorVersion <= 51) {
+      // Support for quirky border-image behavior (<M51), see:
+      // https://bugs.chromium.org/p/chromium/issues/detail?id=559258
+      styleRules.push('.cm-breakpoint .CodeMirror-linenumber { border-style: solid !important; }');
+      styleRules.push(
+          '.cm-breakpoint.cm-breakpoint-conditional .CodeMirror-linenumber { border-style: solid !important; }');
     }
-    CSSPrimitiveValue.CSS_PX = 5;
-    window.CSSPrimitiveValue = CSSPrimitiveValue;
 
-    // Support for legacy (<M44) frontends.
-    const styleElement = window.document.createElement('style');
-    styleElement.type = 'text/css';
-    styleElement.textContent = 'html /deep/ * { min-width: 0; min-height: 0; }';
+    if (majorVersion <= 50)
+      Event.prototype.deepPath = undefined;
 
-    // Support for quirky border-image behavior (<M51), see:
-    // https://bugs.chromium.org/p/chromium/issues/detail?id=559258
-    styleElement.textContent +=
-        '\nhtml /deep/ .cm-breakpoint .CodeMirror-linenumber { border-style: solid !important; }';
-    styleElement.textContent +=
-        '\nhtml /deep/ .cm-breakpoint.cm-breakpoint-conditional .CodeMirror-linenumber { border-style: solid !important; }';
-    window.document.head.appendChild(styleElement);
+    if (majorVersion <= 54) {
+      window.FileError = /** @type {!function (new: FileError) : ?} */ ({
+        NOT_FOUND_ERR: DOMException.NOT_FOUND_ERR,
+        ABORT_ERR: DOMException.ABORT_ERR,
+        INVALID_MODIFICATION_ERR: DOMException.INVALID_MODIFICATION_ERR,
+        NOT_READABLE_ERR: 0  // No matching DOMException, so code will be 0.
+      });
+    }
 
-    // Support for legacy (<M49) frontends.
-    Event.prototype.deepPath = undefined;
+    installExtraStyleRules(styleRules);
+  }
 
-    // Support for legacy (<53) frontends.
-    window.FileError = /** @type {!function (new: FileError) : ?} */ ({
-      NOT_FOUND_ERR: DOMException.NOT_FOUND_ERR,
-      ABORT_ERR: DOMException.ABORT_ERR,
-      INVALID_MODIFICATION_ERR: DOMException.INVALID_MODIFICATION_ERR,
-      NOT_READABLE_ERR: 0  // No matching DOMException, so code will be 0.
-    });
+  /**
+   * @return {?number}
+   */
+  function getRemoteMajorVersion() {
+    try {
+      const remoteVersion = new URLSearchParams(window.location.href).get('remoteVersion');
+      if (!remoteVersion)
+        return null;
+      const majorVersion = parseInt(remoteVersion.split('.')[0], 10);
+      return majorVersion;
+    } finally {
+      return null;
+    }
+  }
+
+  /**
+   * @param {!Array<string>} styleRules
+   */
+  function installExtraStyleRules(styleRules) {
+    if (!styleRules.length)
+      return;
+    const styleText = styleRules.join('\n');
+    document.head.appendChild(createStyleElement(styleText));
+
+    const origCreateShadowRoot = HTMLElement.prototype.createShadowRoot;
+    HTMLElement.prototype.createShadowRoot = function(...args) {
+      const shadowRoot = origCreateShadowRoot.call(this, ...args);
+      shadowRoot.appendChild(createStyleElement(styleText));
+      return shadowRoot;
+    };
+  }
+
+  /**
+   * @param {string} styleText
+   * @return {!Element}
+   */
+  function createStyleElement(styleText) {
+    const style = document.createElement('style');
+    style.type = 'text/css';
+    style.textContent = styleText;
+    return style;
   }
 
   function windowLoaded() {
diff --git a/third_party/blink/renderer/modules/accessibility/ax_image_map_link.cc b/third_party/blink/renderer/modules/accessibility/ax_image_map_link.cc
index 3a1dde7..e640889 100644
--- a/third_party/blink/renderer/modules/accessibility/ax_image_map_link.cc
+++ b/third_party/blink/renderer/modules/accessibility/ax_image_map_link.cc
@@ -37,8 +37,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 AXImageMapLink::AXImageMapLink(HTMLAreaElement* area,
                                AXObjectCacheImpl& ax_object_cache)
     : AXNodeObject(area, ax_object_cache) {}
diff --git a/third_party/blink/renderer/modules/accessibility/ax_inline_text_box.cc b/third_party/blink/renderer/modules/accessibility/ax_inline_text_box.cc
index 8074aec..2594c14 100644
--- a/third_party/blink/renderer/modules/accessibility/ax_inline_text_box.cc
+++ b/third_party/blink/renderer/modules/accessibility/ax_inline_text_box.cc
@@ -38,8 +38,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 AXInlineTextBox::AXInlineTextBox(
     scoped_refptr<AbstractInlineTextBox> inline_text_box,
     AXObjectCacheImpl& ax_object_cache)
diff --git a/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc b/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc
index 5f72d37..e3ff1ea 100644
--- a/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc
+++ b/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc
@@ -110,7 +110,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 AXLayoutObject::AXLayoutObject(LayoutObject* layout_object,
                                AXObjectCacheImpl& ax_object_cache)
@@ -687,7 +687,7 @@
   // Header and footer tags may also be exposed as landmark roles but not
   // always.
   if (GetNode() &&
-      (GetNode()->HasTagName(headerTag) || GetNode()->HasTagName(footerTag)))
+      (GetNode()->HasTagName(kHeaderTag) || GetNode()->HasTagName(kFooterTag)))
     return false;
 
   // all controls are accessible
@@ -793,8 +793,8 @@
   // These checks are simplified in the interest of execution speed;
   // for example, any element having an alt attribute will make it
   // not ignored, rather than just images.
-  if (HasAriaAttribute(GetElement()) || !GetAttribute(altAttr).IsEmpty() ||
-      !GetAttribute(titleAttr).IsEmpty())
+  if (HasAriaAttribute(GetElement()) || !GetAttribute(kAltAttr).IsEmpty() ||
+      !GetAttribute(kTitleAttr).IsEmpty())
     return false;
 
   // <span> tags are inline tags and not meant to convey information if they
@@ -848,7 +848,7 @@
 
 bool AXLayoutObject::HasAriaCellRole(Element* elem) const {
   DCHECK(elem);
-  const AtomicString& aria_role_str = elem->FastGetAttribute(roleAttr);
+  const AtomicString& aria_role_str = elem->FastGetAttribute(kRoleAttr);
   if (aria_role_str.IsEmpty())
     return false;
 
@@ -966,7 +966,7 @@
     return g_null_atom;
   if (!node->IsElementNode())
     return g_null_atom;
-  return ToElement(node)->getAttribute(accesskeyAttr);
+  return ToElement(node)->getAttribute(kAccesskeyAttr);
 }
 
 RGBA32 AXLayoutObject::ComputeBackgroundColor() const {
@@ -1442,7 +1442,7 @@
     if (selected_index >= 0 &&
         static_cast<size_t>(selected_index) < list_items.size()) {
       const AtomicString& overridden_description =
-          list_items[selected_index]->FastGetAttribute(aria_labelAttr);
+          list_items[selected_index]->FastGetAttribute(kAriaLabelAttr);
       if (!overridden_description.IsNull())
         return overridden_description;
     }
@@ -1470,12 +1470,12 @@
   // buttons which will return their name.
   // https://html.spec.whatwg.org/multipage/forms.html#dom-input-value
   if (const auto* input = ToHTMLInputElementOrNull(GetNode())) {
-    if (input->type() != InputTypeNames::button &&
-        input->type() != InputTypeNames::checkbox &&
-        input->type() != InputTypeNames::image &&
-        input->type() != InputTypeNames::radio &&
-        input->type() != InputTypeNames::reset &&
-        input->type() != InputTypeNames::submit) {
+    if (input->type() != input_type_names::kButton &&
+        input->type() != input_type_names::kCheckbox &&
+        input->type() != input_type_names::kImage &&
+        input->type() != input_type_names::kRadio &&
+        input->type() != input_type_names::kReset &&
+        input->type() != input_type_names::kSubmit) {
       return input->value();
     }
   }
@@ -1602,24 +1602,24 @@
 // a future version of WAI-ARIA. After that we will re-implement them
 // following new spec.
 bool AXLayoutObject::SupportsARIADragging() const {
-  const AtomicString& grabbed = GetAttribute(aria_grabbedAttr);
+  const AtomicString& grabbed = GetAttribute(kAriaGrabbedAttr);
   return EqualIgnoringASCIICase(grabbed, "true") ||
          EqualIgnoringASCIICase(grabbed, "false");
 }
 
 bool AXLayoutObject::SupportsARIADropping() const {
-  const AtomicString& drop_effect = GetAttribute(aria_dropeffectAttr);
+  const AtomicString& drop_effect = GetAttribute(kAriaDropeffectAttr);
   return !drop_effect.IsEmpty();
 }
 
 bool AXLayoutObject::SupportsARIAFlowTo() const {
-  return !GetAttribute(aria_flowtoAttr).IsEmpty();
+  return !GetAttribute(kAriaFlowtoAttr).IsEmpty();
 }
 
 bool AXLayoutObject::SupportsARIAOwns() const {
   if (!layout_object_)
     return false;
-  const AtomicString& aria_owns = GetAttribute(aria_ownsAttr);
+  const AtomicString& aria_owns = GetAttribute(kAriaOwnsAttr);
 
   return !aria_owns.IsEmpty();
 }
@@ -1900,6 +1900,11 @@
     return AXObjectCache().GetOrCreate(table->TopSection());
   }
 
+  if (layout_object_->IsLayoutNGListMarker()) {
+    // We don't care tree structure of list marker.
+    return nullptr;
+  }
+
   LayoutObject* first_child = layout_object_->SlowFirstChild();
 
   // CSS first-letter pseudo element is handled as continuation. Returning it
@@ -2860,7 +2865,7 @@
       valid_cell_count++;
 
       // Any <th> tag -> treat as data table.
-      if (cell_node->HasTagName(thTag))
+      if (cell_node->HasTagName(kThTag))
         return true;
 
       // In this case, the developer explicitly assigned a "data" table
@@ -2869,7 +2874,7 @@
         HTMLTableCellElement& cell_element = ToHTMLTableCellElement(*cell_node);
         if (!cell_element.Headers().IsEmpty() ||
             !cell_element.Abbr().IsEmpty() || !cell_element.Axis().IsEmpty() ||
-            !cell_element.FastGetAttribute(scopeAttr).IsEmpty())
+            !cell_element.FastGetAttribute(kScopeAttr).IsEmpty())
           return true;
       }
 
@@ -3104,9 +3109,9 @@
     return ax::mojom::Role::kCell;
 
   if (Node* sibling_node = sibling_cell->GetNode()) {
-    if (sibling_node->HasTagName(thTag))
+    if (sibling_node->HasTagName(kThTag))
       return ax::mojom::Role::kColumnHeader;
-    if (sibling_node->HasTagName(tdTag))
+    if (sibling_node->HasTagName(kTdTag))
       return ax::mojom::Role::kRowHeader;
   }
 
@@ -3144,10 +3149,10 @@
   if (!parent->IsTableRowLikeRole())
     return ax::mojom::Role::kGenericContainer;
 
-  if (!GetNode() || !GetNode()->HasTagName(thTag))
+  if (!GetNode() || !GetNode()->HasTagName(kThTag))
     return ax::mojom::Role::kCell;
 
-  const AtomicString& scope = GetAttribute(scopeAttr);
+  const AtomicString& scope = GetAttribute(kScopeAttr);
   if (EqualIgnoringASCIICase(scope, "row") ||
       EqualIgnoringASCIICase(scope, "rowgroup"))
     return ax::mojom::Role::kRowHeader;
diff --git a/third_party/blink/renderer/modules/accessibility/ax_list.cc b/third_party/blink/renderer/modules/accessibility/ax_list.cc
index 98d0810..5e1f94106 100644
--- a/third_party/blink/renderer/modules/accessibility/ax_list.cc
+++ b/third_party/blink/renderer/modules/accessibility/ax_list.cc
@@ -34,7 +34,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 AXList::AXList(LayoutObject* layout_object, AXObjectCacheImpl& ax_object_cache)
     : AXLayoutObject(layout_object, ax_object_cache) {}
@@ -56,7 +56,7 @@
     return false;
 
   Node* node = layout_object_->GetNode();
-  return node && node->HasTagName(dlTag);
+  return node && node->HasTagName(kDlTag);
 }
 
 ax::mojom::Role AXList::RoleValue() const {
diff --git a/third_party/blink/renderer/modules/accessibility/ax_list_box.cc b/third_party/blink/renderer/modules/accessibility/ax_list_box.cc
index 083bad9..6a554cd 100644
--- a/third_party/blink/renderer/modules/accessibility/ax_list_box.cc
+++ b/third_party/blink/renderer/modules/accessibility/ax_list_box.cc
@@ -35,8 +35,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 AXListBox::AXListBox(LayoutObject* layout_object,
                      AXObjectCacheImpl& ax_object_cache)
     : AXLayoutObject(layout_object, ax_object_cache), active_index_(-1) {
diff --git a/third_party/blink/renderer/modules/accessibility/ax_list_box_option.cc b/third_party/blink/renderer/modules/accessibility/ax_list_box_option.cc
index de06a56..4abf08a 100644
--- a/third_party/blink/renderer/modules/accessibility/ax_list_box_option.cc
+++ b/third_party/blink/renderer/modules/accessibility/ax_list_box_option.cc
@@ -36,8 +36,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 AXListBoxOption::AXListBoxOption(LayoutObject* layout_object,
                                  AXObjectCacheImpl& ax_object_cache)
     : AXLayoutObject(layout_object, ax_object_cache) {}
diff --git a/third_party/blink/renderer/modules/accessibility/ax_media_controls.cc b/third_party/blink/renderer/modules/accessibility/ax_media_controls.cc
index 4bc852f..6315a081 100644
--- a/third_party/blink/renderer/modules/accessibility/ax_media_controls.cc
+++ b/third_party/blink/renderer/modules/accessibility/ax_media_controls.cc
@@ -38,7 +38,6 @@
 namespace blink {
 
 using blink::WebLocalizedString;
-using namespace HTMLNames;
 
 static inline String QueryString(WebLocalizedString::Name name) {
   return Locale::DefaultLocale().QueryString(name);
diff --git a/third_party/blink/renderer/modules/accessibility/ax_menu_list_option.cc b/third_party/blink/renderer/modules/accessibility/ax_menu_list_option.cc
index c8278af..482fed1 100644
--- a/third_party/blink/renderer/modules/accessibility/ax_menu_list_option.cc
+++ b/third_party/blink/renderer/modules/accessibility/ax_menu_list_option.cc
@@ -34,8 +34,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 AXMenuListOption::AXMenuListOption(HTMLOptionElement* element,
                                    AXObjectCacheImpl& ax_object_cache)
     : AXMockObject(ax_object_cache), element_(element) {}
diff --git a/third_party/blink/renderer/modules/accessibility/ax_menu_list_popup.cc b/third_party/blink/renderer/modules/accessibility/ax_menu_list_popup.cc
index a1bf9c8..3ee18b6 100644
--- a/third_party/blink/renderer/modules/accessibility/ax_menu_list_popup.cc
+++ b/third_party/blink/renderer/modules/accessibility/ax_menu_list_popup.cc
@@ -31,8 +31,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 AXMenuListPopup::AXMenuListPopup(AXObjectCacheImpl& ax_object_cache)
     : AXMockObject(ax_object_cache), active_index_(-1) {}
 
diff --git a/third_party/blink/renderer/modules/accessibility/ax_node_object.cc b/third_party/blink/renderer/modules/accessibility/ax_node_object.cc
index ad732b8..4a355852 100644
--- a/third_party/blink/renderer/modules/accessibility/ax_node_object.cc
+++ b/third_party/blink/renderer/modules/accessibility/ax_node_object.cc
@@ -80,7 +80,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 // In ARIA 1.1, default value of aria-level was changed to 2.
 const int kDefaultHeadingLevel = 2;
@@ -258,16 +258,16 @@
 static HashSet<QualifiedName>& GetLandmarkRolesNotAllowed() {
   DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, landmark_roles_not_allowed, ());
   if (landmark_roles_not_allowed.IsEmpty()) {
-    landmark_roles_not_allowed.insert(articleTag);
-    landmark_roles_not_allowed.insert(asideTag);
-    landmark_roles_not_allowed.insert(navTag);
-    landmark_roles_not_allowed.insert(sectionTag);
-    landmark_roles_not_allowed.insert(blockquoteTag);
-    landmark_roles_not_allowed.insert(detailsTag);
-    landmark_roles_not_allowed.insert(fieldsetTag);
-    landmark_roles_not_allowed.insert(figureTag);
-    landmark_roles_not_allowed.insert(tdTag);
-    landmark_roles_not_allowed.insert(mainTag);
+    landmark_roles_not_allowed.insert(kArticleTag);
+    landmark_roles_not_allowed.insert(kAsideTag);
+    landmark_roles_not_allowed.insert(kNavTag);
+    landmark_roles_not_allowed.insert(kSectionTag);
+    landmark_roles_not_allowed.insert(kBlockquoteTag);
+    landmark_roles_not_allowed.insert(kDetailsTag);
+    landmark_roles_not_allowed.insert(kFieldsetTag);
+    landmark_roles_not_allowed.insert(kFigureTag);
+    landmark_roles_not_allowed.insert(kTdTag);
+    landmark_roles_not_allowed.insert(kMainTag);
   }
   return landmark_roles_not_allowed;
 }
@@ -295,13 +295,13 @@
   if (!GetNode())
     return ax::mojom::Role::kUnknown;
 
-  // |HTMLAnchorElement| sets isLink only when it has hrefAttr.
+  // |HTMLAnchorElement| sets isLink only when it has kHrefAttr.
   if (GetNode()->IsLink())
     return ax::mojom::Role::kLink;
 
   if (IsHTMLAnchorElement(*GetNode())) {
     // We assume that an anchor element is LinkRole if it has event listners
-    // even though it doesn't have hrefAttr.
+    // even though it doesn't have kHrefAttr.
     if (IsClickable())
       return ax::mojom::Role::kLink;
     return ax::mojom::Role::kAnchor;
@@ -326,7 +326,7 @@
     const AtomicString& type = input->type();
     if (input->DataList())
       return ax::mojom::Role::kTextFieldWithComboBox;
-    if (type == InputTypeNames::button) {
+    if (type == input_type_names::kButton) {
       if ((GetNode()->parentNode() &&
            IsHTMLMenuElement(GetNode()->parentNode())) ||
           (ParentObject() &&
@@ -334,7 +334,7 @@
         return ax::mojom::Role::kMenuItem;
       return ButtonRoleType();
     }
-    if (type == InputTypeNames::checkbox) {
+    if (type == input_type_names::kCheckbox) {
       if ((GetNode()->parentNode() &&
            IsHTMLMenuElement(GetNode()->parentNode())) ||
           (ParentObject() &&
@@ -342,15 +342,15 @@
         return ax::mojom::Role::kMenuItemCheckBox;
       return ax::mojom::Role::kCheckBox;
     }
-    if (type == InputTypeNames::date)
+    if (type == input_type_names::kDate)
       return ax::mojom::Role::kDate;
-    if (type == InputTypeNames::datetime ||
-        type == InputTypeNames::datetime_local ||
-        type == InputTypeNames::month || type == InputTypeNames::week)
+    if (type == input_type_names::kDatetime ||
+        type == input_type_names::kDatetimeLocal ||
+        type == input_type_names::kMonth || type == input_type_names::kWeek)
       return ax::mojom::Role::kDateTime;
-    if (type == InputTypeNames::file)
+    if (type == input_type_names::kFile)
       return ax::mojom::Role::kButton;
-    if (type == InputTypeNames::radio) {
+    if (type == input_type_names::kRadio) {
       if ((GetNode()->parentNode() &&
            IsHTMLMenuElement(GetNode()->parentNode())) ||
           (ParentObject() &&
@@ -358,15 +358,15 @@
         return ax::mojom::Role::kMenuItemRadio;
       return ax::mojom::Role::kRadioButton;
     }
-    if (type == InputTypeNames::number)
+    if (type == input_type_names::kNumber)
       return ax::mojom::Role::kSpinButton;
     if (input->IsTextButton())
       return ButtonRoleType();
-    if (type == InputTypeNames::range)
+    if (type == input_type_names::kRange)
       return ax::mojom::Role::kSlider;
-    if (type == InputTypeNames::color)
+    if (type == input_type_names::kColor)
       return ax::mojom::Role::kColorWell;
-    if (type == InputTypeNames::time)
+    if (type == input_type_names::kTime)
       return ax::mojom::Role::kInputTime;
     return ax::mojom::Role::kTextField;
   }
@@ -421,53 +421,53 @@
   if (IsHTMLVideoElement(*GetNode()))
     return ax::mojom::Role::kVideo;
 
-  if (GetNode()->HasTagName(ddTag))
+  if (GetNode()->HasTagName(kDdTag))
     return ax::mojom::Role::kDescriptionListDetail;
 
-  if (GetNode()->HasTagName(dtTag))
+  if (GetNode()->HasTagName(kDtTag))
     return ax::mojom::Role::kDescriptionListTerm;
 
   if (GetNode()->nodeName() == "math")
     return ax::mojom::Role::kMath;
 
-  if (GetNode()->HasTagName(rpTag) || GetNode()->HasTagName(rtTag))
+  if (GetNode()->HasTagName(kRpTag) || GetNode()->HasTagName(kRtTag))
     return ax::mojom::Role::kAnnotation;
 
   if (IsHTMLFormElement(*GetNode()))
     return ax::mojom::Role::kForm;
 
-  if (GetNode()->HasTagName(abbrTag))
+  if (GetNode()->HasTagName(kAbbrTag))
     return ax::mojom::Role::kAbbr;
 
-  if (GetNode()->HasTagName(articleTag))
+  if (GetNode()->HasTagName(kArticleTag))
     return ax::mojom::Role::kArticle;
 
-  if (GetNode()->HasTagName(delTag))
+  if (GetNode()->HasTagName(kDelTag))
     return ax::mojom::Role::kContentDeletion;
 
-  if (GetNode()->HasTagName(insTag))
+  if (GetNode()->HasTagName(kInsTag))
     return ax::mojom::Role::kContentInsertion;
 
-  if (GetNode()->HasTagName(mainTag))
+  if (GetNode()->HasTagName(kMainTag))
     return ax::mojom::Role::kMain;
 
-  if (GetNode()->HasTagName(markTag))
+  if (GetNode()->HasTagName(kMarkTag))
     return ax::mojom::Role::kMark;
 
-  if (GetNode()->HasTagName(navTag))
+  if (GetNode()->HasTagName(kNavTag))
     return ax::mojom::Role::kNavigation;
 
-  if (GetNode()->HasTagName(asideTag))
+  if (GetNode()->HasTagName(kAsideTag))
     return ax::mojom::Role::kComplementary;
 
-  if (GetNode()->HasTagName(preTag))
+  if (GetNode()->HasTagName(kPreTag))
     return ax::mojom::Role::kPre;
 
-  if (GetNode()->HasTagName(sectionTag))
+  if (GetNode()->HasTagName(kSectionTag))
     return ax::mojom::Role::kRegion;
 
   // TODO(accessibility): http://crbug.com/873118
-  if (GetNode()->HasTagName(addressTag))
+  if (GetNode()->HasTagName(kAddressTag))
     return ax::mojom::Role::kContentInfo;
 
   if (IsHTMLDialogElement(*GetNode()))
@@ -490,28 +490,28 @@
   // There should only be one banner/contentInfo per page. If header/footer are
   // being used within an article or section then it should not be exposed as
   // whole page's banner/contentInfo but as a generic container role.
-  if (GetNode()->HasTagName(headerTag)) {
+  if (GetNode()->HasTagName(kHeaderTag)) {
     if (IsDescendantOfElementType(GetLandmarkRolesNotAllowed()))
       return ax::mojom::Role::kGenericContainer;
     return ax::mojom::Role::kBanner;
   }
 
-  if (GetNode()->HasTagName(footerTag)) {
+  if (GetNode()->HasTagName(kFooterTag)) {
     if (IsDescendantOfElementType(GetLandmarkRolesNotAllowed()))
       return ax::mojom::Role::kGenericContainer;
     return ax::mojom::Role::kFooter;
   }
 
-  if (GetNode()->HasTagName(blockquoteTag))
+  if (GetNode()->HasTagName(kBlockquoteTag))
     return ax::mojom::Role::kBlockquote;
 
-  if (GetNode()->HasTagName(captionTag))
+  if (GetNode()->HasTagName(kCaptionTag))
     return ax::mojom::Role::kCaption;
 
-  if (GetNode()->HasTagName(figcaptionTag))
+  if (GetNode()->HasTagName(kFigcaptionTag))
     return ax::mojom::Role::kFigcaption;
 
-  if (GetNode()->HasTagName(figureTag))
+  if (GetNode()->HasTagName(kFigureTag))
     return ax::mojom::Role::kFigure;
 
   if (GetNode()->nodeName() == "TIME")
@@ -602,7 +602,7 @@
 // also return true if an ancestor is editable.
 bool AXNodeObject::HasContentEditableAttributeSet() const {
   const AtomicString& content_editable_value =
-      GetAttribute(contenteditableAttr);
+      GetAttribute(kContenteditableAttr);
   if (content_editable_value.IsNull())
     return false;
   // Both "true" (case-insensitive) and the empty string count as true.
@@ -786,7 +786,7 @@
 bool AXNodeObject::IsInputImage() const {
   Node* node = this->GetNode();
   if (RoleValue() == ax::mojom::Role::kButton && IsHTMLInputElement(node))
-    return ToHTMLInputElement(*node).type() == InputTypeNames::image;
+    return ToHTMLInputElement(*node).type() == input_type_names::kImage;
 
   return false;
 }
@@ -854,8 +854,8 @@
 
 bool AXNodeObject::IsNativeCheckboxOrRadio() const {
   if (const auto* input = ToHTMLInputElementOrNull(GetNode())) {
-    return input->type() == InputTypeNames::checkbox ||
-           input->type() == InputTypeNames::radio;
+    return input->type() == input_type_names::kCheckbox ||
+           input->type() == input_type_names::kRadio;
   }
   return false;
 }
@@ -872,7 +872,7 @@
     return true;
 
   if (const auto* input = ToHTMLInputElementOrNull(*node))
-    return input->type() == InputTypeNames::image;
+    return input->type() == input_type_names::kImage;
 
   return false;
 }
@@ -914,7 +914,7 @@
       aria_role != ax::mojom::Role::kUnknown)
     return false;
 
-  return ToHTMLInputElement(node)->type() == InputTypeNames::password;
+  return ToHTMLInputElement(node)->type() == input_type_names::kPassword;
 }
 
 bool AXNodeObject::IsProgressIndicator() const {
@@ -935,13 +935,13 @@
 
 bool AXNodeObject::IsNativeSlider() const {
   if (const auto* input = ToHTMLInputElementOrNull(GetNode()))
-    return input->type() == InputTypeNames::range;
+    return input->type() == input_type_names::kRange;
   return false;
 }
 
 bool AXNodeObject::IsNativeSpinButton() const {
   if (const auto* input = ToHTMLInputElementOrNull(GetNode()))
-    return input->type() == InputTypeNames::number;
+    return input->type() == input_type_names::kNumber;
   return false;
 }
 
@@ -1037,7 +1037,7 @@
   if (GetNode() && IsHTMLSummaryElement(*GetNode())) {
     if (GetNode()->parentNode() &&
         IsHTMLDetailsElement(GetNode()->parentNode()))
-      return ToElement(GetNode()->parentNode())->hasAttribute(openAttr)
+      return ToElement(GetNode()->parentNode())->hasAttribute(kOpenAttr)
                  ? kExpandedExpanded
                  : kExpandedCollapsed;
   }
@@ -1068,7 +1068,7 @@
 bool AXNodeObject::IsRequired() const {
   Node* n = this->GetNode();
   if (n && (n->IsElementNode() && ToElement(n)->IsFormControlElement()) &&
-      HasAttribute(requiredAttr))
+      HasAttribute(kRequiredAttr))
     return ToHTMLFormControlElement(n)->IsRequired();
 
   if (AOMPropertyOrARIAAttributeIsTrue(AOMBooleanProperty::kRequired))
@@ -1102,22 +1102,22 @@
     return 0;
 
   HTMLElement& element = ToHTMLElement(*node);
-  if (element.HasTagName(h1Tag))
+  if (element.HasTagName(kH1Tag))
     return 1;
 
-  if (element.HasTagName(h2Tag))
+  if (element.HasTagName(kH2Tag))
     return 2;
 
-  if (element.HasTagName(h3Tag))
+  if (element.HasTagName(kH3Tag))
     return 3;
 
-  if (element.HasTagName(h4Tag))
+  if (element.HasTagName(kH4Tag))
     return 4;
 
-  if (element.HasTagName(h5Tag))
+  if (element.HasTagName(kH5Tag))
     return 5;
 
-  if (element.HasTagName(h6Tag))
+  if (element.HasTagName(kH6Tag))
     return 6;
 
   if (RoleValue() == ax::mojom::Role::kHeading)
@@ -1320,7 +1320,7 @@
 HeapVector<Member<HTMLInputElement>>
 AXNodeObject::FindAllRadioButtonsWithSameName(HTMLInputElement* radio_button) {
   HeapVector<Member<HTMLInputElement>> all_radio_buttons;
-  if (!radio_button || radio_button->type() != InputTypeNames::radio)
+  if (!radio_button || radio_button->type() != input_type_names::kRadio)
     return all_radio_buttons;
 
   constexpr bool kTraverseForward = true;
@@ -1366,7 +1366,7 @@
     return AXObject::ColorValue();
 
   HTMLInputElement* input = ToHTMLInputElement(GetNode());
-  const AtomicString& type = input->getAttribute(typeAttr);
+  const AtomicString& type = input->getAttribute(kTypeAttr);
   if (!EqualIgnoringASCIICase(type, "color"))
     return AXObject::ColorValue();
 
@@ -1692,7 +1692,7 @@
     if (selected_index >= 0 &&
         static_cast<wtf_size_t>(selected_index) < list_items.size()) {
       const AtomicString& overridden_description =
-          list_items[selected_index]->FastGetAttribute(aria_labelAttr);
+          list_items[selected_index]->FastGetAttribute(kAriaLabelAttr);
       if (!overridden_description.IsNull())
         return overridden_description;
     }
@@ -1710,12 +1710,12 @@
   // buttons which will return their name.
   // https://html.spec.whatwg.org/multipage/forms.html#dom-input-value
   if (const auto* input = ToHTMLInputElementOrNull(node)) {
-    if (input->type() != InputTypeNames::button &&
-        input->type() != InputTypeNames::checkbox &&
-        input->type() != InputTypeNames::image &&
-        input->type() != InputTypeNames::radio &&
-        input->type() != InputTypeNames::reset &&
-        input->type() != InputTypeNames::submit) {
+    if (input->type() != input_type_names::kButton &&
+        input->type() != input_type_names::kCheckbox &&
+        input->type() != input_type_names::kImage &&
+        input->type() != input_type_names::kRadio &&
+        input->type() != input_type_names::kReset &&
+        input->type() != input_type_names::kSubmit) {
       return input->value();
     }
   }
@@ -1871,10 +1871,10 @@
   // Step 2H from: http://www.w3.org/TR/accname-aam-1.1
   name_from = ax::mojom::NameFrom::kTitle;
   if (name_sources) {
-    name_sources->push_back(NameSource(found_text_alternative, titleAttr));
+    name_sources->push_back(NameSource(found_text_alternative, kTitleAttr));
     name_sources->back().type = name_from;
   }
-  const AtomicString& title = GetAttribute(titleAttr);
+  const AtomicString& title = GetAttribute(kTitleAttr);
   if (!title.IsEmpty()) {
     text_alternative = title;
     name_from = ax::mojom::NameFrom::kTitle;
@@ -2453,7 +2453,7 @@
   // using AOM. To be extra safe, exclude objects that are clickable themselves.
   // This won't prevent anyone from having a click handler on the object's
   // container.
-  if (!IsClickable() && element->FastHasAttribute(idAttr) &&
+  if (!IsClickable() && element->FastHasAttribute(kIdAttr) &&
       CanBeActiveDescendant()) {
     return OnNativeClickAction();
   }
@@ -2648,11 +2648,11 @@
     return;
   }
 
-  if (!HasAttribute(aria_ownsAttr))
+  if (!HasAttribute(kAriaOwnsAttr))
     return;
 
   // Case 3: aria-owns attribute
-  TokenVectorFromAttribute(id_vector, aria_ownsAttr);
+  TokenVectorFromAttribute(id_vector, kAriaOwnsAttr);
   AXObjectCache().UpdateAriaOwns(this, id_vector, owned_children);
 }
 
@@ -2698,8 +2698,8 @@
            ++label_index) {
         Element* label = labels->item(label_index);
         if (name_sources) {
-          if (!label->getAttribute(forAttr).IsEmpty() &&
-              label->getAttribute(forAttr) == html_element->GetIdAttribute()) {
+          if (!label->getAttribute(kForAttr).IsEmpty() &&
+              label->getAttribute(kForAttr) == html_element->GetIdAttribute()) {
             name_sources->back().native_source = kAXTextFromNativeHTMLLabelFor;
           } else {
             name_sources->back().native_source =
@@ -2731,7 +2731,7 @@
     // value attribue
     name_from = ax::mojom::NameFrom::kValue;
     if (name_sources) {
-      name_sources->push_back(NameSource(*found_text_alternative, valueAttr));
+      name_sources->push_back(NameSource(*found_text_alternative, kValueAttr));
       name_sources->back().type = name_from;
     }
     String value = input_element->value();
@@ -2772,14 +2772,14 @@
 
   // 5.3 input type="image"
   if (input_element &&
-      input_element->getAttribute(typeAttr) == InputTypeNames::image) {
+      input_element->getAttribute(kTypeAttr) == input_type_names::kImage) {
     // alt attr
-    const AtomicString& alt = input_element->getAttribute(altAttr);
+    const AtomicString& alt = input_element->getAttribute(kAltAttr);
     const bool is_empty = alt.IsEmpty() && !alt.IsNull();
     name_from = is_empty ? ax::mojom::NameFrom::kAttributeExplicitlyEmpty
                          : ax::mojom::NameFrom::kAttribute;
     if (name_sources) {
-      name_sources->push_back(NameSource(*found_text_alternative, altAttr));
+      name_sources->push_back(NameSource(*found_text_alternative, kAltAttr));
       name_sources->back().type = name_from;
     }
     if (!alt.IsNull()) {
@@ -2796,7 +2796,7 @@
 
     // value attr
     if (name_sources) {
-      name_sources->push_back(NameSource(*found_text_alternative, valueAttr));
+      name_sources->push_back(NameSource(*found_text_alternative, kValueAttr));
       name_sources->back().type = name_from;
     }
     name_from = ax::mojom::NameFrom::kAttribute;
@@ -2814,11 +2814,11 @@
 
     // title attr
     if (name_sources) {
-      name_sources->push_back(NameSource(*found_text_alternative, titleAttr));
+      name_sources->push_back(NameSource(*found_text_alternative, kTitleAttr));
       name_sources->back().type = name_from;
     }
     name_from = ax::mojom::NameFrom::kTitle;
-    const AtomicString& title = input_element->getAttribute(titleAttr);
+    const AtomicString& title = input_element->getAttribute(kTitleAttr);
     if (!title.IsNull()) {
       text_alternative = title;
       if (name_sources) {
@@ -2836,9 +2836,9 @@
     text_alternative = input_element->GetLocale().QueryString(
         WebLocalizedString::kSubmitButtonDefaultLabel);
     if (name_sources) {
-      name_sources->push_back(NameSource(*found_text_alternative, typeAttr));
+      name_sources->push_back(NameSource(*found_text_alternative, kTypeAttr));
       NameSource& source = name_sources->back();
-      source.attribute_value = input_element->getAttribute(typeAttr);
+      source.attribute_value = input_element->getAttribute(kTypeAttr);
       source.type = name_from;
       source.text = text_alternative;
       *found_text_alternative = true;
@@ -2853,7 +2853,7 @@
     name_from = ax::mojom::NameFrom::kPlaceholder;
     if (name_sources) {
       name_sources->push_back(
-          NameSource(*found_text_alternative, placeholderAttr));
+          NameSource(*found_text_alternative, kPlaceholderAttr));
       NameSource& source = name_sources->back();
       source.type = name_from;
     }
@@ -2864,7 +2864,7 @@
         NameSource& source = name_sources->back();
         source.text = text_alternative;
         source.attribute_value =
-            html_element->FastGetAttribute(placeholderAttr);
+            html_element->FastGetAttribute(kPlaceholderAttr);
         *found_text_alternative = true;
       } else {
         return text_alternative;
@@ -2877,7 +2877,7 @@
     name_from = ax::mojom::NameFrom::kPlaceholder;
     if (name_sources) {
       name_sources->push_back(
-          NameSource(*found_text_alternative, aria_placeholderAttr));
+          NameSource(*found_text_alternative, kAriaPlaceholderAttr));
       NameSource& source = name_sources->back();
       source.type = name_from;
     }
@@ -2899,7 +2899,7 @@
   }
 
   // 5.7 figure and figcaption Elements
-  if (GetNode()->HasTagName(figureTag)) {
+  if (GetNode()->HasTagName(kFigureTag)) {
     // figcaption
     name_from = ax::mojom::NameFrom::kRelatedElement;
     if (name_sources) {
@@ -2909,7 +2909,7 @@
     }
     Element* figcaption = nullptr;
     for (Element& element : ElementTraversal::DescendantsOf(*(GetNode()))) {
-      if (element.HasTagName(figcaptionTag)) {
+      if (element.HasTagName(kFigcaptionTag)) {
         figcaption = &element;
         break;
       }
@@ -2944,12 +2944,12 @@
   if (IsHTMLImageElement(GetNode()) || IsHTMLAreaElement(GetNode()) ||
       (GetLayoutObject() && GetLayoutObject()->IsSVGImage())) {
     // alt
-    const AtomicString& alt = GetAttribute(altAttr);
+    const AtomicString& alt = GetAttribute(kAltAttr);
     const bool is_empty = alt.IsEmpty() && !alt.IsNull();
     name_from = is_empty ? ax::mojom::NameFrom::kAttributeExplicitlyEmpty
                          : ax::mojom::NameFrom::kAttribute;
     if (name_sources) {
-      name_sources->push_back(NameSource(*found_text_alternative, altAttr));
+      name_sources->push_back(NameSource(*found_text_alternative, kAltAttr));
       name_sources->back().type = name_from;
     }
     if (!alt.IsNull()) {
@@ -3002,10 +3002,11 @@
     // summary
     name_from = ax::mojom::NameFrom::kAttribute;
     if (name_sources) {
-      name_sources->push_back(NameSource(*found_text_alternative, summaryAttr));
+      name_sources->push_back(
+          NameSource(*found_text_alternative, kSummaryAttr));
       name_sources->back().type = name_from;
     }
-    const AtomicString& summary = GetAttribute(summaryAttr);
+    const AtomicString& summary = GetAttribute(kSummaryAttr);
     if (!summary.IsNull()) {
       text_alternative = summary;
       if (name_sources) {
@@ -3098,7 +3099,7 @@
       name_from = ax::mojom::NameFrom::kAttribute;
       if (name_sources) {
         name_sources->push_back(
-            NameSource(found_text_alternative, aria_labelAttr));
+            NameSource(found_text_alternative, kAriaLabelAttr));
         name_sources->back().type = name_from;
       }
       if (Element* document_element = document->documentElement()) {
@@ -3205,7 +3206,7 @@
   description_from = ax::mojom::DescriptionFrom::kRelatedElement;
   if (description_sources) {
     description_sources->push_back(
-        DescriptionSource(found_description, aria_describedbyAttr));
+        DescriptionSource(found_description, kAriaDescribedbyAttr));
     description_sources->back().type = description_from;
   }
 
@@ -3233,7 +3234,7 @@
 
   // aria-describedby overrides any other accessible description, from:
   // http://rawgit.com/w3c/aria/master/html-aam/html-aam.html
-  const AtomicString& aria_describedby = GetAttribute(aria_describedbyAttr);
+  const AtomicString& aria_describedby = GetAttribute(kAriaDescribedbyAttr);
   if (!aria_describedby.IsNull()) {
     if (description_sources)
       description_sources->back().attribute_value = aria_describedby;
@@ -3265,7 +3266,7 @@
     description_from = ax::mojom::DescriptionFrom::kAttribute;
     if (description_sources) {
       description_sources->push_back(
-          DescriptionSource(found_description, valueAttr));
+          DescriptionSource(found_description, kValueAttr));
       description_sources->back().type = description_from;
     }
     String value = input_element->value();
@@ -3346,10 +3347,10 @@
     description_from = ax::mojom::DescriptionFrom::kAttribute;
     if (description_sources) {
       description_sources->push_back(
-          DescriptionSource(found_description, titleAttr));
+          DescriptionSource(found_description, kTitleAttr));
       description_sources->back().type = description_from;
     }
-    const AtomicString& title = GetAttribute(titleAttr);
+    const AtomicString& title = GetAttribute(kTitleAttr);
     if (!title.IsEmpty()) {
       description = title;
       if (description_sources) {
@@ -3367,10 +3368,10 @@
   description_from = ax::mojom::DescriptionFrom::kAttribute;
   if (description_sources) {
     description_sources->push_back(
-        DescriptionSource(found_description, aria_helpAttr));
+        DescriptionSource(found_description, kAriaHelpAttr));
     description_sources->back().type = description_from;
   }
-  const AtomicString& help = GetAttribute(aria_helpAttr);
+  const AtomicString& help = GetAttribute(kAriaHelpAttr);
   if (!help.IsEmpty()) {
     description = help;
     if (description_sources) {
diff --git a/third_party/blink/renderer/modules/accessibility/ax_object.cc b/third_party/blink/renderer/modules/accessibility/ax_object.cc
index 25aaa69..fabe7751 100644
--- a/third_party/blink/renderer/modules/accessibility/ax_object.cc
+++ b/third_party/blink/renderer/modules/accessibility/ax_object.cc
@@ -68,7 +68,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 namespace {
 
@@ -756,7 +756,7 @@
 
   const HTMLInputElement* input = ToHTMLInputElement(node);
   const auto inputType = input->type();
-  if (inputType != InputTypeNames::checkbox)
+  if (inputType != input_type_names::kCheckbox)
     return false;
   return input->ShouldAppearIndeterminate();
 }
@@ -1039,7 +1039,7 @@
                          ? ToElement(node)
                          : FlatTreeTraversal::ParentElement(*node);
   while (element) {
-    if (element->hasAttribute(inertAttr))
+    if (element->hasAttribute(kInertAttr))
       return AXObjectCache().GetOrCreate(element);
     element = FlatTreeTraversal::ParentElement(*element);
   }
@@ -1197,7 +1197,7 @@
     return true;
 
   // aria-activedescendant focus
-  return elem->FastHasAttribute(idAttr) && CanBeActiveDescendant();
+  return elem->FastHasAttribute(kIdAttr) && CanBeActiveDescendant();
 }
 
 bool AXObject::CanSetValueAttribute() const {
@@ -1516,7 +1516,7 @@
     if (HasAOMProperty(AOMRelationListProperty::kLabeledBy, elements)) {
       if (name_sources) {
         name_sources->push_back(
-            NameSource(*found_text_alternative, aria_labelledbyAttr));
+            NameSource(*found_text_alternative, kAriaLabelledbyAttr));
         name_sources->back().type = name_from;
       }
 
@@ -1543,9 +1543,9 @@
     } else {
       // Now check ARIA attribute
       const QualifiedName& attr =
-          HasAttribute(aria_labeledbyAttr) && !HasAttribute(aria_labelledbyAttr)
-              ? aria_labeledbyAttr
-              : aria_labelledbyAttr;
+          HasAttribute(kAriaLabeledbyAttr) && !HasAttribute(kAriaLabelledbyAttr)
+              ? kAriaLabeledbyAttr
+              : kAriaLabelledbyAttr;
 
       if (name_sources) {
         name_sources->push_back(NameSource(*found_text_alternative, attr));
@@ -1589,7 +1589,7 @@
   name_from = ax::mojom::NameFrom::kAttribute;
   if (name_sources) {
     name_sources->push_back(
-        NameSource(*found_text_alternative, aria_labelAttr));
+        NameSource(*found_text_alternative, kAriaLabelAttr));
     name_sources->back().type = name_from;
   }
   const AtomicString& aria_label =
@@ -1675,9 +1675,9 @@
     HeapVector<Member<Element>>& elements,
     Vector<String>& ids) const {
   // Try both spellings, but prefer aria-labelledby, which is the official spec.
-  ElementsFromAttribute(elements, aria_labelledbyAttr, ids);
+  ElementsFromAttribute(elements, kAriaLabelledbyAttr, ids);
   if (!ids.size())
-    ElementsFromAttribute(elements, aria_labeledbyAttr, ids);
+    ElementsFromAttribute(elements, kAriaLabeledbyAttr, ids);
 }
 
 String AXObject::TextFromAriaLabelledby(AXObjectSet& visited,
@@ -1692,7 +1692,7 @@
                                          Vector<String>& ids) const {
   AXObjectSet visited;
   HeapVector<Member<Element>> elements;
-  ElementsFromAttribute(elements, aria_describedbyAttr, ids);
+  ElementsFromAttribute(elements, kAriaDescribedbyAttr, ids);
   return TextFromElements(true, visited, elements, related_objects);
 }
 
@@ -2338,7 +2338,7 @@
   // 2. The list of languages the browser sends in the [Accept-Language] header.
   // 3. The browser's default language.
 
-  const AtomicString& lang = GetAttribute(langAttr);
+  const AtomicString& lang = GetAttribute(kLangAttr);
   if (!lang.IsEmpty())
     return lang;
 
diff --git a/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc b/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc
index fe62106..33da5a3 100644
--- a/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc
+++ b/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc
@@ -86,7 +86,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 // static
 AXObjectCache* AXObjectCacheImpl::Create(Document& document) {
@@ -295,7 +295,7 @@
     return false;
 
   // TODO(accessibility) support role strings with multiple roles.
-  return EqualIgnoringASCIICase(ToElement(node)->getAttribute(roleAttr), role);
+  return EqualIgnoringASCIICase(ToElement(node)->getAttribute(kRoleAttr), role);
 }
 
 AXObject* AXObjectCacheImpl::CreateFromRenderer(LayoutObject* layout_object) {
@@ -318,7 +318,7 @@
     return AXListBoxOption::Create(layout_object, *this);
 
   if (IsHTMLInputElement(node) &&
-      ToHTMLInputElement(node)->type() == InputTypeNames::radio)
+      ToHTMLInputElement(node)->type() == input_type_names::kRadio)
     return AXRadioInput::Create(layout_object, *this);
 
   if (layout_object->IsSVGRoot())
@@ -1007,40 +1007,40 @@
 
 void AXObjectCacheImpl::HandleAttributeChanged(const QualifiedName& attr_name,
                                                Element* element) {
-  if (attr_name == roleAttr || attr_name == typeAttr || attr_name == sizeAttr ||
-      attr_name == aria_haspopupAttr)
+  if (attr_name == kRoleAttr || attr_name == kTypeAttr ||
+      attr_name == kSizeAttr || attr_name == kAriaHaspopupAttr)
     HandlePossibleRoleChange(element);
-  else if (attr_name == altAttr || attr_name == titleAttr)
+  else if (attr_name == kAltAttr || attr_name == kTitleAttr)
     TextChanged(element);
-  else if (attr_name == forAttr && IsHTMLLabelElement(*element))
+  else if (attr_name == kForAttr && IsHTMLLabelElement(*element))
     LabelChanged(element);
-  else if (attr_name == idAttr)
+  else if (attr_name == kIdAttr)
     MaybeNewRelationTarget(element, Get(element));
 
   if (!attr_name.LocalName().StartsWith("aria-"))
     return;
 
   // Perform updates specific to each attribute.
-  if (attr_name == aria_activedescendantAttr)
+  if (attr_name == kAriaActivedescendantAttr)
     HandleActiveDescendantChanged(element);
-  else if (attr_name == aria_valuenowAttr || attr_name == aria_valuetextAttr)
+  else if (attr_name == kAriaValuenowAttr || attr_name == kAriaValuetextAttr)
     PostNotification(element, ax::mojom::Event::kValueChanged);
-  else if (attr_name == aria_labelAttr || attr_name == aria_labeledbyAttr ||
-           attr_name == aria_labelledbyAttr)
+  else if (attr_name == kAriaLabelAttr || attr_name == kAriaLabeledbyAttr ||
+           attr_name == kAriaLabelledbyAttr)
     TextChanged(element);
-  else if (attr_name == aria_describedbyAttr)
+  else if (attr_name == kAriaDescribedbyAttr)
     TextChanged(element);  // TODO do we need a DescriptionChanged() ?
-  else if (attr_name == aria_checkedAttr || attr_name == aria_pressedAttr)
+  else if (attr_name == kAriaCheckedAttr || attr_name == kAriaPressedAttr)
     CheckedStateChanged(element);
-  else if (attr_name == aria_selectedAttr)
+  else if (attr_name == kAriaSelectedAttr)
     HandleAriaSelectedChanged(element);
-  else if (attr_name == aria_expandedAttr)
+  else if (attr_name == kAriaExpandedAttr)
     HandleAriaExpandedChange(element);
-  else if (attr_name == aria_hiddenAttr)
+  else if (attr_name == kAriaHiddenAttr)
     ChildrenChanged(element->parentNode());
-  else if (attr_name == aria_invalidAttr)
+  else if (attr_name == kAriaInvalidAttr)
     PostNotification(element, ax::mojom::Event::kInvalidStatusChanged);
-  else if (attr_name == aria_ownsAttr)
+  else if (attr_name == kAriaOwnsAttr)
     ChildrenChanged(element);
   else
     PostNotification(element, ax::mojom::Event::kAriaAttributeChanged);
diff --git a/third_party/blink/renderer/modules/accessibility/ax_progress_indicator.cc b/third_party/blink/renderer/modules/accessibility/ax_progress_indicator.cc
index 3e8c770..dd95fc0 100644
--- a/third_party/blink/renderer/modules/accessibility/ax_progress_indicator.cc
+++ b/third_party/blink/renderer/modules/accessibility/ax_progress_indicator.cc
@@ -28,8 +28,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 AXProgressIndicator::AXProgressIndicator(LayoutProgress* layout_object,
                                          AXObjectCacheImpl& ax_object_cache)
     : AXLayoutObject(layout_object, ax_object_cache) {}
diff --git a/third_party/blink/renderer/modules/accessibility/ax_radio_input.cc b/third_party/blink/renderer/modules/accessibility/ax_radio_input.cc
index dd1c41a..6da5486 100644
--- a/third_party/blink/renderer/modules/accessibility/ax_radio_input.cc
+++ b/third_party/blink/renderer/modules/accessibility/ax_radio_input.cc
@@ -13,8 +13,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 AXRadioInput::AXRadioInput(LayoutObject* layout_object,
                            AXObjectCacheImpl& ax_object_cache)
     : AXLayoutObject(layout_object, ax_object_cache) {
diff --git a/third_party/blink/renderer/modules/accessibility/ax_slider.cc b/third_party/blink/renderer/modules/accessibility/ax_slider.cc
index aa00ce8..d86d1c83 100644
--- a/third_party/blink/renderer/modules/accessibility/ax_slider.cc
+++ b/third_party/blink/renderer/modules/accessibility/ax_slider.cc
@@ -36,8 +36,6 @@
 
 namespace blink {
 
-using namespace HTMLNames;
-
 AXSlider::AXSlider(LayoutObject* layout_object,
                    AXObjectCacheImpl& ax_object_cache)
     : AXLayoutObject(layout_object, ax_object_cache) {}
diff --git a/third_party/blink/renderer/modules/accessibility/ax_sparse_attribute_setter.cc b/third_party/blink/renderer/modules/accessibility/ax_sparse_attribute_setter.cc
index 4f30248..4119492a 100644
--- a/third_party/blink/renderer/modules/accessibility/ax_sparse_attribute_setter.cc
+++ b/third_party/blink/renderer/modules/accessibility/ax_sparse_attribute_setter.cc
@@ -7,7 +7,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 class BoolAttributeSetter : public AXSparseAttributeSetter {
  public:
@@ -118,28 +118,28 @@
                       ax_sparse_attribute_setter_map, ());
   if (ax_sparse_attribute_setter_map.IsEmpty()) {
     ax_sparse_attribute_setter_map.Set(
-        aria_activedescendantAttr,
+        kAriaActivedescendantAttr,
         new ObjectAttributeSetter(AXObjectAttribute::kAriaActiveDescendant));
     ax_sparse_attribute_setter_map.Set(
-        aria_controlsAttr, new ObjectVectorAttributeSetter(
+        kAriaControlsAttr, new ObjectVectorAttributeSetter(
                                AXObjectVectorAttribute::kAriaControls));
     ax_sparse_attribute_setter_map.Set(
-        aria_flowtoAttr,
+        kAriaFlowtoAttr,
         new ObjectVectorAttributeSetter(AXObjectVectorAttribute::kAriaFlowTo));
     ax_sparse_attribute_setter_map.Set(
-        aria_detailsAttr,
+        kAriaDetailsAttr,
         new ObjectAttributeSetter(AXObjectAttribute::kAriaDetails));
     ax_sparse_attribute_setter_map.Set(
-        aria_errormessageAttr,
+        kAriaErrormessageAttr,
         new ObjectAttributeSetter(AXObjectAttribute::kAriaErrorMessage));
     ax_sparse_attribute_setter_map.Set(
-        aria_keyshortcutsAttr,
+        kAriaKeyshortcutsAttr,
         new StringAttributeSetter(AXStringAttribute::kAriaKeyShortcuts));
     ax_sparse_attribute_setter_map.Set(
-        aria_roledescriptionAttr,
+        kAriaRoledescriptionAttr,
         new StringAttributeSetter(AXStringAttribute::kAriaRoleDescription));
     ax_sparse_attribute_setter_map.Set(
-        aria_busyAttr, new BoolAttributeSetter(AXBoolAttribute::kAriaBusy));
+        kAriaBusyAttr, new BoolAttributeSetter(AXBoolAttribute::kAriaBusy));
   }
   return ax_sparse_attribute_setter_map;
 }
diff --git a/third_party/blink/renderer/modules/accessibility/inspector_accessibility_agent.cc b/third_party/blink/renderer/modules/accessibility/inspector_accessibility_agent.cc
index fef0e9f..afe6c23 100644
--- a/third_party/blink/renderer/modules/accessibility/inspector_accessibility_agent.cc
+++ b/third_party/blink/renderer/modules/accessibility/inspector_accessibility_agent.cc
@@ -35,7 +35,7 @@
 using protocol::Maybe;
 using protocol::Response;
 
-using namespace HTMLNames;
+using namespace html_names;
 
 namespace {
 
@@ -237,7 +237,7 @@
   }
   int hierarchical_level = ax_object.HierarchicalLevel();
   if (hierarchical_level > 0 ||
-      ax_object.HasAttribute(HTMLNames::aria_levelAttr)) {
+      ax_object.HasAttribute(html_names::kAriaLevelAttr)) {
     properties.addItem(CreateProperty(AXPropertyNameEnum::Level,
                                       CreateValue(hierarchical_level)));
   }
@@ -455,11 +455,11 @@
       case AXObjectVectorAttribute::kAriaControls:
         properties_.addItem(
             CreateRelatedNodeListProperty(AXPropertyNameEnum::Controls, objects,
-                                          aria_controlsAttr, *ax_object_));
+                                          kAriaControlsAttr, *ax_object_));
         break;
       case AXObjectVectorAttribute::kAriaFlowTo:
         properties_.addItem(CreateRelatedNodeListProperty(
-            AXPropertyNameEnum::Flowto, objects, aria_flowtoAttr, *ax_object_));
+            AXPropertyNameEnum::Flowto, objects, kAriaFlowtoAttr, *ax_object_));
         break;
     }
   }
@@ -472,14 +472,14 @@
   if (!results.IsEmpty()) {
     properties.addItem(
         CreateRelatedNodeListProperty(AXPropertyNameEnum::Describedby, results,
-                                      aria_describedbyAttr, ax_object));
+                                      kAriaDescribedbyAttr, ax_object));
   }
   results.clear();
 
   ax_object.AriaOwnsElements(results);
   if (!results.IsEmpty()) {
     properties.addItem(CreateRelatedNodeListProperty(
-        AXPropertyNameEnum::Owns, results, aria_ownsAttr, ax_object));
+        AXPropertyNameEnum::Owns, results, kAriaOwnsAttr, ax_object));
   }
   results.clear();
 }
diff --git a/third_party/blink/renderer/modules/accessibility/inspector_type_builder_helper.cc b/third_party/blink/renderer/modules/accessibility/inspector_type_builder_helper.cc
index 91169601..8b01f01 100644
--- a/third_party/blink/renderer/modules/accessibility/inspector_type_builder_helper.cc
+++ b/third_party/blink/renderer/modules/accessibility/inspector_type_builder_helper.cc
@@ -11,7 +11,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 using namespace protocol::Accessibility;
 
 std::unique_ptr<AXProperty> CreateProperty(const String& name,
@@ -214,8 +214,8 @@
   std::unique_ptr<AXValueSource> value_source =
       AXValueSource::create().setType(type).build();
   if (!name_source.related_objects.IsEmpty()) {
-    if (name_source.attribute == aria_labelledbyAttr ||
-        name_source.attribute == aria_labeledbyAttr) {
+    if (name_source.attribute == kAriaLabelledbyAttr ||
+        name_source.attribute == kAriaLabeledbyAttr) {
       std::unique_ptr<AXValue> attribute_value = CreateRelatedNodeListValue(
           name_source.related_objects, AXValueTypeEnum::IdrefList);
       if (!name_source.attribute_value.IsNull())
diff --git a/third_party/blink/renderer/modules/animationworklet/animation_worklet_global_scope_test.cc b/third_party/blink/renderer/modules/animationworklet/animation_worklet_global_scope_test.cc
index 1f3eb73e..5e87d6d2 100644
--- a/third_party/blink/renderer/modules/animationworklet/animation_worklet_global_scope_test.cc
+++ b/third_party/blink/renderer/modules/animationworklet/animation_worklet_global_scope_test.cc
@@ -85,8 +85,7 @@
             OriginTrialContext::GetTokens(document).get(),
             base::UnguessableToken::Create(), nullptr /* worker_settings */,
             kV8CacheOptionsDefault, new WorkletModuleResponsesMap),
-        base::nullopt, WorkerInspectorProxy::PauseOnWorkerStart::kDontPause,
-        ParentExecutionContextTaskRunners::Create());
+        base::nullopt, nullptr, ParentExecutionContextTaskRunners::Create());
     return thread;
   }
 
diff --git a/third_party/blink/renderer/modules/cache_storage/inspector_cache_storage_agent.cc b/third_party/blink/renderer/modules/cache_storage/inspector_cache_storage_agent.cc
index 0f63b25..1240e7e 100644
--- a/third_party/blink/renderer/modules/cache_storage/inspector_cache_storage_agent.cc
+++ b/third_party/blink/renderer/modules/cache_storage/inspector_cache_storage_agent.cc
@@ -34,8 +34,6 @@
 #include "third_party/blink/renderer/platform/weborigin/security_origin.h"
 #include "third_party/blink/renderer/platform/wtf/functional.h"
 #include "third_party/blink/renderer/platform/wtf/ref_counted.h"
-#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
-#include "third_party/blink/renderer/platform/wtf/text/base64.h"
 #include "third_party/blink/renderer/platform/wtf/time.h"
 #include "third_party/blink/renderer/platform/wtf/vector.h"
 
@@ -391,8 +389,7 @@
   void DidFinishLoading() override {
     std::unique_ptr<CachedResponse> response =
         CachedResponse::create()
-            .setBody(
-                Base64Encode(data_->Data(), SafeCast<unsigned>(data_->size())))
+            .setBody(protocol::Binary::fromSharedBuffer(data_))
             .build();
     callback_->sendSuccess(std::move(response));
     dispose();
@@ -634,8 +631,9 @@
               std::unique_ptr<protocol::DictionaryValue> headers =
                   protocol::DictionaryValue::create();
               if (!result->get_response()->blob) {
-                callback->sendSuccess(
-                    CachedResponse::create().setBody("").build());
+                callback->sendSuccess(CachedResponse::create()
+                                          .setBody(protocol::Binary())
+                                          .build());
                 return;
               }
               CachedResponseFileReaderLoaderClient::Load(
diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d_test.cc b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d_test.cc
index 7ee1086..adeec99e 100644
--- a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d_test.cc
+++ b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d_test.cc
@@ -544,8 +544,8 @@
 }
 
 TEST_F(CanvasRenderingContext2DTest, ImageResourceLifetime) {
-  auto* canvas =
-      ToHTMLCanvasElement(GetDocument().CreateRawElement(HTMLNames::canvasTag));
+  auto* canvas = ToHTMLCanvasElement(
+      GetDocument().CreateRawElement(html_names::kCanvasTag));
   canvas->SetSize(IntSize(40, 40));
   ImageBitmap* image_bitmap_derived = nullptr;
   {
diff --git a/third_party/blink/renderer/modules/credentialmanager/password_credential.cc b/third_party/blink/renderer/modules/credentialmanager/password_credential.cc
index e7360563..071befa 100644
--- a/third_party/blink/renderer/modules/credentialmanager/password_credential.cc
+++ b/third_party/blink/renderer/modules/credentialmanager/password_credential.cc
@@ -57,7 +57,7 @@
 
     Vector<String> autofill_tokens;
     ToHTMLElement(submittable_element)
-        ->FastGetAttribute(HTMLNames::autocompleteAttr)
+        ->FastGetAttribute(html_names::kAutocompleteAttr)
         .GetString()
         .DeprecatedLower()
         .Split(' ', autofill_tokens);
diff --git a/third_party/blink/renderer/modules/document_metadata/copyless_paste_extractor.cc b/third_party/blink/renderer/modules/document_metadata/copyless_paste_extractor.cc
index a9ec4a3c..e9020e7 100644
--- a/third_party/blink/renderer/modules/document_metadata/copyless_paste_extractor.cc
+++ b/third_party/blink/renderer/modules/document_metadata/copyless_paste_extractor.cc
@@ -255,8 +255,8 @@
 ExtractionStatus extractMetadata(const Element& root,
                                  Vector<EntityPtr>& entities) {
   for (Element& element : ElementTraversal::DescendantsOf(root)) {
-    if (element.HasTagName(HTMLNames::scriptTag) &&
-        element.getAttribute(HTMLNames::typeAttr) == "application/ld+json") {
+    if (element.HasTagName(html_names::kScriptTag) &&
+        element.getAttribute(html_names::kTypeAttr) == "application/ld+json") {
       std::unique_ptr<JSONValue> json = ParseJSON(element.textContent());
       if (!json) {
         LOG(ERROR) << "Failed to parse json.";
diff --git a/third_party/blink/renderer/modules/exported/web_embedded_worker_impl.cc b/third_party/blink/renderer/modules/exported/web_embedded_worker_impl.cc
index e02628a8..ed97e38 100644
--- a/third_party/blink/renderer/modules/exported/web_embedded_worker_impl.cc
+++ b/third_party/blink/renderer/modules/exported/web_embedded_worker_impl.cc
@@ -55,7 +55,6 @@
 #include "third_party/blink/renderer/core/workers/worker_classic_script_loader.h"
 #include "third_party/blink/renderer/core/workers/worker_content_settings_client.h"
 #include "third_party/blink/renderer/core/workers/worker_global_scope.h"
-#include "third_party/blink/renderer/core/workers/worker_inspector_proxy.h"
 #include "third_party/blink/renderer/modules/indexeddb/indexed_db_client.h"
 #include "third_party/blink/renderer/modules/service_worker/service_worker_global_scope_client.h"
 #include "third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.h"
@@ -122,7 +121,6 @@
         interface_provider_info)
     : worker_context_client_(std::move(client)),
       content_settings_client_(std::move(content_settings_client)),
-      worker_inspector_proxy_(WorkerInspectorProxy::Create()),
       pause_after_download_state_(kDontPauseAfterDownload),
       waiting_for_debugger_state_(kNotWaitingForDebugger),
       cache_storage_info_(std::move(cache_storage_info)),
@@ -230,7 +228,8 @@
     return;
   }
   worker_thread_->Terminate();
-  worker_inspector_proxy_->WorkerThreadTerminated();
+  if (DevToolsAgent* agent = DevToolsAgent::From(shadow_page_->GetDocument()))
+    agent->ChildWorkerThreadTerminated(worker_thread_.get());
 }
 
 void WebEmbeddedWorkerImpl::ResumeAfterDownload() {
@@ -279,11 +278,6 @@
           std::move(devtools_agent_request)));
 }
 
-void WebEmbeddedWorkerImpl::PostMessageToPageInspector(int session_id,
-                                                       const String& message) {
-  worker_inspector_proxy_->DispatchMessageFromWorker(session_id, message);
-}
-
 std::unique_ptr<WebApplicationCacheHost>
 WebEmbeddedWorkerImpl::CreateApplicationCacheHost(
     WebApplicationCacheHostClient*) {
@@ -460,14 +454,10 @@
   // We have a dummy document here for loading but it doesn't really represent
   // the document/frame of associated document(s) for this worker. Here we
   // populate the task runners with default task runners of the main thread.
-  worker_thread_->Start(
-      std::move(global_scope_creation_params),
-      WorkerBackingThreadStartupData::CreateDefault(),
-      worker_inspector_proxy_->ShouldPauseOnWorkerStart(document),
-      ParentExecutionContextTaskRunners::Create());
-
-  worker_inspector_proxy_->WorkerThreadCreated(document, worker_thread_.get(),
-                                               worker_start_data_.script_url);
+  worker_thread_->Start(std::move(global_scope_creation_params),
+                        WorkerBackingThreadStartupData::CreateDefault(),
+                        DevToolsAgent::From(document),
+                        ParentExecutionContextTaskRunners::Create());
 
   // > Switching on job’s worker type, run these substeps with the following
   // > options:
diff --git a/third_party/blink/renderer/modules/exported/web_embedded_worker_impl.h b/third_party/blink/renderer/modules/exported/web_embedded_worker_impl.h
index 7c73402..f7a7282 100644
--- a/third_party/blink/renderer/modules/exported/web_embedded_worker_impl.h
+++ b/third_party/blink/renderer/modules/exported/web_embedded_worker_impl.h
@@ -48,7 +48,6 @@
 
 class ServiceWorkerInstalledScriptsManager;
 class WorkerClassicScriptLoader;
-class WorkerInspectorProxy;
 class WorkerThread;
 
 class MODULES_EXPORT WebEmbeddedWorkerImpl final
@@ -74,8 +73,6 @@
       mojo::ScopedInterfaceEndpointHandle devtools_agent_host_ptr_info,
       mojo::ScopedInterfaceEndpointHandle devtools_agent_request) override;
 
-  void PostMessageToPageInspector(int session_id, const WTF::String&);
-
   // WorkerShadowPage::Client overrides.
   std::unique_ptr<WebApplicationCacheHost> CreateApplicationCacheHost(
       WebApplicationCacheHostClient*) override;
@@ -107,7 +104,6 @@
   scoped_refptr<WorkerClassicScriptLoader> main_script_loader_;
 
   std::unique_ptr<WorkerThread> worker_thread_;
-  Persistent<WorkerInspectorProxy> worker_inspector_proxy_;
 
   std::unique_ptr<WorkerShadowPage> shadow_page_;
 
diff --git a/third_party/blink/renderer/modules/media_controls/elements/media_control_cast_button_element.cc b/third_party/blink/renderer/modules/media_controls/elements/media_control_cast_button_element.cc
index ea489594..5a0e8c65 100644
--- a/third_party/blink/renderer/modules/media_controls/elements/media_control_cast_button_element.cc
+++ b/third_party/blink/renderer/modules/media_controls/elements/media_control_cast_button_element.cc
@@ -39,7 +39,7 @@
   SetShadowPseudoId(is_overlay_button
                         ? "-internal-media-controls-overlay-cast-button"
                         : "-internal-media-controls-cast-button");
-  setType(InputTypeNames::button);
+  setType(input_type_names::kButton);
   UpdateDisplayType();
 }
 
diff --git a/third_party/blink/renderer/modules/media_controls/elements/media_control_display_cutout_fullscreen_button_element.cc b/third_party/blink/renderer/modules/media_controls/elements/media_control_display_cutout_fullscreen_button_element.cc
index f284d1737..ede453e 100644
--- a/third_party/blink/renderer/modules/media_controls/elements/media_control_display_cutout_fullscreen_button_element.cc
+++ b/third_party/blink/renderer/modules/media_controls/elements/media_control_display_cutout_fullscreen_button_element.cc
@@ -18,7 +18,7 @@
         MediaControlsImpl& media_controls)
     : MediaControlInputElement(media_controls,
                                kMediaDisplayCutoutFullscreenButton) {
-  setType(InputTypeNames::button);
+  setType(input_type_names::kButton);
   SetShadowPseudoId(AtomicString(
       "-internal-media-controls-display-cutout-fullscreen-button"));
   SetIsWanted(false);
diff --git a/third_party/blink/renderer/modules/media_controls/elements/media_control_download_button_element.cc b/third_party/blink/renderer/modules/media_controls/elements/media_control_download_button_element.cc
index a240eac..9213f945 100644
--- a/third_party/blink/renderer/modules/media_controls/elements/media_control_download_button_element.cc
+++ b/third_party/blink/renderer/modules/media_controls/elements/media_control_download_button_element.cc
@@ -21,7 +21,7 @@
 MediaControlDownloadButtonElement::MediaControlDownloadButtonElement(
     MediaControlsImpl& media_controls)
     : MediaControlInputElement(media_controls, kMediaDownloadButton) {
-  setType(InputTypeNames::button);
+  setType(input_type_names::kButton);
   SetShadowPseudoId(AtomicString("-internal-media-controls-download-button"));
   SetIsWanted(false);
 }
diff --git a/third_party/blink/renderer/modules/media_controls/elements/media_control_fullscreen_button_element.cc b/third_party/blink/renderer/modules/media_controls/elements/media_control_fullscreen_button_element.cc
index b3ae69b..c0a3291 100644
--- a/third_party/blink/renderer/modules/media_controls/elements/media_control_fullscreen_button_element.cc
+++ b/third_party/blink/renderer/modules/media_controls/elements/media_control_fullscreen_button_element.cc
@@ -17,7 +17,7 @@
 MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement(
     MediaControlsImpl& media_controls)
     : MediaControlInputElement(media_controls, kMediaEnterFullscreenButton) {
-  setType(InputTypeNames::button);
+  setType(input_type_names::kButton);
   SetShadowPseudoId(AtomicString("-webkit-media-controls-fullscreen-button"));
   SetIsFullscreen(MediaElement().IsFullscreen());
   SetIsWanted(false);
diff --git a/third_party/blink/renderer/modules/media_controls/elements/media_control_input_element.cc b/third_party/blink/renderer/modules/media_controls/elements/media_control_input_element.cc
index 806b4ea..48503f8 100644
--- a/third_party/blink/renderer/modules/media_controls/elements/media_control_input_element.cc
+++ b/third_party/blink/renderer/modules/media_controls/elements/media_control_input_element.cc
@@ -272,7 +272,7 @@
 }
 
 bool MediaControlInputElement::IsDisabled() const {
-  return hasAttribute(HTMLNames::disabledAttr);
+  return hasAttribute(html_names::kDisabledAttr);
 }
 
 void MediaControlInputElement::Trace(blink::Visitor* visitor) {
diff --git a/third_party/blink/renderer/modules/media_controls/elements/media_control_input_element_test.cc b/third_party/blink/renderer/modules/media_controls/elements/media_control_input_element_test.cc
index 17a12b2..dee29d9c 100644
--- a/third_party/blink/renderer/modules/media_controls/elements/media_control_input_element_test.cc
+++ b/third_party/blink/renderer/modules/media_controls/elements/media_control_input_element_test.cc
@@ -30,7 +30,7 @@
   MediaControlInputElementImpl(MediaControlsImpl& media_controls)
       // Using arbitrary MediaControlElementType. It should have no impact.
       : MediaControlInputElement(media_controls, kMediaDownloadButton) {
-    setType(InputTypeNames::button);
+    setType(input_type_names::kButton);
     SetIsWanted(false);
   }
 
@@ -57,7 +57,7 @@
     // Create page and add a video element with controls.
     PageTestBase::SetUp();
     media_element_ = HTMLVideoElement::Create(GetDocument());
-    media_element_->SetBooleanAttribute(HTMLNames::controlsAttr, true);
+    media_element_->SetBooleanAttribute(html_names::kControlsAttr, true);
     GetDocument().body()->AppendChild(media_element_);
 
     // Create instance of MediaControlInputElement to run tests on.
@@ -236,7 +236,7 @@
 }
 
 TEST_F(MediaControlInputElementTest, ShouldRecordDisplayStates_ReadyState) {
-  MediaElement().setAttribute(HTMLNames::preloadAttr, "auto");
+  MediaElement().setAttribute(html_names::kPreloadAttr, "auto");
 
   SetReadyState(HTMLMediaElement::kHaveNothing);
   EXPECT_FALSE(
@@ -264,15 +264,15 @@
   // the result.
   SetReadyState(HTMLMediaElement::kHaveNothing);
 
-  MediaElement().setAttribute(HTMLNames::preloadAttr, "none");
+  MediaElement().setAttribute(html_names::kPreloadAttr, "none");
   EXPECT_TRUE(
       MediaControlInputElement::ShouldRecordDisplayStates(MediaElement()));
 
-  MediaElement().setAttribute(HTMLNames::preloadAttr, "preload");
+  MediaElement().setAttribute(html_names::kPreloadAttr, "preload");
   EXPECT_FALSE(
       MediaControlInputElement::ShouldRecordDisplayStates(MediaElement()));
 
-  MediaElement().setAttribute(HTMLNames::preloadAttr, "auto");
+  MediaElement().setAttribute(html_names::kPreloadAttr, "auto");
   EXPECT_FALSE(
       MediaControlInputElement::ShouldRecordDisplayStates(MediaElement()));
 }
diff --git a/third_party/blink/renderer/modules/media_controls/elements/media_control_loading_panel_element_test.cc b/third_party/blink/renderer/modules/media_controls/elements/media_control_loading_panel_element_test.cc
index 8132357..3eab1860 100644
--- a/third_party/blink/renderer/modules/media_controls/elements/media_control_loading_panel_element_test.cc
+++ b/third_party/blink/renderer/modules/media_controls/elements/media_control_loading_panel_element_test.cc
@@ -24,7 +24,7 @@
     // Create page and add a video element with controls.
     PageTestBase::SetUp();
     media_element_ = HTMLVideoElement::Create(GetDocument());
-    media_element_->SetBooleanAttribute(HTMLNames::controlsAttr, true);
+    media_element_->SetBooleanAttribute(html_names::kControlsAttr, true);
     GetDocument().body()->AppendChild(media_element_);
 
     // Create instance of MediaControlInputElement to run tests on.
diff --git a/third_party/blink/renderer/modules/media_controls/elements/media_control_mute_button_element.cc b/third_party/blink/renderer/modules/media_controls/elements/media_control_mute_button_element.cc
index da173711..937b592b 100644
--- a/third_party/blink/renderer/modules/media_controls/elements/media_control_mute_button_element.cc
+++ b/third_party/blink/renderer/modules/media_controls/elements/media_control_mute_button_element.cc
@@ -15,7 +15,7 @@
 MediaControlMuteButtonElement::MediaControlMuteButtonElement(
     MediaControlsImpl& media_controls)
     : MediaControlInputElement(media_controls, kMediaMuteButton) {
-  setType(InputTypeNames::button);
+  setType(input_type_names::kButton);
   SetShadowPseudoId(AtomicString("-webkit-media-controls-mute-button"));
 }
 
diff --git a/third_party/blink/renderer/modules/media_controls/elements/media_control_overflow_menu_button_element.cc b/third_party/blink/renderer/modules/media_controls/elements/media_control_overflow_menu_button_element.cc
index cb2ffa7..d0e33ef9 100644
--- a/third_party/blink/renderer/modules/media_controls/elements/media_control_overflow_menu_button_element.cc
+++ b/third_party/blink/renderer/modules/media_controls/elements/media_control_overflow_menu_button_element.cc
@@ -16,7 +16,7 @@
 MediaControlOverflowMenuButtonElement::MediaControlOverflowMenuButtonElement(
     MediaControlsImpl& media_controls)
     : MediaControlInputElement(media_controls, kMediaOverflowButton) {
-  setType(InputTypeNames::button);
+  setType(input_type_names::kButton);
   SetShadowPseudoId(AtomicString("-internal-media-controls-overflow-button"));
   SetIsWanted(false);
 }
@@ -43,7 +43,7 @@
 
 void MediaControlOverflowMenuButtonElement::DefaultEventHandler(Event& event) {
   // Only respond to a click event if we are not disabled.
-  if (!hasAttribute(HTMLNames::disabledAttr) &&
+  if (!hasAttribute(html_names::kDisabledAttr) &&
       event.type() == EventTypeNames::click) {
     if (GetMediaControls().OverflowMenuVisible()) {
       Platform::Current()->RecordAction(
diff --git a/third_party/blink/renderer/modules/media_controls/elements/media_control_overlay_play_button_element.cc b/third_party/blink/renderer/modules/media_controls/elements/media_control_overlay_play_button_element.cc
index b69ad79..61af17c 100644
--- a/third_party/blink/renderer/modules/media_controls/elements/media_control_overlay_play_button_element.cc
+++ b/third_party/blink/renderer/modules/media_controls/elements/media_control_overlay_play_button_element.cc
@@ -39,7 +39,7 @@
     : MediaControlInputElement(media_controls, kMediaPlayButton),
       internal_button_(nullptr) {
   EnsureUserAgentShadowRoot();
-  setType(InputTypeNames::button);
+  setType(input_type_names::kButton);
   SetShadowPseudoId(AtomicString("-webkit-media-controls-overlay-play-button"));
 
   if (MediaControlsImpl::IsModern()) {
diff --git a/third_party/blink/renderer/modules/media_controls/elements/media_control_panel_element_test.cc b/third_party/blink/renderer/modules/media_controls/elements/media_control_panel_element_test.cc
index f44fe39..484ff2a1 100644
--- a/third_party/blink/renderer/modules/media_controls/elements/media_control_panel_element_test.cc
+++ b/third_party/blink/renderer/modules/media_controls/elements/media_control_panel_element_test.cc
@@ -21,7 +21,7 @@
     // Create page and add a video element with controls.
     PageTestBase::SetUp();
     media_element_ = HTMLVideoElement::Create(GetDocument());
-    media_element_->SetBooleanAttribute(HTMLNames::controlsAttr, true);
+    media_element_->SetBooleanAttribute(html_names::kControlsAttr, true);
     GetDocument().body()->AppendChild(media_element_);
 
     // Create instance of MediaControlInputElement to run tests on.
diff --git a/third_party/blink/renderer/modules/media_controls/elements/media_control_picture_in_picture_button_element.cc b/third_party/blink/renderer/modules/media_controls/elements/media_control_picture_in_picture_button_element.cc
index 3c6c798..9074a32 100644
--- a/third_party/blink/renderer/modules/media_controls/elements/media_control_picture_in_picture_button_element.cc
+++ b/third_party/blink/renderer/modules/media_controls/elements/media_control_picture_in_picture_button_element.cc
@@ -18,7 +18,7 @@
 MediaControlPictureInPictureButtonElement::
     MediaControlPictureInPictureButtonElement(MediaControlsImpl& media_controls)
     : MediaControlInputElement(media_controls, kMediaPlayButton) {
-  setType(InputTypeNames::button);
+  setType(input_type_names::kButton);
   SetShadowPseudoId(
       AtomicString("-internal-media-controls-picture-in-picture-button"));
   SetIsWanted(false);
diff --git a/third_party/blink/renderer/modules/media_controls/elements/media_control_play_button_element.cc b/third_party/blink/renderer/modules/media_controls/elements/media_control_play_button_element.cc
index 81bb8d7..bd97f1d 100644
--- a/third_party/blink/renderer/modules/media_controls/elements/media_control_play_button_element.cc
+++ b/third_party/blink/renderer/modules/media_controls/elements/media_control_play_button_element.cc
@@ -16,7 +16,7 @@
 MediaControlPlayButtonElement::MediaControlPlayButtonElement(
     MediaControlsImpl& media_controls)
     : MediaControlInputElement(media_controls, kMediaPlayButton) {
-  setType(InputTypeNames::button);
+  setType(input_type_names::kButton);
   SetShadowPseudoId(AtomicString("-webkit-media-controls-play-button"));
 }
 
diff --git a/third_party/blink/renderer/modules/media_controls/elements/media_control_scrubbing_message_element_test.cc b/third_party/blink/renderer/modules/media_controls/elements/media_control_scrubbing_message_element_test.cc
index 127612e5..7f9570d 100644
--- a/third_party/blink/renderer/modules/media_controls/elements/media_control_scrubbing_message_element_test.cc
+++ b/third_party/blink/renderer/modules/media_controls/elements/media_control_scrubbing_message_element_test.cc
@@ -26,7 +26,7 @@
     // Create page and add a video element with controls.
     PageTestBase::SetUp();
     media_element_ = HTMLVideoElement::Create(GetDocument());
-    media_element_->SetBooleanAttribute(HTMLNames::controlsAttr, true);
+    media_element_->SetBooleanAttribute(html_names::kControlsAttr, true);
     GetDocument().body()->AppendChild(media_element_);
 
     // Create instance of MediaControlScrubbingMessageElement to run tests on.
diff --git a/third_party/blink/renderer/modules/media_controls/elements/media_control_slider_element.cc b/third_party/blink/renderer/modules/media_controls/elements/media_control_slider_element.cc
index e1f55e00..9d636b5 100644
--- a/third_party/blink/renderer/modules/media_controls/elements/media_control_slider_element.cc
+++ b/third_party/blink/renderer/modules/media_controls/elements/media_control_slider_element.cc
@@ -89,8 +89,8 @@
       resize_observer_(ResizeObserver::Create(
           GetDocument(),
           new MediaControlSliderElementResizeObserverDelegate(this))) {
-  setType(InputTypeNames::range);
-  setAttribute(HTMLNames::stepAttr, "any");
+  setType(input_type_names::kRange);
+  setAttribute(html_names::kStepAttr, "any");
   resize_observer_->observe(this);
 }
 
diff --git a/third_party/blink/renderer/modules/media_controls/elements/media_control_text_track_list_element.cc b/third_party/blink/renderer/modules/media_controls/elements/media_control_text_track_list_element.cc
index c04a951..cdd7036 100644
--- a/third_party/blink/renderer/modules/media_controls/elements/media_control_text_track_list_element.cc
+++ b/third_party/blink/renderer/modules/media_controls/elements/media_control_text_track_list_element.cc
@@ -108,7 +108,7 @@
       HTMLInputElement::Create(GetDocument(), CreateElementFlags());
   track_item_input->SetShadowPseudoId(
       AtomicString("-internal-media-controls-text-track-list-item-input"));
-  track_item_input->setType(InputTypeNames::checkbox);
+  track_item_input->setType(input_type_names::kCheckbox);
   track_item_input->SetIntegralAttribute(TrackIndexAttrName(), track_index);
   if (!MediaElement().TextTracksVisible()) {
     if (!track)
diff --git a/third_party/blink/renderer/modules/media_controls/elements/media_control_timeline_element.cc b/third_party/blink/renderer/modules/media_controls/elements/media_control_timeline_element.cc
index 456171e..2bb858f 100644
--- a/third_party/blink/renderer/modules/media_controls/elements/media_control_timeline_element.cc
+++ b/third_party/blink/renderer/modules/media_controls/elements/media_control_timeline_element.cc
@@ -81,13 +81,13 @@
 void MediaControlTimelineElement::SetPosition(double current_time) {
   setValue(String::Number(current_time));
   setAttribute(
-      HTMLNames::aria_valuetextAttr,
+      html_names::kAriaValuetextAttr,
       AtomicString(GetMediaControls().CurrentTimeDisplay().textContent(true)));
   RenderBarSegments();
 }
 
 void MediaControlTimelineElement::SetDuration(double duration) {
-  SetFloatingPointAttribute(HTMLNames::maxAttr,
+  SetFloatingPointAttribute(html_names::kMaxAttr,
                             std::isfinite(duration) ? duration : 0);
   RenderBarSegments();
 }
diff --git a/third_party/blink/renderer/modules/media_controls/elements/media_control_toggle_closed_captions_button_element.cc b/third_party/blink/renderer/modules/media_controls/elements/media_control_toggle_closed_captions_button_element.cc
index fae04b591..f6a9de1f 100644
--- a/third_party/blink/renderer/modules/media_controls/elements/media_control_toggle_closed_captions_button_element.cc
+++ b/third_party/blink/renderer/modules/media_controls/elements/media_control_toggle_closed_captions_button_element.cc
@@ -46,7 +46,7 @@
     MediaControlToggleClosedCaptionsButtonElement(
         MediaControlsImpl& media_controls)
     : MediaControlInputElement(media_controls, kMediaShowClosedCaptionsButton) {
-  setType(InputTypeNames::button);
+  setType(input_type_names::kButton);
   SetShadowPseudoId(
       AtomicString("-webkit-media-controls-toggle-closed-captions-button"));
   SetClass(kClosedCaptionClass, UseClosedCaptionsIcon());
diff --git a/third_party/blink/renderer/modules/media_controls/elements/media_control_volume_slider_element.cc b/third_party/blink/renderer/modules/media_controls/elements/media_control_volume_slider_element.cc
index 2ffacc5f..d4f0e31 100644
--- a/third_party/blink/renderer/modules/media_controls/elements/media_control_volume_slider_element.cc
+++ b/third_party/blink/renderer/modules/media_controls/elements/media_control_volume_slider_element.cc
@@ -24,7 +24,7 @@
 MediaControlVolumeSliderElement::MediaControlVolumeSliderElement(
     MediaControlsImpl& media_controls)
     : MediaControlSliderElement(media_controls, kMediaVolumeSlider) {
-  setAttribute(HTMLNames::maxAttr, "1");
+  setAttribute(html_names::kMaxAttr, "1");
   SetShadowPseudoId(AtomicString("-webkit-media-controls-volume-slider"));
   SetVolumeInternal(MediaElement().volume());
 
diff --git a/third_party/blink/renderer/modules/media_controls/media_controls_impl.cc b/third_party/blink/renderer/modules/media_controls/media_controls_impl.cc
index ab2167a..76f544a 100644
--- a/third_party/blink/renderer/modules/media_controls/media_controls_impl.cc
+++ b/third_party/blink/renderer/modules/media_controls/media_controls_impl.cc
@@ -176,7 +176,7 @@
 }
 
 bool ShouldShowCastButton(HTMLMediaElement& media_element) {
-  if (media_element.FastHasAttribute(HTMLNames::disableremoteplaybackAttr))
+  if (media_element.FastHasAttribute(html_names::kDisableremoteplaybackAttr))
     return false;
 
   // Explicitly do not show cast button when:
@@ -283,9 +283,10 @@
     MutationObserverInit init;
     init.setAttributeOldValue(true);
     init.setAttributes(true);
-    init.setAttributeFilter({HTMLNames::disableremoteplaybackAttr.ToString(),
-                             HTMLNames::disablepictureinpictureAttr.ToString(),
-                             HTMLNames::posterAttr.ToString()});
+    init.setAttributeFilter(
+        {html_names::kDisableremoteplaybackAttr.ToString(),
+         html_names::kDisablepictureinpictureAttr.ToString(),
+         html_names::kPosterAttr.ToString()});
     observer_->observe(&controls_->MediaElement(), init, ASSERT_NO_EXCEPTION);
   }
 
@@ -304,18 +305,18 @@
         continue;
 
       if (record->attributeName() ==
-          HTMLNames::disableremoteplaybackAttr.ToString()) {
+          html_names::kDisableremoteplaybackAttr.ToString()) {
         controls_->RefreshCastButtonVisibilityWithoutUpdate();
       }
 
       if (record->attributeName() ==
-              HTMLNames::disablepictureinpictureAttr.ToString() &&
+              html_names::kDisablepictureinpictureAttr.ToString() &&
           controls_->picture_in_picture_button_) {
         controls_->picture_in_picture_button_->SetIsWanted(
             ShouldShowPictureInPictureButton(controls_->MediaElement()));
       }
 
-      if (record->attributeName() == HTMLNames::posterAttr.ToString())
+      if (record->attributeName() == html_names::kPosterAttr.ToString())
         controls_->UpdateCSSClassFromState();
 
       BatchedControlUpdate batch(controls_);
@@ -764,24 +765,24 @@
     if (state == kNoSource) {
       // Check if the play button or overflow menu has the "disabled" attribute
       // set so we avoid unnecessarily resetting it.
-      if (!play_button_->hasAttribute(HTMLNames::disabledAttr)) {
-        play_button_->setAttribute(HTMLNames::disabledAttr, "");
+      if (!play_button_->hasAttribute(html_names::kDisabledAttr)) {
+        play_button_->setAttribute(html_names::kDisabledAttr, "");
         updated = true;
       }
 
       if (ShouldShowVideoControls() &&
-          !overflow_menu_->hasAttribute(HTMLNames::disabledAttr)) {
-        overflow_menu_->setAttribute(HTMLNames::disabledAttr, "");
+          !overflow_menu_->hasAttribute(html_names::kDisabledAttr)) {
+        overflow_menu_->setAttribute(html_names::kDisabledAttr, "");
         updated = true;
       }
     } else {
-      if (play_button_->hasAttribute(HTMLNames::disabledAttr)) {
-        play_button_->removeAttribute(HTMLNames::disabledAttr);
+      if (play_button_->hasAttribute(html_names::kDisabledAttr)) {
+        play_button_->removeAttribute(html_names::kDisabledAttr);
         updated = true;
       }
 
-      if (overflow_menu_->hasAttribute(HTMLNames::disabledAttr)) {
-        overflow_menu_->removeAttribute(HTMLNames::disabledAttr);
+      if (overflow_menu_->hasAttribute(html_names::kDisabledAttr)) {
+        overflow_menu_->removeAttribute(html_names::kDisabledAttr);
         updated = true;
       }
     }
@@ -894,13 +895,13 @@
 
   if (IsModern() && ShouldShowVideoControls()) {
     fullscreen_button_->SetIsWanted(true);
-    fullscreen_button_->setAttribute(HTMLNames::disabledAttr,
+    fullscreen_button_->setAttribute(html_names::kDisabledAttr,
                                      ShouldShowFullscreenButton(MediaElement())
                                          ? AtomicString()
                                          : AtomicString(""));
   } else {
     fullscreen_button_->SetIsWanted(ShouldShowFullscreenButton(MediaElement()));
-    fullscreen_button_->removeAttribute(HTMLNames::disabledAttr);
+    fullscreen_button_->removeAttribute(html_names::kDisabledAttr);
   }
 
   RefreshCastButtonVisibilityWithoutUpdate();
@@ -1234,7 +1235,7 @@
 
 bool MediaControlsImpl::IsFullscreenEnabled() const {
   return fullscreen_button_->IsWanted() &&
-         !fullscreen_button_->hasAttribute(HTMLNames::disabledAttr);
+         !fullscreen_button_->hasAttribute(html_names::kDisabledAttr);
 }
 
 void MediaControlsImpl::RemotePlaybackStateChanged() {
@@ -1351,8 +1352,8 @@
   }
 
   // The overflow menu is always wanted if it has the "disabled" attr set.
-  overflow_wanted =
-      overflow_wanted || overflow_menu_->hasAttribute(HTMLNames::disabledAttr);
+  overflow_wanted = overflow_wanted ||
+                    overflow_menu_->hasAttribute(html_names::kDisabledAttr);
   overflow_menu_->SetDoesFit(overflow_wanted);
   overflow_menu_->SetIsWanted(overflow_wanted);
 
@@ -1687,11 +1688,11 @@
   if (IsModern()) {
     mute_button_->SetIsWanted(true);
     mute_button_->setAttribute(
-        HTMLNames::disabledAttr,
+        html_names::kDisabledAttr,
         MediaElement().HasAudio() ? AtomicString() : AtomicString(""));
   } else {
     mute_button_->SetIsWanted(MediaElement().HasAudio());
-    mute_button_->removeAttribute(HTMLNames::disabledAttr);
+    mute_button_->removeAttribute(html_names::kDisabledAttr);
   }
 
   // On modern media controls, if the volume slider is being used we don't want
diff --git a/third_party/blink/renderer/modules/media_controls/media_controls_impl_test.cc b/third_party/blink/renderer/modules/media_controls/media_controls_impl_test.cc
index 47a951c..95d8cf6 100644
--- a/third_party/blink/renderer/modules/media_controls/media_controls_impl_test.cc
+++ b/third_party/blink/renderer/modules/media_controls/media_controls_impl_test.cc
@@ -407,18 +407,18 @@
   ASSERT_TRUE(IsElementVisible(*cast_button));
 
   MediaControls().MediaElement().SetBooleanAttribute(
-      HTMLNames::disableremoteplaybackAttr, true);
+      html_names::kDisableremoteplaybackAttr, true);
   test::RunPendingTasks();
   ASSERT_FALSE(IsElementVisible(*cast_button));
 
   MediaControls().MediaElement().SetBooleanAttribute(
-      HTMLNames::disableremoteplaybackAttr, false);
+      html_names::kDisableremoteplaybackAttr, false);
   test::RunPendingTasks();
   ASSERT_TRUE(IsElementVisible(*cast_button));
 }
 
 TEST_F(MediaControlsImplTest, CastOverlayDefault) {
-  MediaControls().MediaElement().SetBooleanAttribute(HTMLNames::controlsAttr,
+  MediaControls().MediaElement().SetBooleanAttribute(html_names::kControlsAttr,
                                                      false);
 
   Element* cast_overlay_button = GetElementByShadowPseudoId(
@@ -430,7 +430,7 @@
 }
 
 TEST_F(MediaControlsImplTest, CastOverlayDisabled) {
-  MediaControls().MediaElement().SetBooleanAttribute(HTMLNames::controlsAttr,
+  MediaControls().MediaElement().SetBooleanAttribute(html_names::kControlsAttr,
                                                      false);
 
   ScopedMediaCastOverlayButtonForTest media_cast_overlay_button(false);
@@ -444,7 +444,7 @@
 }
 
 TEST_F(MediaControlsImplTest, CastOverlayDisableRemotePlaybackAttr) {
-  MediaControls().MediaElement().SetBooleanAttribute(HTMLNames::controlsAttr,
+  MediaControls().MediaElement().SetBooleanAttribute(html_names::kControlsAttr,
                                                      false);
 
   Element* cast_overlay_button = GetElementByShadowPseudoId(
@@ -456,18 +456,18 @@
   ASSERT_TRUE(IsElementVisible(*cast_overlay_button));
 
   MediaControls().MediaElement().SetBooleanAttribute(
-      HTMLNames::disableremoteplaybackAttr, true);
+      html_names::kDisableremoteplaybackAttr, true);
   test::RunPendingTasks();
   ASSERT_FALSE(IsElementVisible(*cast_overlay_button));
 
   MediaControls().MediaElement().SetBooleanAttribute(
-      HTMLNames::disableremoteplaybackAttr, false);
+      html_names::kDisableremoteplaybackAttr, false);
   test::RunPendingTasks();
   ASSERT_TRUE(IsElementVisible(*cast_overlay_button));
 }
 
 TEST_F(MediaControlsImplTest, CastOverlayMediaControlsDisabled) {
-  MediaControls().MediaElement().SetBooleanAttribute(HTMLNames::controlsAttr,
+  MediaControls().MediaElement().SetBooleanAttribute(html_names::kControlsAttr,
                                                      false);
 
   Element* cast_overlay_button = GetElementByShadowPseudoId(
@@ -486,7 +486,7 @@
 }
 
 TEST_F(MediaControlsImplTest, CastOverlayDisabledMediaControlsDisabled) {
-  MediaControls().MediaElement().SetBooleanAttribute(HTMLNames::controlsAttr,
+  MediaControls().MediaElement().SetBooleanAttribute(html_names::kControlsAttr,
                                                      false);
 
   ScopedMediaCastOverlayButtonForTest media_cast_overlay_button(false);
@@ -627,7 +627,7 @@
   ASSERT_FALSE(IsElementVisible(*picture_in_picture_button));
 
   MediaControls().MediaElement().SetBooleanAttribute(
-      HTMLNames::disablepictureinpictureAttr, true);
+      html_names::kDisablepictureinpictureAttr, true);
   MediaControls().MediaElement().SetSrc("https://example.com/foo.mp4");
   test::RunPendingTasks();
   SetReady();
@@ -636,7 +636,7 @@
   ASSERT_FALSE(IsElementVisible(*picture_in_picture_button));
 
   MediaControls().MediaElement().SetBooleanAttribute(
-      HTMLNames::disablepictureinpictureAttr, false);
+      html_names::kDisablepictureinpictureAttr, false);
   test::RunPendingTasks();
   ASSERT_TRUE(IsElementVisible(*picture_in_picture_button));
 }
@@ -1266,7 +1266,7 @@
 }
 
 TEST_F(MediaControlsImplTest, CastOverlayDefaultHidesOnTimer) {
-  MediaControls().MediaElement().SetBooleanAttribute(HTMLNames::controlsAttr,
+  MediaControls().MediaElement().SetBooleanAttribute(html_names::kControlsAttr,
                                                      false);
 
   Element* cast_overlay_button = GetElementByShadowPseudoId(
@@ -1286,7 +1286,7 @@
 }
 
 TEST_F(MediaControlsImplTest, CastOverlayShowsOnSomeEvents) {
-  MediaControls().MediaElement().SetBooleanAttribute(HTMLNames::controlsAttr,
+  MediaControls().MediaElement().SetBooleanAttribute(html_names::kControlsAttr,
                                                      false);
 
   Element* cast_overlay_button = GetElementByShadowPseudoId(
diff --git a/third_party/blink/renderer/modules/media_controls/media_controls_orientation_lock_delegate_test.cc b/third_party/blink/renderer/modules/media_controls/media_controls_orientation_lock_delegate_test.cc
index 4b2a317..2c66a06 100644
--- a/third_party/blink/renderer/modules/media_controls/media_controls_orientation_lock_delegate_test.cc
+++ b/third_party/blink/renderer/modules/media_controls/media_controls_orientation_lock_delegate_test.cc
@@ -305,7 +305,7 @@
     // Reset the <video> element now we've enabled the runtime feature.
     video_->parentElement()->RemoveChild(video_);
     video_ = HTMLVideoElement::Create(GetDocument());
-    video_->setAttribute(HTMLNames::controlsAttr, g_empty_atom);
+    video_->setAttribute(html_names::kControlsAttr, g_empty_atom);
     // Most tests should call GetDocument().body()->AppendChild(&Video());
     // This is not done automatically, so that tests control timing of `Attach`,
     // which is important for MediaControlsRotateToFullscreenDelegate since
diff --git a/third_party/blink/renderer/modules/media_controls/media_controls_rotate_to_fullscreen_delegate_test.cc b/third_party/blink/renderer/modules/media_controls/media_controls_rotate_to_fullscreen_delegate_test.cc
index e36f5176..d512e00b 100644
--- a/third_party/blink/renderer/modules/media_controls/media_controls_rotate_to_fullscreen_delegate_test.cc
+++ b/third_party/blink/renderer/modules/media_controls/media_controls_rotate_to_fullscreen_delegate_test.cc
@@ -38,7 +38,7 @@
 
 namespace blink {
 
-using namespace HTMLNames;
+using namespace html_names;
 
 namespace {
 
@@ -109,7 +109,7 @@
 
     SetupPageWithClients(&clients, StubLocalFrameClient::Create());
     video_ = HTMLVideoElement::Create(GetDocument());
-    GetVideo().setAttribute(controlsAttr, g_empty_atom);
+    GetVideo().setAttribute(kControlsAttr, g_empty_atom);
     // Most tests should call GetDocument().body()->AppendChild(&GetVideo());
     // This is not done automatically, so that tests control timing of `Attach`.
   }
@@ -146,7 +146,7 @@
     // If scripts are not enabled, controls will always be shown.
     GetFrame().GetSettings()->SetScriptEnabled(true);
 
-    GetVideo().removeAttribute(controlsAttr);
+    GetVideo().removeAttribute(kControlsAttr);
   }
 
   void DispatchEvent(EventTarget& target, const AtomicString& type) {
diff --git a/third_party/blink/renderer/modules/media_controls/resources/modernMediaControls.css b/third_party/blink/renderer/modules/media_controls/resources/modernMediaControls.css
index 4338454d..3a81d47 100644
--- a/third_party/blink/renderer/modules/media_controls/resources/modernMediaControls.css
+++ b/third_party/blink/renderer/modules/media_controls/resources/modernMediaControls.css
@@ -659,11 +659,10 @@
   padding-right: 16px;
 }
 
-video::-webkit-media-controls.sizing-small div[pseudo="-internal-media-controls-overflow-menu-list" i],
-video::-webkit-media-controls.sizing-medium div[pseudo="-internal-media-controls-overflow-menu-list" i] {
-  min-width: 180px;
-  max-width: 180px;
-  max-height: 250px;
+video::-internal-media-controls-text-track-list,
+video::-internal-media-controls-overflow-menu-list {
+  max-width: 260px;
+  width: 95%;
 }
 
 video::-webkit-media-controls.sizing-small label[pseudo="-internal-media-controls-overflow-menu-list-item" i] input,
diff --git a/third_party/blink/renderer/modules/payments/html_iframe_element_payments.cc b/third_party/blink/renderer/modules/payments/html_iframe_element_payments.cc
index 39a00714..3f314f3 100644
--- a/third_party/blink/renderer/modules/payments/html_iframe_element_payments.cc
+++ b/third_party/blink/renderer/modules/payments/html_iframe_element_payments.cc
@@ -20,7 +20,7 @@
 bool HTMLIFrameElementPayments::FastHasAttribute(
     const QualifiedName& name,
     const HTMLIFrameElement& element) {
-  DCHECK(name == HTMLNames::allowpaymentrequestAttr);
+  DCHECK(name == html_names::kAllowpaymentrequestAttr);
   return element.FastHasAttribute(name);
 }
 
@@ -28,7 +28,7 @@
 void HTMLIFrameElementPayments::SetBooleanAttribute(const QualifiedName& name,
                                                     HTMLIFrameElement& element,
                                                     bool value) {
-  DCHECK(name == HTMLNames::allowpaymentrequestAttr);
+  DCHECK(name == html_names::kAllowpaymentrequestAttr);
   element.SetBooleanAttribute(name, value);
 }
 
@@ -48,7 +48,7 @@
 bool HTMLIFrameElementPayments::AllowPaymentRequest(
     HTMLIFrameElement& element) {
   return RuntimeEnabledFeatures::PaymentRequestEnabled() &&
-         element.FastHasAttribute(HTMLNames::allowpaymentrequestAttr);
+         element.FastHasAttribute(html_names::kAllowpaymentrequestAttr);
 }
 
 void HTMLIFrameElementPayments::Trace(blink::Visitor* visitor) {
diff --git a/third_party/blink/renderer/modules/picture_in_picture/html_video_element_picture_in_picture.cc b/third_party/blink/renderer/modules/picture_in_picture/html_video_element_picture_in_picture.cc
index f43c3cdd..eeec29c 100644
--- a/third_party/blink/renderer/modules/picture_in_picture/html_video_element_picture_in_picture.cc
+++ b/third_party/blink/renderer/modules/picture_in_picture/html_video_element_picture_in_picture.cc
@@ -118,7 +118,7 @@
 bool HTMLVideoElementPictureInPicture::FastHasAttribute(
     const QualifiedName& name,
     const HTMLVideoElement& element) {
-  DCHECK(name == HTMLNames::disablepictureinpictureAttr);
+  DCHECK(name == html_names::kDisablepictureinpictureAttr);
   return element.FastHasAttribute(name);
 }
 
@@ -127,7 +127,7 @@
     const QualifiedName& name,
     HTMLVideoElement& element,
     bool value) {
-  DCHECK(name == HTMLNames::disablepictureinpictureAttr);
+  DCHECK(name == html_names::kDisablepictureinpictureAttr);
   element.SetBooleanAttribute(name, value);
 
   if (!value)
diff --git a/third_party/blink/renderer/modules/picture_in_picture/picture_in_picture_controller_impl.cc b/third_party/blink/renderer/modules/picture_in_picture/picture_in_picture_controller_impl.cc
index c8ff90a4..c4b2a1b 100644
--- a/third_party/blink/renderer/modules/picture_in_picture/picture_in_picture_controller_impl.cc
+++ b/third_party/blink/renderer/modules/picture_in_picture/picture_in_picture_controller_impl.cc
@@ -76,7 +76,7 @@
   if (!element.HasVideo())
     return Status::kVideoTrackNotAvailable;
 
-  if (element.FastHasAttribute(HTMLNames::disablepictureinpictureAttr))
+  if (element.FastHasAttribute(html_names::kDisablepictureinpictureAttr))
     return Status::kDisabledByAttribute;
 
   return Status::kEnabled;
diff --git a/third_party/blink/renderer/modules/remoteplayback/html_media_element_remote_playback.cc b/third_party/blink/renderer/modules/remoteplayback/html_media_element_remote_playback.cc
index b77769d..af5f8744 100644
--- a/third_party/blink/renderer/modules/remoteplayback/html_media_element_remote_playback.cc
+++ b/third_party/blink/renderer/modules/remoteplayback/html_media_element_remote_playback.cc
@@ -16,7 +16,7 @@
 bool HTMLMediaElementRemotePlayback::FastHasAttribute(
     const QualifiedName& name,
     const HTMLMediaElement& element) {
-  DCHECK(name == HTMLNames::disableremoteplaybackAttr);
+  DCHECK(name == html_names::kDisableremoteplaybackAttr);
   return element.FastHasAttribute(name);
 }
 
@@ -25,7 +25,7 @@
     const QualifiedName& name,
     HTMLMediaElement& element,
     bool value) {
-  DCHECK(name == HTMLNames::disableremoteplaybackAttr);
+  DCHECK(name == html_names::kDisableremoteplaybackAttr);
   element.SetBooleanAttribute(name, value);
 
   HTMLMediaElementRemotePlayback& self =
diff --git a/third_party/blink/renderer/modules/remoteplayback/remote_playback.cc b/third_party/blink/renderer/modules/remoteplayback/remote_playback.cc
index dd23df0e..1a411cd 100644
--- a/third_party/blink/renderer/modules/remoteplayback/remote_playback.cc
+++ b/third_party/blink/renderer/modules/remoteplayback/remote_playback.cc
@@ -100,7 +100,8 @@
   ScriptPromiseResolver* resolver = ScriptPromiseResolver::Create(script_state);
   ScriptPromise promise = resolver->Promise();
 
-  if (media_element_->FastHasAttribute(HTMLNames::disableremoteplaybackAttr)) {
+  if (media_element_->FastHasAttribute(
+          html_names::kDisableremoteplaybackAttr)) {
     resolver->Reject(
         DOMException::Create(DOMExceptionCode::kInvalidStateError,
                              "disableRemotePlayback attribute is present."));
@@ -130,7 +131,8 @@
   ScriptPromiseResolver* resolver = ScriptPromiseResolver::Create(script_state);
   ScriptPromise promise = resolver->Promise();
 
-  if (media_element_->FastHasAttribute(HTMLNames::disableremoteplaybackAttr)) {
+  if (media_element_->FastHasAttribute(
+          html_names::kDisableremoteplaybackAttr)) {
     resolver->Reject(
         DOMException::Create(DOMExceptionCode::kInvalidStateError,
                              "disableRemotePlayback attribute is present."));
@@ -153,7 +155,8 @@
   ScriptPromiseResolver* resolver = ScriptPromiseResolver::Create(script_state);
   ScriptPromise promise = resolver->Promise();
 
-  if (media_element_->FastHasAttribute(HTMLNames::disableremoteplaybackAttr)) {
+  if (media_element_->FastHasAttribute(
+          html_names::kDisableremoteplaybackAttr)) {
     resolver->Reject(
         DOMException::Create(DOMExceptionCode::kInvalidStateError,
                              "disableRemotePlayback attribute is present."));
@@ -171,7 +174,8 @@
   ScriptPromiseResolver* resolver = ScriptPromiseResolver::Create(script_state);
   ScriptPromise promise = resolver->Promise();
 
-  if (media_element_->FastHasAttribute(HTMLNames::disableremoteplaybackAttr)) {
+  if (media_element_->FastHasAttribute(
+          html_names::kDisableremoteplaybackAttr)) {
     resolver->Reject(
         DOMException::Create(DOMExceptionCode::kInvalidStateError,
                              "disableRemotePlayback attribute is present."));
diff --git a/third_party/blink/renderer/modules/remoteplayback/remote_playback_test.cc b/third_party/blink/renderer/modules/remoteplayback/remote_playback_test.cc
index f283e8f..1298cd5 100644
--- a/third_party/blink/renderer/modules/remoteplayback/remote_playback_test.cc
+++ b/third_party/blink/renderer/modules/remoteplayback/remote_playback_test.cc
@@ -248,7 +248,7 @@
   remote_playback->prompt(scope.GetScriptState())
       .Then(resolve->Bind(), reject->Bind());
   HTMLMediaElementRemotePlayback::SetBooleanAttribute(
-      HTMLNames::disableremoteplaybackAttr, *element, true);
+      html_names::kDisableremoteplaybackAttr, *element, true);
 
   // Runs pending promises.
   v8::MicrotasksScope::PerformCheckpoint(scope.GetIsolate());
@@ -289,7 +289,7 @@
       .Then(resolve->Bind(), reject->Bind());
 
   HTMLMediaElementRemotePlayback::SetBooleanAttribute(
-      HTMLNames::disableremoteplaybackAttr, *element, true);
+      html_names::kDisableremoteplaybackAttr, *element, true);
 
   // Runs pending promises.
   v8::MicrotasksScope::PerformCheckpoint(scope.GetIsolate());
diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.cc b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.cc
index 437816c..b828ccf 100644
--- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.cc
+++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.cc
@@ -627,19 +627,6 @@
                                 location->Url());
 }
 
-void ServiceWorkerGlobalScopeProxy::PostMessageToPageInspector(
-    int session_id,
-    const String& message) {
-  DCHECK(embedded_worker_);
-  PostCrossThreadTask(
-      *parent_execution_context_task_runners_->Get(
-          TaskType::kInternalInspector),
-      FROM_HERE,
-      CrossThreadBind(&WebEmbeddedWorkerImpl::PostMessageToPageInspector,
-                      CrossThreadUnretained(embedded_worker_), session_id,
-                      message));
-}
-
 void ServiceWorkerGlobalScopeProxy::DidCreateWorkerGlobalScope(
     WorkerOrWorkletGlobalScope* worker_global_scope) {
   DCHECK(!worker_global_scope_);
diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.h b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.h
index 997b962..9583e29 100644
--- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.h
+++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_proxy.h
@@ -151,7 +151,6 @@
                             MessageLevel,
                             const String& message,
                             SourceLocation*) override;
-  void PostMessageToPageInspector(int session_id, const String&) override;
   void DidCreateWorkerGlobalScope(WorkerOrWorkletGlobalScope*) override;
   void DidInitializeWorkerContext() override;
   void DidLoadInstalledScript() override;
diff --git a/third_party/blink/renderer/modules/webaudio/audio_worklet_global_scope_test.cc b/third_party/blink/renderer/modules/webaudio/audio_worklet_global_scope_test.cc
index ec9795c..1f04dd2d 100644
--- a/third_party/blink/renderer/modules/webaudio/audio_worklet_global_scope_test.cc
+++ b/third_party/blink/renderer/modules/webaudio/audio_worklet_global_scope_test.cc
@@ -28,7 +28,6 @@
 #include "third_party/blink/renderer/core/testing/page_test_base.h"
 #include "third_party/blink/renderer/core/workers/global_scope_creation_params.h"
 #include "third_party/blink/renderer/core/workers/worker_backing_thread.h"
-#include "third_party/blink/renderer/core/workers/worker_inspector_proxy.h"
 #include "third_party/blink/renderer/core/workers/worker_reporting_proxy.h"
 #include "third_party/blink/renderer/core/workers/worklet_module_responses_map.h"
 #include "third_party/blink/renderer/modules/webaudio/audio_buffer.h"
@@ -77,8 +76,7 @@
             OriginTrialContext::GetTokens(document).get(),
             base::UnguessableToken::Create(), nullptr /* worker_settings */,
             kV8CacheOptionsDefault, new WorkletModuleResponsesMap),
-        base::nullopt, WorkerInspectorProxy::PauseOnWorkerStart::kDontPause,
-        ParentExecutionContextTaskRunners::Create());
+        base::nullopt, nullptr, ParentExecutionContextTaskRunners::Create());
     return thread;
   }
 
diff --git a/third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc b/third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc
index 076dbbf..25a3db18 100644
--- a/third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc
+++ b/third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc
@@ -20,7 +20,6 @@
 #include "third_party/blink/renderer/core/testing/page_test_base.h"
 #include "third_party/blink/renderer/core/workers/global_scope_creation_params.h"
 #include "third_party/blink/renderer/core/workers/worker_backing_thread.h"
-#include "third_party/blink/renderer/core/workers/worker_inspector_proxy.h"
 #include "third_party/blink/renderer/core/workers/worker_or_worklet_global_scope.h"
 #include "third_party/blink/renderer/core/workers/worker_reporting_proxy.h"
 #include "third_party/blink/renderer/core/workers/worklet_module_responses_map.h"
@@ -61,8 +60,7 @@
             OriginTrialContext::GetTokens(document).get(),
             base::UnguessableToken::Create(), nullptr /* worker_settings */,
             kV8CacheOptionsDefault, new WorkletModuleResponsesMap),
-        base::nullopt, WorkerInspectorProxy::PauseOnWorkerStart::kDontPause,
-        ParentExecutionContextTaskRunners::Create());
+        base::nullopt, nullptr, ParentExecutionContextTaskRunners::Create());
     return thread;
   }
 
diff --git a/third_party/blink/renderer/modules/worklet/animation_and_paint_worklet_thread_test.cc b/third_party/blink/renderer/modules/worklet/animation_and_paint_worklet_thread_test.cc
index 9553781..831b459 100644
--- a/third_party/blink/renderer/modules/worklet/animation_and_paint_worklet_thread_test.cc
+++ b/third_party/blink/renderer/modules/worklet/animation_and_paint_worklet_thread_test.cc
@@ -20,7 +20,6 @@
 #include "third_party/blink/renderer/core/workers/global_scope_creation_params.h"
 #include "third_party/blink/renderer/core/workers/parent_execution_context_task_runners.h"
 #include "third_party/blink/renderer/core/workers/worker_backing_thread.h"
-#include "third_party/blink/renderer/core/workers/worker_inspector_proxy.h"
 #include "third_party/blink/renderer/core/workers/worker_or_worklet_global_scope.h"
 #include "third_party/blink/renderer/core/workers/worker_reporting_proxy.h"
 #include "third_party/blink/renderer/core/workers/worklet_module_responses_map.h"
@@ -75,8 +74,7 @@
             OriginTrialContext::GetTokens(document).get(),
             base::UnguessableToken::Create(), nullptr /* worker_settings */,
             kV8CacheOptionsDefault, new WorkletModuleResponsesMap),
-        base::nullopt, WorkerInspectorProxy::PauseOnWorkerStart::kDontPause,
-        ParentExecutionContextTaskRunners::Create());
+        base::nullopt, nullptr, ParentExecutionContextTaskRunners::Create());
     return thread;
   }
 
diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc
index 8a59fbb..e719aa8d 100644
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc
@@ -1004,9 +1004,9 @@
     }
   }
 
-  // Ensure we have at least one run for StartIndexForResult().
-  if (UNLIKELY(result->runs_.IsEmpty() && start))
-    result->InsertRunForIndex(start);
+  // Ensure |start_index_| is updated even when no runs were inserted.
+  if (UNLIKELY(result->runs_.IsEmpty()))
+    result->start_index_ = start;
 
 #if DCHECK_IS_ON()
   if (result)
diff --git a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper_test.cc b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper_test.cc
index a6c267b..a70a563 100644
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper_test.cc
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper_test.cc
@@ -533,13 +533,22 @@
   EXPECT_EQ(result->Bounds(), composite_result->Bounds());
 }
 
-TEST_P(ShapeParameterTest, MissingGlyph) {
-  // U+FFF0 is not assigned as of Unicode 10.0.
-  String string(
-      u"\uFFF0"
-      u"Hello");
+class ShapeStringTest : public HarfBuzzShaperTest,
+                        public testing::WithParamInterface<const char16_t*> {};
+
+INSTANTIATE_TEST_CASE_P(HarfBuzzShaperTest,
+                        ShapeStringTest,
+                        testing::Values(
+                            // U+FFF0 is not assigned as of Unicode 10.0.
+                            u"\uFFF0",
+                            u"\uFFF0Hello",
+                            // U+00AD SOFT HYPHEN often does not have glyphs.
+                            u"\u00AD"));
+
+TEST_P(ShapeStringTest, MissingGlyph) {
+  String string(GetParam());
   HarfBuzzShaper shaper(string);
-  scoped_refptr<ShapeResult> result = ShapeWithParameter(&shaper);
+  scoped_refptr<ShapeResult> result = shaper.Shape(&font, TextDirection::kLtr);
   EXPECT_EQ(0u, result->StartIndexForResult());
   EXPECT_EQ(string.length(), result->EndIndexForResult());
 }
diff --git a/third_party/blink/renderer/platform/fonts/shaping/shape_result.cc b/third_party/blink/renderer/platform/fonts/shaping/shape_result.cc
index 1c84a168..491bf5c4 100644
--- a/third_party/blink/renderer/platform/fonts/shaping/shape_result.cc
+++ b/third_party/blink/renderer/platform/fonts/shaping/shape_result.cc
@@ -1219,18 +1219,6 @@
   UpdateStartIndex();
 }
 
-// Insert a |RunInfo| without glyphs. |StartIndexForResult()| needs a run to
-// compute the start character index. When all glyphs are missing, this function
-// synthesize a run without glyphs.
-void ShapeResult::InsertRunForIndex(unsigned start_character_index) {
-  DCHECK(runs_.IsEmpty());
-  runs_.push_back(std::make_unique<RunInfo>(
-      primary_font_.get(), !Rtl() ? HB_DIRECTION_LTR : HB_DIRECTION_RTL,
-      CanvasRotationInVertical::kRegular, HB_SCRIPT_UNKNOWN,
-      start_character_index, 0, num_characters_));
-  UpdateStartIndex();
-}
-
 ShapeResult::RunInfo* ShapeResult::InsertRunForTesting(
     unsigned start_index,
     unsigned num_characters,
diff --git a/third_party/blink/renderer/platform/fonts/shaping/shape_result.h b/third_party/blink/renderer/platform/fonts/shaping/shape_result.h
index 0364e391..d8f986f1 100644
--- a/third_party/blink/renderer/platform/fonts/shaping/shape_result.h
+++ b/third_party/blink/renderer/platform/fonts/shaping/shape_result.h
@@ -389,7 +389,6 @@
                  unsigned num_glyphs,
                  hb_buffer_t*);
   void InsertRun(std::unique_ptr<ShapeResult::RunInfo>);
-  void InsertRunForIndex(unsigned start_character_index);
   void ReorderRtlRuns(unsigned run_size_before);
   unsigned ComputeStartIndex() const;
   void UpdateStartIndex();
diff --git a/third_party/blink/renderer/platform/graphics/picture_snapshot.cc b/third_party/blink/renderer/platform/graphics/picture_snapshot.cc
index 20da318..6da2f942 100644
--- a/third_party/blink/renderer/platform/graphics/picture_snapshot.cc
+++ b/third_party/blink/renderer/platform/graphics/picture_snapshot.cc
@@ -59,8 +59,7 @@
   pictures.ReserveCapacity(tiles.size());
   FloatRect union_rect;
   for (const auto& tile_stream : tiles) {
-    sk_sp<SkPicture> picture = SkPicture::MakeFromData(
-        tile_stream->data.begin(), tile_stream->data.size());
+    sk_sp<SkPicture> picture = std::move(tile_stream->picture);
     if (!picture)
       return nullptr;
     FloatRect cull_rect(picture->cullRect());
diff --git a/third_party/blink/renderer/platform/graphics/picture_snapshot.h b/third_party/blink/renderer/platform/graphics/picture_snapshot.h
index aa9cbb1..35565acf 100644
--- a/third_party/blink/renderer/platform/graphics/picture_snapshot.h
+++ b/third_party/blink/renderer/platform/graphics/picture_snapshot.h
@@ -52,7 +52,7 @@
  public:
   struct TilePictureStream : RefCounted<TilePictureStream> {
     FloatPoint layer_offset;
-    Vector<char> data;
+    sk_sp<SkPicture> picture;
   };
 
   static scoped_refptr<PictureSnapshot> Load(
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
index a336971..2b003eb2 100644
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -131,7 +131,6 @@
     },
     {
       name: "BlinkGenPropertyTrees",
-      status: "experimental",
     },
     {
       name: "BlinkRuntimeCallStats",
diff --git a/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage.py b/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage.py
index 11e77b1..929c0e4 100755
--- a/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage.py
+++ b/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage.py
@@ -155,6 +155,7 @@
             # Feature list checking.
             'base::Feature.*',
             'base::FEATURE_.+',
+            'features::.+',
 
             # PartitionAlloc
             'base::PartitionFree',
diff --git a/tools/metrics/actions/actions.xml b/tools/metrics/actions/actions.xml
index a7cfb34c..45fae30 100644
--- a/tools/metrics/actions/actions.xml
+++ b/tools/metrics/actions/actions.xml
@@ -19858,6 +19858,14 @@
   </description>
 </action>
 
+<action name="UI_DevTools_Connect">
+  <owner>weili@chromium.org</owner>
+  <description>
+    Records when a user connects to a UI DevTools HTTP server, i.e., by clicking
+    on the 'inspect' link on chrome://inspect/#other.
+  </description>
+</action>
+
 <action name="Underline">
   <owner>Please list the metric's owners. Add more owner tags as needed.</owner>
   <description>Please enter the description of this user action.</description>
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml
index 37ea0f40..47d7cdd 100644
--- a/tools/metrics/histograms/enums.xml
+++ b/tools/metrics/histograms/enums.xml
@@ -29198,7 +29198,6 @@
   <int value="-1536293422" label="SharedArrayBuffer:enabled"/>
   <int value="-1536242739" label="security-chip"/>
   <int value="-1535758690" label="AutoplayIgnoreWebAudio:disabled"/>
-  <int value="-1533258008" label="CalculateNativeWinOcclusion:enabled"/>
   <int value="-1532035450" label="DragTabsInTabletMode:disabled"/>
   <int value="-1532014193" label="disable-encryption-migration"/>
   <int value="-1528455406" label="OmniboxPedalSuggestions:enabled"/>
@@ -31093,7 +31092,6 @@
   <int value="2043321329" label="OfflinePagesPrefetchingUI:disabled"/>
   <int value="2056572020" label="EnableUsernameCorrection:disabled"/>
   <int value="2058283872" label="CCTModuleCache:disabled"/>
-  <int value="2058439723" label="CalculateNativeWinOcclusion:disabled"/>
   <int value="2059322877" label="new-avatar-menu"/>
   <int value="2063091429" label="OfflinePagesSharing:enabled"/>
   <int value="2067634730" label="LsdPermissionPrompt:disabled"/>
@@ -48833,9 +48831,9 @@
 
 <enum name="TemporaryReferenceRemovedReason">
   <int value="0" label="Embedded"/>
-  <int value="1" label="Dropped"/>
+  <int value="1" label="Dropped (Obsolete)"/>
   <int value="2" label="Skipped"/>
-  <int value="3" label="Invalidated"/>
+  <int value="3" label="Invalidated (Obsolete)"/>
   <int value="4" label="Expired"/>
 </enum>
 
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index a28491af..6b24c67 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -98140,9 +98140,6 @@
     milliseconds.
 
     Desktop: This also takes into account user interaction and audio events.
-    Starting from M55 the session length is recorded by discounting for default
-    inactivity timeout. Also, until M69, there was a bug that caused
-    double-counting of some sessions.
 
     Android: This histogram isn't logged on Android. See instead
     Session.TotalDuration.
diff --git a/tools/perf/expectations.config b/tools/perf/expectations.config
index 9e5404e1..c9718a6e 100644
--- a/tools/perf/expectations.config
+++ b/tools/perf/expectations.config
@@ -269,6 +269,7 @@
 crbug.com/843547 [ Android_Go ] system_health.memory_mobile/background:news:nytimes [ Skip ]
 crbug.com/852888 [ Nexus_5X ] system_health.memory_mobile/background:news:nytimes [ Skip ]
 crbug.com/859500 [ Nexus_5X ] system_health.memory_mobile/browse:social:tumblr_infinite_scroll [ Skip ]
+crbug.com/899856 [ Android_Go ] system_health.memory_mobile/browse:social:tumblr_infinite_scroll [ Skip ]
 crbug.com/871708 [ Android_Webview ] system_health.memory_mobile/browse:social:facebook_infinite_scroll [ Skip ]
 crbug.com/865400 [ Pixel_2 ] system_health.memory_mobile/background:news:nytimes [ Skip ]
 crbug.com/877648 [ Android ] system_health.memory_mobile/long_running:tools:gmail-background [ Skip ]
diff --git a/ui/accessibility/ax_role_properties.cc b/ui/accessibility/ax_role_properties.cc
index 70c7472..0c851bb 100644
--- a/ui/accessibility/ax_role_properties.cc
+++ b/ui/accessibility/ax_role_properties.cc
@@ -333,4 +333,14 @@
   }
 }
 
+bool IsStaticList(const ax::mojom::Role role) {
+  switch (role) {
+    case ax::mojom::Role::kList:
+    case ax::mojom::Role::kDescriptionList:
+      return true;
+    default:
+      return false;
+  }
+}
+
 }  // namespace ui
diff --git a/ui/accessibility/ax_role_properties.h b/ui/accessibility/ax_role_properties.h
index 5b9232c..c6a80263 100644
--- a/ui/accessibility/ax_role_properties.h
+++ b/ui/accessibility/ax_role_properties.h
@@ -83,6 +83,8 @@
 // Automation.
 AX_EXPORT bool IsUIASelectable(const ax::mojom::Role role);
 
+AX_EXPORT bool IsStaticList(const ax::mojom::Role role);
+
 }  // namespace ui
 
 #endif  // UI_ACCESSIBILITY_AX_ROLE_PROPERTIES_H_
diff --git a/ui/android/java/res/values/dimens.xml b/ui/android/java/res/values/dimens.xml
index 7400c5a..51065cc 100644
--- a/ui/android/java/res/values/dimens.xml
+++ b/ui/android/java/res/values/dimens.xml
@@ -4,13 +4,18 @@
      Use of this source code is governed by a BSD-style license that can be
      found in the LICENSE file.
 -->
-<resources>
+<resources xmlns:tools="http://schemas.android.com/tools">
     <!-- Common text sizes -->
     <dimen name="headline_size">22sp</dimen>
     <dimen name="text_size_large">16sp</dimen>
     <dimen name="text_size_medium">14sp</dimen>
     <dimen name="text_size_small">12sp</dimen>
 
+    <dimen name="headline_size_leading" tools:ignore="UnusedResources">28sp</dimen>
+    <dimen name="text_size_large_leading" tools:ignore="UnusedResources">24sp</dimen>
+    <dimen name="text_size_medium_leading" tools:ignore="UnusedResources">20sp</dimen>
+    <dimen name="text_size_small_leading" tools:ignore="UnusedResources">16sp</dimen>
+
     <!-- Common alpha values -->
     <item name="default_disabled_alpha" format="float" type="dimen">0.38</item>
     <item name="default_pressed_alpha" format="float" type="dimen">0.10</item>
diff --git a/ui/aura/BUILD.gn b/ui/aura/BUILD.gn
index 45635fc..1b39f76 100644
--- a/ui/aura/BUILD.gn
+++ b/ui/aura/BUILD.gn
@@ -138,8 +138,6 @@
     "mus/window_tree_client_delegate.cc",
     "mus/window_tree_host_mus.cc",
     "mus/window_tree_host_mus_init_params.cc",
-    "native_window_occlusion_tracker_win.cc",
-    "native_window_occlusion_tracker_win.h",
     "null_window_targeter.cc",
     "scoped_keyboard_hook.cc",
     "scoped_simple_keyboard_hook.cc",
@@ -157,12 +155,6 @@
     "window_tree_host_platform.cc",
   ]
 
-  # aura_interactive_ui_tests needs access to native_window_occlusion_tracker.h.
-  friend = [
-    ":aura_interactive_ui_tests",
-    ":aura_unittests",
-  ]
-
   defines = [ "AURA_IMPLEMENTATION" ]
 
   deps = [
@@ -402,10 +394,6 @@
     "window_unittest.cc",
   ]
 
-  if (is_win) {
-    sources += [ "native_window_occlusion_tracker_unittest.cc" ]
-  }
-
   deps = [
     ":test_support",
     "//base/test:test_support",
@@ -436,29 +424,3 @@
     "//third_party/mesa_headers",
   ]
 }
-
-# This target is added as a dependency of browser interactive_ui_tests. It must
-# be source_set, otherwise the linker will drop the tests as dead code.
-source_set("aura_interactive_ui_tests") {
-  testonly = true
-  if (is_win) {
-    sources = [
-      "native_window_occlusion_tracker_win_interactive_test.cc",
-    ]
-
-    deps = [
-      ":aura",
-      ":test_support",
-      "//base/test:test_support",
-      "//net",
-      "//testing/gtest",
-      "//ui/base/ime:ime",
-      "//ui/display:display",
-      "//ui/gfx",
-      "//ui/gfx/geometry",
-      "//ui/gl:test_support",
-      "//ui/gl/init",
-      "//ui/views:views",
-    ]
-  }
-}
diff --git a/ui/aura/DEPS b/ui/aura/DEPS
index b2ad0cd2..263ea23 100644
--- a/ui/aura/DEPS
+++ b/ui/aura/DEPS
@@ -20,7 +20,6 @@
   "+ui/display",
   "+ui/events",
   "+ui/gfx",
-  "+ui/gl/test",
   "+ui/metro_viewer",  # TODO(beng): investigate moving remote_root_window_host
                        #             to ui/metro_viewer.
   "+ui/ozone/public",
diff --git a/ui/aura/native_window_occlusion_tracker_unittest.cc b/ui/aura/native_window_occlusion_tracker_unittest.cc
deleted file mode 100644
index f34b36a..0000000
--- a/ui/aura/native_window_occlusion_tracker_unittest.cc
+++ /dev/null
@@ -1,158 +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 "ui/aura/native_window_occlusion_tracker_win.h"
-
-#include <winuser.h>
-
-#include "base/win/scoped_gdi_object.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/aura/test/aura_test_base.h"
-#include "ui/gfx/geometry/rect.h"
-#include "ui/gfx/win/window_impl.h"
-
-namespace aura {
-
-// Test wrapper around native window HWND.
-class TestNativeWindow : public gfx::WindowImpl {
- public:
-  TestNativeWindow() {}
-  ~TestNativeWindow() override;
-
- private:
-  // Overridden from gfx::WindowImpl:
-  BOOL ProcessWindowMessage(HWND window,
-                            UINT message,
-                            WPARAM w_param,
-                            LPARAM l_param,
-                            LRESULT& result,
-                            DWORD msg_map_id) override {
-    return FALSE;  // Results in DefWindowProc().
-  }
-
-  DISALLOW_COPY_AND_ASSIGN(TestNativeWindow);
-};
-
-TestNativeWindow::~TestNativeWindow() {
-  if (hwnd())
-    DestroyWindow(hwnd());
-}
-
-// This class currently tests the behavior of
-// NativeWindowOcclusionTrackerWin::IsWindowVisibleAndFullyOpaque with hwnds
-// with various attributes (e.g., minimized, transparent, etc).
-class NativeWindowOcclusionTrackerTest : public test::AuraTestBase {
- public:
-  NativeWindowOcclusionTrackerTest() {}
-
-  TestNativeWindow* native_win() { return native_win_.get(); }
-
-  HWND CreateNativeWindow(DWORD ex_style) {
-    native_win_ = std::make_unique<TestNativeWindow>();
-    native_win_->set_window_style(WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN);
-    native_win_->set_window_ex_style(ex_style);
-    gfx::Rect bounds(0, 0, 100, 100);
-    native_win_->Init(nullptr, bounds);
-    HWND hwnd = native_win_->hwnd();
-    base::win::ScopedRegion region(CreateRectRgn(0, 0, 0, 0));
-    if (GetWindowRgn(hwnd, region.get()) == COMPLEXREGION) {
-      // On Windows 7, the newly created window has a complex region, which
-      // means it will be ignored during the occlusion calculation. So, force
-      // it to have a simple region so that we get test coverage on win 7.
-      RECT bounding_rect;
-      EXPECT_TRUE(GetWindowRect(hwnd, &bounding_rect));
-      base::win::ScopedRegion rectangular_region(
-          CreateRectRgnIndirect(&bounding_rect));
-      SetWindowRgn(hwnd, rectangular_region.get(), /*redraw=*/TRUE);
-    }
-    ShowWindow(hwnd, SW_SHOWNORMAL);
-    EXPECT_TRUE(UpdateWindow(hwnd));
-    return hwnd;
-  }
-
-  // Wrapper around IsWindowVisibleAndFullyOpaque so only the test class
-  // needs to be a friend of NativeWindowOcclusionTrackerWin.
-  bool CheckWindowVisibleAndFullyOpaque(HWND hwnd, gfx::Rect* win_rect) {
-    bool ret = NativeWindowOcclusionTrackerWin::IsWindowVisibleAndFullyOpaque(
-        hwnd, win_rect);
-    // In general, if IsWindowVisibleAndFullyOpaque returns false, the
-    // returned rect should not be altered.
-    if (!ret)
-      EXPECT_EQ(*win_rect, gfx::Rect(0, 0, 0, 0));
-    return ret;
-  }
-
- private:
-  std::unique_ptr<TestNativeWindow> native_win_;
-
-  DISALLOW_COPY_AND_ASSIGN(NativeWindowOcclusionTrackerTest);
-};
-
-TEST_F(NativeWindowOcclusionTrackerTest, VisibleOpaqueWindow) {
-  HWND hwnd = CreateNativeWindow(/*ex_style=*/0);
-  gfx::Rect returned_rect;
-  // Normal windows should be visible.
-  EXPECT_TRUE(CheckWindowVisibleAndFullyOpaque(hwnd, &returned_rect));
-
-  // Check that the returned rect == the actual window rect of the hwnd.
-  RECT win_rect;
-  ASSERT_TRUE(GetWindowRect(hwnd, &win_rect));
-  EXPECT_EQ(returned_rect, gfx::Rect(win_rect));
-}
-
-TEST_F(NativeWindowOcclusionTrackerTest, MinimizedWindow) {
-  HWND hwnd = CreateNativeWindow(/*ex_style=*/0);
-  gfx::Rect win_rect;
-  ShowWindow(hwnd, SW_MINIMIZE);
-  // Minimized windows are not considered visible.
-  EXPECT_FALSE(CheckWindowVisibleAndFullyOpaque(hwnd, &win_rect));
-}
-
-TEST_F(NativeWindowOcclusionTrackerTest, TransparentWindow) {
-  HWND hwnd = CreateNativeWindow(WS_EX_TRANSPARENT);
-  gfx::Rect win_rect;
-  // Transparent windows are not considered visible and opaque.
-  EXPECT_FALSE(CheckWindowVisibleAndFullyOpaque(hwnd, &win_rect));
-}
-
-TEST_F(NativeWindowOcclusionTrackerTest, ToolWindow) {
-  HWND hwnd = CreateNativeWindow(WS_EX_TOOLWINDOW);
-  gfx::Rect win_rect;
-  // Tool windows are not considered visible and opaque.
-  EXPECT_FALSE(CheckWindowVisibleAndFullyOpaque(hwnd, &win_rect));
-}
-
-TEST_F(NativeWindowOcclusionTrackerTest, LayeredAlphaWindow) {
-  HWND hwnd = CreateNativeWindow(WS_EX_LAYERED);
-  gfx::Rect win_rect;
-  BYTE alpha = 1;
-  DWORD flags = LWA_ALPHA;
-  COLORREF color_ref = RGB(1, 1, 1);
-  SetLayeredWindowAttributes(hwnd, color_ref, alpha, flags);
-  // Layered windows with alpha < 255 are not considered visible and opaque.
-  EXPECT_FALSE(CheckWindowVisibleAndFullyOpaque(hwnd, &win_rect));
-}
-
-TEST_F(NativeWindowOcclusionTrackerTest, LayeredNonAlphaWindow) {
-  HWND hwnd = CreateNativeWindow(WS_EX_LAYERED);
-  gfx::Rect win_rect;
-  BYTE alpha = 1;
-  DWORD flags = 0;
-  COLORREF color_ref = RGB(1, 1, 1);
-  SetLayeredWindowAttributes(hwnd, color_ref, alpha, flags);
-  // Layered non alpha windows are considered visible and opaque.
-  EXPECT_TRUE(CheckWindowVisibleAndFullyOpaque(hwnd, &win_rect));
-}
-
-TEST_F(NativeWindowOcclusionTrackerTest, ComplexRegionWindow) {
-  HWND hwnd = CreateNativeWindow(/*ex_style=*/0);
-  gfx::Rect win_rect;
-  // Create a region with rounded corners, which should be a complex region.
-  base::win::ScopedRegion region(CreateRoundRectRgn(1, 1, 100, 100, 5, 5));
-  SetWindowRgn(hwnd, region.get(), /*redraw=*/TRUE);
-  // Windows with complex regions are not considered visible and fully opaque.
-  EXPECT_FALSE(CheckWindowVisibleAndFullyOpaque(hwnd, &win_rect));
-}
-
-}  // namespace aura
diff --git a/ui/aura/native_window_occlusion_tracker_win.cc b/ui/aura/native_window_occlusion_tracker_win.cc
deleted file mode 100644
index 0dddd3d..0000000
--- a/ui/aura/native_window_occlusion_tracker_win.cc
+++ /dev/null
@@ -1,536 +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 "ui/aura/native_window_occlusion_tracker_win.h"
-
-#include <memory>
-
-#include "base/memory/scoped_refptr.h"
-#include "base/task/post_task.h"
-#include "base/task/task_traits.h"
-#include "base/threading/sequenced_task_runner_handle.h"
-#include "base/threading/thread_task_runner_handle.h"
-#include "base/win/scoped_gdi_object.h"
-#include "ui/aura/window_tree_host.h"
-
-namespace aura {
-
-namespace {
-
-// ~16 ms = time between frames when frame rate is 60 FPS.
-const base::TimeDelta kUpdateOcclusionDelay =
-    base::TimeDelta::FromMilliseconds(16);
-
-NativeWindowOcclusionTrackerWin* g_tracker = nullptr;
-
-}  // namespace
-
-NativeWindowOcclusionTrackerWin*
-NativeWindowOcclusionTrackerWin::GetOrCreateInstance() {
-  if (!g_tracker)
-    g_tracker = new NativeWindowOcclusionTrackerWin();
-
-  return g_tracker;
-}
-
-void NativeWindowOcclusionTrackerWin::Enable(Window* window) {
-  DCHECK(window->IsRootWindow());
-  if (window->HasObserver(this)) {
-    DCHECK(FALSE) << "window shouldn't already be observing occlusion tracker";
-    return;
-  }
-  // Add this as an observer so that we can be notified
-  // when it's no longer true that all windows are minimized, and when the
-  // window is destroyed.
-  HWND root_window_hwnd = window->GetHost()->GetAcceleratedWidget();
-  window->AddObserver(this);
-  // Remember this mapping from hwnd to Window*.
-  hwnd_root_window_map_[root_window_hwnd] = window;
-  // Notify the occlusion thread of the new HWND to track.
-  update_occlusion_task_runner_->PostTask(
-      FROM_HERE,
-      base::BindOnce(
-          &WindowOcclusionCalculator::EnableOcclusionTrackingForWindow,
-          base::Unretained(occlusion_calculator_.get()), root_window_hwnd));
-}
-
-void NativeWindowOcclusionTrackerWin::Disable(Window* window) {
-  DCHECK(window->IsRootWindow());
-  HWND root_window_hwnd = window->GetHost()->GetAcceleratedWidget();
-  // Check that the root_window_hwnd doesn't get cleared before this is called.
-  DCHECK(root_window_hwnd);
-  hwnd_root_window_map_.erase(root_window_hwnd);
-  window->RemoveObserver(this);
-  update_occlusion_task_runner_->PostTask(
-      FROM_HERE,
-      base::BindOnce(
-          &WindowOcclusionCalculator::DisableOcclusionTrackingForWindow,
-          base::Unretained(occlusion_calculator_.get()), root_window_hwnd));
-}
-
-void NativeWindowOcclusionTrackerWin::OnWindowVisibilityChanged(Window* window,
-                                                                bool visible) {
-  if (!window->IsRootWindow())
-    return;
-  window->GetHost()->SetNativeWindowOcclusionState(
-      visible ? Window::OcclusionState::UNKNOWN
-              : Window::OcclusionState::HIDDEN);
-  update_occlusion_task_runner_->PostTask(
-      FROM_HERE,
-      base::BindOnce(&WindowOcclusionCalculator::HandleVisibilityChanged,
-                     base::Unretained(occlusion_calculator_.get()), visible));
-}
-
-void NativeWindowOcclusionTrackerWin::OnWindowDestroying(Window* window) {
-  Disable(window);
-}
-
-NativeWindowOcclusionTrackerWin::NativeWindowOcclusionTrackerWin()
-    :  // Use a COMSTATaskRunner so that registering and unregistering
-       // event hooks will happen on the same thread, as required by Windows,
-       // and the task runner will have a message loop to call
-       // EventHookCallback.
-      update_occlusion_task_runner_(base::CreateCOMSTATaskRunnerWithTraits(
-          {base::MayBlock(),
-           // This may be needed to determine that a window is no longer
-           // occluded.
-           base::TaskPriority::USER_VISIBLE,
-           // Occlusion calculation doesn't need to happen on shutdown.
-           // event hooks should also be cleaned up by Windows.
-           base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN})) {
-  occlusion_calculator_ = std::make_unique<WindowOcclusionCalculator>(
-      update_occlusion_task_runner_, base::SequencedTaskRunnerHandle::Get());
-}
-
-NativeWindowOcclusionTrackerWin::~NativeWindowOcclusionTrackerWin() {
-  // This shouldn't be reached, because if it is, |occlusion_calculator_| will
-  // be deleted on the ui thread, which is problematic if there tasks scheduled
-  // on the background thread.
-  NOTREACHED();
-}
-
-// static
-bool NativeWindowOcclusionTrackerWin::IsWindowVisibleAndFullyOpaque(
-    HWND hwnd,
-    gfx::Rect* window_rect) {
-  // Filter out windows that are not “visible”, IsWindowVisible().
-  if (!IsWindow(hwnd) || !IsWindowVisible(hwnd))
-    return false;
-
-  // Filter out minimized windows.
-  if (IsIconic(hwnd))
-    return false;
-
-  LONG ex_styles = GetWindowLong(hwnd, GWL_EXSTYLE);
-
-  // Filter out “transparent” windows, windows where the mouse clicks fall
-  // through them.
-  if (ex_styles & WS_EX_TRANSPARENT)
-    return false;
-
-  // Filter out “tool windows”, which are floating windows that do not appear on
-  // the taskbar or ALT-TAB. Floating windows can have larger window rectangles
-  // than what is visible to the user, so by filtering them out we will avoid
-  // incorrectly marking native windows as occluded.
-  if (ex_styles & WS_EX_TOOLWINDOW)
-    return false;
-
-  // Filter out layered windows that are not opaque or that set a transparency
-  // colorkey.
-  if (ex_styles & WS_EX_LAYERED) {
-    BYTE alpha;
-    DWORD flags;
-    if (GetLayeredWindowAttributes(hwnd, nullptr, &alpha, &flags)) {
-      if (flags & LWA_ALPHA && alpha < 255)
-        return false;
-      if (flags & LWA_COLORKEY)
-        return false;
-    }
-  }
-
-  // Filter out windows that do not have a simple rectangular region.
-  base::win::ScopedRegion region(CreateRectRgn(0, 0, 0, 0));
-  if (GetWindowRgn(hwnd, region.get()) == COMPLEXREGION)
-    return false;
-
-  RECT win_rect;
-  // Filter out windows that take up zero area. The call to GetWindowRect is one
-  // of the most expensive parts of this function, so it is last.
-  if (!GetWindowRect(hwnd, &win_rect))
-    return false;
-  if (IsRectEmpty(&win_rect))
-    return false;
-  *window_rect = gfx::Rect(win_rect);
-  return true;
-}
-
-void NativeWindowOcclusionTrackerWin::UpdateOcclusionState(
-    const base::flat_map<HWND, Window::OcclusionState>&
-        root_window_hwnds_occlusion_state) {
-  for (const auto& root_window_pair : root_window_hwnds_occlusion_state) {
-    auto it = hwnd_root_window_map_.find(root_window_pair.first);
-    // The window was destroyed while processing occlusion.
-    if (it == hwnd_root_window_map_.end())
-      continue;
-    Window* root_window = it->second;
-    // Check Window::IsVisible here, on the UI thread, because it can't be
-    // checked on the occlusion calculation thread.
-    it->second->GetHost()->SetNativeWindowOcclusionState(
-        !root_window->IsVisible() ? Window::OcclusionState::HIDDEN
-                                  : root_window_pair.second);
-  }
-}
-
-NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::
-    WindowOcclusionCalculator(
-        scoped_refptr<base::SequencedTaskRunner> task_runner,
-        scoped_refptr<base::SequencedTaskRunner> ui_thread_task_runner)
-    : task_runner_(task_runner), ui_thread_task_runner_(ui_thread_task_runner) {
-  DETACH_FROM_SEQUENCE(sequence_checker_);
-}
-
-NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::
-    ~WindowOcclusionCalculator() {
-  DCHECK(global_event_hooks_.empty());
-}
-
-void NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::
-    EnableOcclusionTrackingForWindow(HWND hwnd) {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  NativeWindowOcclusionState default_state;
-  root_window_hwnds_occlusion_state_[hwnd] = default_state;
-  if (global_event_hooks_.empty())
-    RegisterEventHooks();
-
-  // Schedule an occlusion calculation so that the newly tracked window does
-  // not have a stale occlusion status.
-  ScheduleOcclusionCalculationIfNeeded();
-}
-
-void NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::
-    DisableOcclusionTrackingForWindow(HWND hwnd) {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  root_window_hwnds_occlusion_state_.erase(hwnd);
-  if (root_window_hwnds_occlusion_state_.empty()) {
-    UnregisterEventHooks();
-    if (occlusion_update_timer_.IsRunning())
-      occlusion_update_timer_.Stop();
-  }
-}
-
-void NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::
-    HandleVisibilityChanged(bool visible) {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  // May have gone from having no visible windows to having one, in
-  // which case we need to register event hooks.
-  if (visible)
-    MaybeRegisterEventHooks();
-}
-
-void NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::
-    MaybeRegisterEventHooks() {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  if (global_event_hooks_.empty())
-    RegisterEventHooks();
-}
-
-// static
-void CALLBACK
-NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::EventHookCallback(
-    HWINEVENTHOOK hWinEventHook,
-    DWORD event,
-    HWND hwnd,
-    LONG idObject,
-    LONG idChild,
-    DWORD dwEventThread,
-    DWORD dwmsEventTime) {
-  g_tracker->occlusion_calculator_->ProcessEventHookCallback(event, hwnd,
-                                                             idObject, idChild);
-}
-
-// static
-BOOL CALLBACK NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::
-    ComputeNativeWindowOcclusionStatusCallback(HWND hwnd, LPARAM lParam) {
-  return g_tracker->occlusion_calculator_
-      ->ProcessComputeNativeWindowOcclusionStatusCallback(
-          hwnd, reinterpret_cast<base::flat_set<DWORD>*>(lParam));
-}
-
-// static
-BOOL CALLBACK NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::
-    UpdateVisibleWindowProcessIdsCallback(HWND hwnd, LPARAM lParam) {
-  g_tracker->occlusion_calculator_
-      ->ProcessUpdateVisibleWindowProcessIdsCallback(hwnd);
-  return TRUE;
-}
-
-void NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::
-    UpdateVisibleWindowProcessIds() {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  pids_for_location_change_hook_.clear();
-  EnumWindows(&UpdateVisibleWindowProcessIdsCallback, 0);
-}
-
-void NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::
-    ComputeNativeWindowOcclusionStatus() {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  if (root_window_hwnds_occlusion_state_.empty())
-    return;
-  // Set up initial conditions for occlusion calculation.
-  bool all_minimized = true;
-  for (auto& root_window_pair : root_window_hwnds_occlusion_state_) {
-    root_window_pair.second.unoccluded_region.setEmpty();
-    HWND hwnd = root_window_pair.first;
-
-    // IsIconic() checks for a minimized window. Immediately set the state of
-    // minimized windows to HIDDEN.
-    if (IsIconic(hwnd)) {
-      root_window_pair.second.occlusion_state = Window::OcclusionState::HIDDEN;
-    } else {
-      root_window_pair.second.occlusion_state = Window::OcclusionState::UNKNOWN;
-      RECT window_rect;
-      if (GetWindowRect(hwnd, &window_rect) != 0) {
-        root_window_pair.second.unoccluded_region =
-            SkRegion(SkIRect::MakeLTRB(window_rect.left, window_rect.top,
-                                       window_rect.right, window_rect.bottom));
-      }
-      // If call to GetWindowRect fails, window will be treated as occluded,
-      // because unoccluded_region will be empty.
-      all_minimized = false;
-    }
-  }
-  // Unregister event hooks if all native windows are minimized.
-  if (all_minimized) {
-    UnregisterEventHooks();
-  } else {
-    base::flat_set<DWORD> current_pids_with_visible_windows;
-    // Calculate unoccluded region if there is a non-minimized native window.
-    // Also compute |current_pids_with_visible_windows| as we enumerate
-    // the windows.
-    EnumWindows(&ComputeNativeWindowOcclusionStatusCallback,
-                reinterpret_cast<LPARAM>(&current_pids_with_visible_windows));
-    // Check if |pids_for_location_change_hook_| has any pids of processes
-    // currently without visible windows. If so, unhook the win event,
-    // remove the pid from |pids_for_location_change_hook_| and remove
-    // the corresponding event hook from |process_event_hooks_|.
-    base::flat_set<DWORD> pids_to_remove;
-    for (auto loc_change_pid : pids_for_location_change_hook_) {
-      if (current_pids_with_visible_windows.find(loc_change_pid) ==
-          current_pids_with_visible_windows.end()) {
-        // Remove the event hook from our map, and unregister the event hook.
-        // It's possible the eventhook will no longer be valid, but if we don't
-        // unregister the event hook, a process that toggles between having
-        // visible windows and not having visible windows could cause duplicate
-        // event hooks to get registered for the process.
-        UnhookWinEvent(process_event_hooks_[loc_change_pid]);
-        process_event_hooks_.erase(loc_change_pid);
-        pids_to_remove.insert(loc_change_pid);
-      }
-    }
-    if (!pids_to_remove.empty()) {
-      // EraseIf is O(n) so erase pids not found in one fell swoop.
-      base::EraseIf(pids_for_location_change_hook_,
-                    [&pids_to_remove](DWORD pid) {
-                      return pids_to_remove.find(pid) != pids_to_remove.end();
-                    });
-    }
-  }
-  // Determine new occlusion status and post a task to the browser ui
-  // thread to update the window occlusion state on the root windows.
-  base::flat_map<HWND, Window::OcclusionState> window_occlusion_states;
-
-  for (auto& root_window_pair : root_window_hwnds_occlusion_state_) {
-    Window::OcclusionState new_state;
-    if (root_window_pair.second.occlusion_state !=
-        Window::OcclusionState::UNKNOWN) {
-      new_state = root_window_pair.second.occlusion_state;
-    } else {
-      new_state = root_window_pair.second.unoccluded_region.isEmpty()
-                      ? Window::OcclusionState::OCCLUDED
-                      : Window::OcclusionState::VISIBLE;
-    }
-    window_occlusion_states[root_window_pair.first] = new_state;
-    root_window_pair.second.occlusion_state = new_state;
-  }
-  ui_thread_task_runner_->PostTask(
-      FROM_HERE,
-      base::BindOnce(&NativeWindowOcclusionTrackerWin::UpdateOcclusionState,
-                     base::Unretained(g_tracker), window_occlusion_states));
-}
-
-void NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::
-    ScheduleOcclusionCalculationIfNeeded() {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  if (!occlusion_update_timer_.IsRunning())
-    occlusion_update_timer_.Start(
-        FROM_HERE, kUpdateOcclusionDelay, this,
-        &WindowOcclusionCalculator::ComputeNativeWindowOcclusionStatus);
-}
-
-void NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::
-    RegisterGlobalEventHook(UINT event_min, UINT event_max) {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  HWINEVENTHOOK event_hook =
-      SetWinEventHook(event_min, event_max, nullptr, &EventHookCallback, 0, 0,
-                      WINEVENT_OUTOFCONTEXT);
-
-  global_event_hooks_.push_back(event_hook);
-}
-
-void NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::
-    RegisterEventHookForProcess(DWORD pid) {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  pids_for_location_change_hook_.insert(pid);
-  process_event_hooks_[pid] = SetWinEventHook(
-      EVENT_OBJECT_LOCATIONCHANGE, EVENT_OBJECT_LOCATIONCHANGE, nullptr,
-      &EventHookCallback, pid, 0, WINEVENT_OUTOFCONTEXT);
-}
-
-void NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::
-    RegisterEventHooks() {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  DCHECK(global_event_hooks_.empty());
-
-  // Detects native window move (drag) and resizing events.
-  RegisterGlobalEventHook(EVENT_SYSTEM_MOVESIZESTART, EVENT_SYSTEM_MOVESIZEEND);
-
-  // Detects native window minimize and restore from taskbar events.
-  RegisterGlobalEventHook(EVENT_SYSTEM_MINIMIZESTART, EVENT_SYSTEM_MINIMIZEEND);
-
-  // Detects foreground window changing.
-  RegisterGlobalEventHook(EVENT_SYSTEM_FOREGROUND, EVENT_SYSTEM_FOREGROUND);
-
-  // Detects object state changes, e.g., enable/disable state, native window
-  // maximize and native window restore events.
-  RegisterGlobalEventHook(EVENT_OBJECT_STATECHANGE, EVENT_OBJECT_STATECHANGE);
-
-  // Determine which subset of processes to set EVENT_OBJECT_LOCATIONCHANGE on
-  // because otherwise event throughput is very high, as it generates events
-  // for location changes of all objects, including the mouse moving on top of a
-  // window.
-  UpdateVisibleWindowProcessIds();
-  for (DWORD pid : pids_for_location_change_hook_)
-    RegisterEventHookForProcess(pid);
-}
-
-void NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::
-    UnregisterEventHooks() {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  for (HWINEVENTHOOK event_hook : global_event_hooks_)
-    UnhookWinEvent(event_hook);
-  global_event_hooks_.clear();
-
-  for (DWORD pid : pids_for_location_change_hook_)
-    UnhookWinEvent(process_event_hooks_[pid]);
-  process_event_hooks_.clear();
-
-  pids_for_location_change_hook_.clear();
-  window_is_moving_ = false;
-}
-
-bool NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::
-    ProcessComputeNativeWindowOcclusionStatusCallback(
-        HWND hwnd,
-        base::flat_set<DWORD>* current_pids_with_visible_windows) {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-
-  gfx::Rect window_rect;
-  // Check if |hwnd| is a root_window; if so, we're done figuring out
-  // if it's occluded because we've seen all the windows "over" it.
-  // TODO(davidbienvenu): Explore checking if occlusion state has been
-  // computed for all |root_window_hwnds_occlusion_state_|, and if so, skipping
-  // further oclcusion calculations. However, we still want to keep computing
-  // |current_pids_with_visible_windows_|, so this function always returns true.
-  for (auto& root_window_pair : root_window_hwnds_occlusion_state_) {
-    if (hwnd == root_window_pair.first) {
-      if (root_window_pair.second.occlusion_state ==
-          Window::OcclusionState::HIDDEN) {
-        break;
-      }
-
-      root_window_pair.second.occlusion_state =
-          root_window_pair.second.unoccluded_region.isEmpty()
-              ? Window::OcclusionState::OCCLUDED
-              : Window::OcclusionState::VISIBLE;
-      break;
-    }
-  }
-  if (!IsWindowVisibleAndFullyOpaque(hwnd, &window_rect))
-    return true;
-  // We are interested in this window, but are not currently hooking it with
-  // EVENT_OBJECT_LOCATION_CHANGE, so we need to hook it. We check
-  // this by seeing if its PID is in |process_event_hooks_|.
-  DWORD pid;
-  GetWindowThreadProcessId(hwnd, &pid);
-  current_pids_with_visible_windows->insert(pid);
-  if (!base::ContainsKey(process_event_hooks_, pid))
-    RegisterEventHookForProcess(pid);
-
-  SkRegion window_region(SkIRect::MakeLTRB(window_rect.x(), window_rect.y(),
-                                           window_rect.right(),
-                                           window_rect.bottom()));
-
-  for (auto& root_window_pair : root_window_hwnds_occlusion_state_) {
-    if (root_window_pair.second.occlusion_state !=
-        Window::OcclusionState::UNKNOWN)
-      continue;
-    if (!root_window_pair.second.unoccluded_region.op(
-            window_region, SkRegion::kDifference_Op)) {
-      root_window_pair.second.occlusion_state =
-          Window::OcclusionState::OCCLUDED;
-    }
-  }
-  return true;
-}
-
-void NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::
-    ProcessEventHookCallback(DWORD event,
-                             HWND hwnd,
-                             LONG idObject,
-                             LONG idChild) {
-  // Can't do DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_) here. See
-  // comment before call to PostTask below as to why.
-
-  // No need to calculate occlusion if a zero HWND generated the event. This
-  // happens if there is no window associated with the event, e.g., mouse move
-  // events.
-  if (!hwnd)
-    return;
-  // Don't continually calculate occlusion while a window is moving, but rather
-  // once at the beginning and once at the end.
-  if (event == EVENT_SYSTEM_MOVESIZESTART) {
-    // TODO(davidbienvenu): convert to DCHECK once we've confirmed in canary
-    // that this condition isn't met.
-    CHECK(!window_is_moving_);
-    window_is_moving_ = true;
-  } else if (event == EVENT_SYSTEM_MOVESIZEEND) {
-    window_is_moving_ = false;
-  } else if (window_is_moving_) {
-    return;
-  }
-  // ProcessEventHookCallback is called from the task_runner's PeekMessage
-  // call, on the task runner's thread, but before the task_tracker thread sets
-  // up the thread sequence. In order to prevent DCHECK failures with the
-  // |occlusion_update_timer_, we need to call
-  // ScheduleOcclusionCalculationIfNeeded from a task.
-  // See SchedulerWorkerCOMDelegate::GetWorkFromWindowsMessageQueue().
-  task_runner_->PostTask(
-      FROM_HERE,
-      base::BindOnce(
-          &WindowOcclusionCalculator::ScheduleOcclusionCalculationIfNeeded,
-          base::Unretained(this)));
-}
-
-void NativeWindowOcclusionTrackerWin::WindowOcclusionCalculator::
-    ProcessUpdateVisibleWindowProcessIdsCallback(HWND hwnd) {
-  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  gfx::Rect window_rect;
-  if (IsWindowVisibleAndFullyOpaque(hwnd, &window_rect)) {
-    DWORD pid;
-    GetWindowThreadProcessId(hwnd, &pid);
-    pids_for_location_change_hook_.insert(pid);
-  }
-}
-
-}  // namespace aura
diff --git a/ui/aura/native_window_occlusion_tracker_win.h b/ui/aura/native_window_occlusion_tracker_win.h
deleted file mode 100644
index 477e77a..0000000
--- a/ui/aura/native_window_occlusion_tracker_win.h
+++ /dev/null
@@ -1,217 +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 UI_AURA_NATIVE_WINDOW_OCCLUSION_TRACKER_WIN_H_
-#define UI_AURA_NATIVE_WINDOW_OCCLUSION_TRACKER_WIN_H_
-
-#include <windows.h>
-#include <winuser.h>
-
-#include <vector>
-
-#include "base/containers/flat_map.h"
-#include "base/containers/flat_set.h"
-#include "base/sequenced_task_runner.h"
-#include "base/time/time.h"
-#include "ui/aura/aura_export.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_observer.h"
-
-namespace aura {
-
-// This class keeps track of whether any HWNDs are occluding any app windows.
-// It notifies the host of any app window whose occlusion state changes. Most
-// code should not need to use this; it's an implementation detail.
-class AURA_EXPORT NativeWindowOcclusionTrackerWin : public WindowObserver {
- public:
-  static NativeWindowOcclusionTrackerWin* GetOrCreateInstance();
-
-  // Enables notifying the host of |window| via SetNativeWindowOcclusionState()
-  // when the occlusion state has been computed.
-  void Enable(Window* window);
-
-  // Disables notifying the host of |window| via
-  // OnNativeWindowOcclusionStateChanged() when the occlusion state has been
-  // computed. It's not neccesary to call this when |window| is deleted because
-  // OnWindowDestroying calls Disable.
-  void Disable(Window* window);
-
-  // aura::WindowObserver:
-  void OnWindowVisibilityChanged(Window* window, bool visible) override;
-  void OnWindowDestroying(Window* window) override;
-
- private:
-  friend class NativeWindowOcclusionTrackerTest;
-
-  // This class computes the occlusion state of the tracked windows.
-  // It runs on a separate thread, and notifies the main thread of
-  // the occlusion state of the tracked windows.
-  class WindowOcclusionCalculator {
-   public:
-    WindowOcclusionCalculator(
-        scoped_refptr<base::SequencedTaskRunner> task_runner,
-        scoped_refptr<base::SequencedTaskRunner> ui_thread_task_runner);
-    ~WindowOcclusionCalculator();
-
-    void EnableOcclusionTrackingForWindow(HWND hwnd);
-    void DisableOcclusionTrackingForWindow(HWND hwnd);
-
-    // If a window becomes visible, makes sure event hooks are registered.
-    void HandleVisibilityChanged(bool visible);
-
-   private:
-    friend class NativeWindowOcclusionTrackerTest;
-    struct NativeWindowOcclusionState {
-      // The region of the native window that is not occluded by other windows.
-      SkRegion unoccluded_region;
-
-      // The current occlusion state of the native window. Default to UNKNOWN
-      // because we do not know the state starting out. More information on
-      // these states can be found in aura::Window.
-      aura::Window::OcclusionState occlusion_state =
-          aura::Window::OcclusionState::UNKNOWN;
-    };
-
-    // Registers event hooks, if not registered.
-    void MaybeRegisterEventHooks();
-
-    // This is the callback registered to get notified of various Windows
-    // events, like window moving/resizing.
-    static void CALLBACK EventHookCallback(HWINEVENTHOOK hWinEventHook,
-                                           DWORD event,
-                                           HWND hwnd,
-                                           LONG idObject,
-                                           LONG idChild,
-                                           DWORD dwEventThread,
-                                           DWORD dwmsEventTime);
-
-    // EnumWindows callback used to iterate over all hwnds to determine
-    // occlusion status of all tracked root windows.  Also builds up
-    // |current_pids_with_visible_windows_| and registers event hooks for newly
-    // discovered processes with visible hwnds.
-    static BOOL CALLBACK
-    ComputeNativeWindowOcclusionStatusCallback(HWND hwnd, LPARAM lParam);
-
-    // EnumWindows callback used to update the list of process ids with
-    // visible hwnds, |pids_for_location_change_hook_|.
-    static BOOL CALLBACK UpdateVisibleWindowProcessIdsCallback(HWND hwnd,
-                                                               LPARAM lParam);
-
-    // Determines which processes owning visible application windows to set the
-    // EVENT_OBJECT_LOCATIONCHANGE event hook for and stores the pids in
-    // |pids_for_location_change_hook_|.
-    void UpdateVisibleWindowProcessIds();
-
-    // Computes the native window occlusion status for all tracked root aura
-    // windows in |root_window_hwnds_occlusion_state_| and notifies them if
-    // their occlusion status has changed.
-    void ComputeNativeWindowOcclusionStatus();
-
-    // Schedules an occlusion calculation |update_occlusion_delay_| time in the
-    // future, if one isn't already scheduled.
-    void ScheduleOcclusionCalculationIfNeeded();
-
-    // Registers a global event hook (not per process) for the events in the
-    // range from |event_min| to |event_max|, inclusive.
-    void RegisterGlobalEventHook(UINT event_min, UINT event_max);
-
-    // Registers the EVENT_OBJECT_LOCATIONCHANGE event hook for the process with
-    // passed id. The process has one or more visible, opaque windows.
-    void RegisterEventHookForProcess(DWORD pid);
-
-    // Registers/Unregisters the event hooks necessary for occlusion tracking
-    // via calls to RegisterEventHook. These event hooks are disabled when all
-    // tracked windows are minimized.
-    void RegisterEventHooks();
-    void UnregisterEventHooks();
-
-    // EnumWindows callback for occlusion calculation. Returns true to
-    // continue enumeration, false otherwise. Currently, always returns
-    // true because this function also updates
-    // |current_pids_with_visible_windows|, and needs to see all HWNDs.
-    bool ProcessComputeNativeWindowOcclusionStatusCallback(
-        HWND hwnd,
-        base::flat_set<DWORD>* current_pids_with_visible_windows);
-
-    // Processes events sent to OcclusionEventHookCallback.
-    // It generally triggers scheduling of the occlusion calculation, but
-    // ignores certain events in order to not calculate occlusion more than
-    // necessary.
-    void ProcessEventHookCallback(DWORD event,
-                                  HWND hwnd,
-                                  LONG idObject,
-                                  LONG idChild);
-
-    // EnumWindows callback for determining which processes to set the
-    // EVENT_OBJECT_LOCATIONCHANGE event hook for. We set that event hook for
-    // processes hosting fully visible, opaque windows.
-    void ProcessUpdateVisibleWindowProcessIdsCallback(HWND hwnd);
-
-    // Task runner for our thread.
-    scoped_refptr<base::SequencedTaskRunner> task_runner_;
-
-    // Task runner for the thread that created |this|.  UpdateOcclusionState
-    // task is posted to this task runner.
-    const scoped_refptr<base::SequencedTaskRunner> ui_thread_task_runner_;
-
-    // Map of root app window hwnds and their occlusion state. This contains
-    // both visible and hidden windows.
-    base::flat_map<HWND, NativeWindowOcclusionState>
-        root_window_hwnds_occlusion_state_;
-
-    // Values returned by SetWinEventHook are stored so that hooks can be
-    // unregistered when necessary.
-    std::vector<HWINEVENTHOOK> global_event_hooks_;
-
-    // Map from process id to EVENT_OBJECT_LOCATIONCHANGE event hook.
-    base::flat_map<DWORD, HWINEVENTHOOK> process_event_hooks_;
-
-    // Pids of processes for which the EVENT_OBJECT_LOCATIONCHANGE event hook is
-    // set. These are the processes hosting windows in
-    // |visible_and_fully_opaque_windows_|.
-    base::flat_set<DWORD> pids_for_location_change_hook_;
-
-    // Timer to delay occlusion update.
-    base::OneShotTimer occlusion_update_timer_;
-
-    // Used to keep track of whether we're in the middle of getting window move
-    // events, in order to wait until the window move is complete before
-    // calculating window occlusion.
-    bool window_is_moving_ = false;
-
-    SEQUENCE_CHECKER(sequence_checker_);
-
-    DISALLOW_COPY_AND_ASSIGN(WindowOcclusionCalculator);
-  };
-
-  NativeWindowOcclusionTrackerWin();
-  ~NativeWindowOcclusionTrackerWin() override;
-
-  // Returns true if we are interested in |hwnd| for purposes of occlusion
-  // calculation. We are interested in |hwnd| if it is a window that is visible,
-  // opaque, and bounded. If we are interested in |hwnd|, stores the window
-  // rectangle in |window_rect|.
-  static bool IsWindowVisibleAndFullyOpaque(HWND hwnd, gfx::Rect* window_rect);
-
-  // Updates root windows occclusion state.
-  void UpdateOcclusionState(const base::flat_map<HWND, Window::OcclusionState>&
-                                root_window_hwnds_occlusion_state);
-
-  // Task runner to call ComputeNativeWindowOcclusionStatus, and to handle
-  // Windows event notifications, off of the UI thread.
-  const scoped_refptr<base::SequencedTaskRunner> update_occlusion_task_runner_;
-
-  // Map of HWND to root app windows. Maintained on the UI thread, and used
-  // to send occlusion state notifications to Windows from
-  // |root_window_hwnds_occlusion_state_|.
-  base::flat_map<HWND, Window*> hwnd_root_window_map_;
-
-  std::unique_ptr<WindowOcclusionCalculator> occlusion_calculator_;
-
-  DISALLOW_COPY_AND_ASSIGN(NativeWindowOcclusionTrackerWin);
-};
-
-}  // namespace aura
-
-#endif  // UI_AURA_NATIVE_WINDOW_OCCLUSION_TRACKER_WIN_H_
diff --git a/ui/aura/native_window_occlusion_tracker_win_interactive_test.cc b/ui/aura/native_window_occlusion_tracker_win_interactive_test.cc
deleted file mode 100644
index bec46b8..0000000
--- a/ui/aura/native_window_occlusion_tracker_win_interactive_test.cc
+++ /dev/null
@@ -1,206 +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 "ui/aura/native_window_occlusion_tracker_win.h"
-
-#include <winuser.h>
-
-#include "base/at_exit.h"
-#include "base/command_line.h"
-#include "base/feature_list.h"
-#include "base/macros.h"
-#include "base/run_loop.h"
-#include "base/task/task_scheduler/task_scheduler.h"
-#include "base/test/scoped_feature_list.h"
-#include "base/win/scoped_gdi_object.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/aura/env.h"
-#include "ui/aura/test/aura_test_base.h"
-#include "ui/aura/test/test_focus_client.h"
-#include "ui/aura/test/test_screen.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/aura/test/test_window_parenting_client.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_occlusion_tracker.h"
-#include "ui/aura/window_tree_host.h"
-#include "ui/aura/window_tree_host_platform.h"
-#include "ui/base/ime/input_method_initializer.h"
-#include "ui/base/ui_base_features.h"
-#include "ui/display/win/dpi.h"
-#include "ui/gfx/geometry/rect.h"
-#include "ui/gfx/win/window_impl.h"
-#include "ui/gl/test/gl_surface_test_support.h"
-
-namespace aura {
-
-// This class is used to verify expectations about occlusion state changes by
-// adding instances of it as an observer of aura:Windows the tests create and
-// checking that they get the expected call(s) to OnOcclusionStateChanged.
-// The tests verify that the current state, when idle, is the expected state,
-// because the state can be VISIBLE before it reaches the expected state.
-class MockWindowTreeHostObserver : public WindowTreeHostObserver {
- public:
-  MockWindowTreeHostObserver() {}
-  ~MockWindowTreeHostObserver() override { EXPECT_FALSE(is_expecting_call()); }
-
-  // WindowTreeHostObserver:
-  void OnOcclusionStateChanged(WindowTreeHost* host,
-                               Window::OcclusionState new_state) override {
-    EXPECT_NE(new_state, Window::OcclusionState::UNKNOWN);
-    // Should only get notified when the occlusion state changes.
-    EXPECT_NE(new_state, cur_state_);
-    cur_state_ = new_state;
-  }
-
-  void set_expectation(Window::OcclusionState expectation) {
-    expectation_ = expectation;
-  }
-
-  bool is_expecting_call() const { return expectation_ != cur_state_; }
-
- private:
-  Window::OcclusionState expectation_ = Window::OcclusionState::UNKNOWN;
-  Window::OcclusionState cur_state_ = Window::OcclusionState::UNKNOWN;
-
-  DISALLOW_COPY_AND_ASSIGN(MockWindowTreeHostObserver);
-};
-
-// Test wrapper around native window HWND.
-class TestNativeWindow : public gfx::WindowImpl {
- public:
-  TestNativeWindow() {}
-  ~TestNativeWindow() override;
-
- private:
-  // Overridden from gfx::WindowImpl:
-  BOOL ProcessWindowMessage(HWND window,
-                            UINT message,
-                            WPARAM w_param,
-                            LPARAM l_param,
-                            LRESULT& result,
-                            DWORD msg_map_id) override {
-    return FALSE;  // Results in DefWindowProc().
-  }
-
-  DISALLOW_COPY_AND_ASSIGN(TestNativeWindow);
-};
-
-TestNativeWindow::~TestNativeWindow() {
-  if (hwnd())
-    DestroyWindow(hwnd());
-}
-
-class NativeWindowOcclusionTrackerTest : public test::AuraTestBase {
- public:
-  NativeWindowOcclusionTrackerTest() {}
-  void SetUp() override {
-    if (gl::GetGLImplementation() == gl::kGLImplementationNone)
-      gl::GLSurfaceTestSupport::InitializeOneOff();
-
-    AuraTestBase::SetUp();
-    ui::InitializeInputMethodForTesting();
-
-    display::Screen::SetScreenInstance(test_screen());
-
-    scoped_feature_list_.InitAndEnableFeature(
-        features::kCalculateNativeWinOcclusion);
-  }
-
-  void SetNativeWindowBounds(HWND hwnd, const gfx::Rect& bounds) {
-    RECT wr = bounds.ToRECT();
-    AdjustWindowRectEx(&wr, GetWindowLong(hwnd, GWL_STYLE), FALSE,
-                       GetWindowLong(hwnd, GWL_EXSTYLE));
-
-    // Make sure to keep the window onscreen, as AdjustWindowRectEx() may have
-    // moved part of it offscreen.
-    gfx::Rect window_bounds(wr);
-    window_bounds.set_x(std::max(0, window_bounds.x()));
-    window_bounds.set_y(std::max(0, window_bounds.y()));
-    SetWindowPos(hwnd, HWND_TOP, window_bounds.x(), window_bounds.y(),
-                 window_bounds.width(), window_bounds.height(),
-                 SWP_NOREPOSITION);
-    EXPECT_TRUE(UpdateWindow(hwnd));
-  }
-
-  HWND CreateNativeWindowWithBounds(const gfx::Rect& bounds) {
-    native_win_ = std::make_unique<TestNativeWindow>();
-    native_win_->set_window_style(WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN);
-    native_win_->Init(nullptr, bounds);
-    HWND hwnd = native_win_->hwnd();
-    SetNativeWindowBounds(hwnd, bounds);
-    base::win::ScopedRegion region(CreateRectRgn(0, 0, 0, 0));
-    if (GetWindowRgn(hwnd, region.get()) == COMPLEXREGION) {
-      // On Windows 7, the newly created window has a complex region, which
-      // means it will be ignored during the occlusion calculation. So, force
-      // it to have a simple region so that we get test coverage on win 7.
-      RECT bounding_rect;
-      GetWindowRect(hwnd, &bounding_rect);
-      base::win::ScopedRegion rectangular_region(
-          CreateRectRgnIndirect(&bounding_rect));
-      SetWindowRgn(hwnd, rectangular_region.get(), TRUE);
-    }
-    ShowWindow(hwnd, SW_SHOWNORMAL);
-    EXPECT_TRUE(UpdateWindow(hwnd));
-    return hwnd;
-  }
-
-  void CreateTrackedAuraWindowWithBounds(MockWindowTreeHostObserver* observer,
-                                         gfx::Rect bounds) {
-    host()->Show();
-    host()->SetBoundsInPixels(bounds);
-    host()->AddObserver(observer);
-
-    Window* window = CreateNormalWindow(1, host()->window(), nullptr);
-    window->SetBounds(bounds);
-
-    window->env()->GetWindowOcclusionTracker()->Track(window);
-  }
-
- private:
-  base::test::ScopedFeatureList scoped_feature_list_;
-  std::unique_ptr<TestNativeWindow> native_win_;
-
-  DISALLOW_COPY_AND_ASSIGN(NativeWindowOcclusionTrackerTest);
-};
-
-// Simple test completely covering an aura window with a native window.
-TEST_F(NativeWindowOcclusionTrackerTest, SimpleOcclusion) {
-  base::RunLoop run_loop;
-
-  std::unique_ptr<MockWindowTreeHostObserver> observer =
-      std::make_unique<MockWindowTreeHostObserver>();
-  CreateTrackedAuraWindowWithBounds(observer.get(), gfx::Rect(0, 0, 100, 100));
-  observer->set_expectation(Window::OcclusionState::OCCLUDED);
-  CreateNativeWindowWithBounds(gfx::Rect(0, 0, 100, 100));
-  run_loop.RunUntilIdle();
-  EXPECT_FALSE(observer->is_expecting_call());
-}
-
-// Simple test with an aura window and native window that do not overlap.
-TEST_F(NativeWindowOcclusionTrackerTest, SimpleVisible) {
-  base::RunLoop run_loop;
-  MockWindowTreeHostObserver observer;
-  CreateTrackedAuraWindowWithBounds(&observer, gfx::Rect(0, 0, 100, 100));
-  observer.set_expectation(Window::OcclusionState::VISIBLE);
-  CreateNativeWindowWithBounds(gfx::Rect(200, 0, 100, 100));
-
-  run_loop.RunUntilIdle();
-  EXPECT_FALSE(observer.is_expecting_call());
-}
-
-// Simple test with a minimized aura window and native window.
-TEST_F(NativeWindowOcclusionTrackerTest, SimpleHidden) {
-  base::RunLoop run_loop;
-  MockWindowTreeHostObserver observer;
-  CreateTrackedAuraWindowWithBounds(&observer, gfx::Rect(0, 0, 100, 100));
-  CreateNativeWindowWithBounds(gfx::Rect(200, 0, 100, 100));
-  // Minimize the tracked aura window and check that its occlusion state
-  // is HIDDEN.
-  ::ShowWindow(host()->GetAcceleratedWidget(), SW_MINIMIZE);
-  observer.set_expectation(Window::OcclusionState::HIDDEN);
-  run_loop.RunUntilIdle();
-  EXPECT_FALSE(observer.is_expecting_call());
-}
-
-}  // namespace aura
diff --git a/ui/aura/window_occlusion_tracker.cc b/ui/aura/window_occlusion_tracker.cc
index 291a414..035b5da7 100644
--- a/ui/aura/window_occlusion_tracker.cc
+++ b/ui/aura/window_occlusion_tracker.cc
@@ -11,7 +11,6 @@
 #include "third_party/skia/include/core/SkRegion.h"
 #include "ui/aura/env.h"
 #include "ui/aura/window_tracker.h"
-#include "ui/aura/window_tree_host.h"
 #include "ui/gfx/geometry/safe_integer_conversions.h"
 #include "ui/gfx/transform.h"
 
@@ -431,18 +430,9 @@
   DCHECK(root_window);
   RootWindowState& root_window_state = root_windows_[root_window];
   ++root_window_state.num_tracked_windows;
-  MarkRootWindowAsDirty(&root_window_state);
-
-  // It's only useful to track the host if |window| is the first tracked window
-  // under |root_window|.  All windows under the same root have the same host.
-  if (root_window_state.num_tracked_windows == 1) {
+  if (root_window_state.num_tracked_windows == 1)
     AddObserverToWindowAndDescendants(root_window);
-    auto* host = root_window->GetHost();
-    if (host) {
-      host->AddObserver(this);
-      host->EnableNativeWindowOcclusionTracking();
-    }
-  }
+  MarkRootWindowAsDirty(&root_window_state);
   MaybeComputeOcclusion();
 }
 
@@ -455,8 +445,6 @@
   if (root_window_state_it->second.num_tracked_windows == 0) {
     RemoveObserverFromWindowAndDescendants(root_window);
     root_windows_.erase(root_window_state_it);
-    root_window->GetHost()->RemoveObserver(this);
-    root_window->GetHost()->DisableNativeWindowOcclusionTracking();
   }
 }
 
@@ -643,8 +631,4 @@
   }
 }
 
-void WindowOcclusionTracker::OnOcclusionStateChanged(
-    WindowTreeHost* host,
-    aura::Window::OcclusionState new_state) {}
-
 }  // namespace aura
diff --git a/ui/aura/window_occlusion_tracker.h b/ui/aura/window_occlusion_tracker.h
index e6bb585..18183873 100644
--- a/ui/aura/window_occlusion_tracker.h
+++ b/ui/aura/window_occlusion_tracker.h
@@ -16,7 +16,6 @@
 #include "ui/aura/aura_export.h"
 #include "ui/aura/window.h"
 #include "ui/aura/window_observer.h"
-#include "ui/aura/window_tree_host_observer.h"
 #include "ui/compositor/layer_animation_observer.h"
 
 struct SkIRect;
@@ -47,8 +46,7 @@
 // Note that an occluded window may be drawn on the screen by window switching
 // features such as "Alt-Tab" or "Overview".
 class AURA_EXPORT WindowOcclusionTracker : public ui::LayerAnimationObserver,
-                                           public WindowObserver,
-                                           public WindowTreeHostObserver {
+                                           public WindowObserver {
  public:
   // Prevents window occlusion state computations within its scope. If an event
   // that could cause window occlusion states to change occurs within the scope
@@ -216,10 +214,6 @@
                                       Window* new_root) override;
   void OnWindowLayerRecreated(Window* window) override;
 
-  // WindowTreeHostObserver
-  void OnOcclusionStateChanged(WindowTreeHost* host,
-                               Window::OcclusionState new_state) override;
-
   // Windows whose occlusion state is tracked.
   base::flat_map<Window*, Window::OcclusionState> tracked_windows_;
 
diff --git a/ui/aura/window_tree_host.cc b/ui/aura/window_tree_host.cc
index 1379440..f6d5c61 100644
--- a/ui/aura/window_tree_host.cc
+++ b/ui/aura/window_tree_host.cc
@@ -9,7 +9,6 @@
 #include "base/metrics/histogram_macros.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "base/trace_event/trace_event.h"
-#include "build/build_config.h"
 #include "components/viz/common/features.h"
 #include "ui/aura/client/capture_client.h"
 #include "ui/aura/client/cursor_client.h"
@@ -40,10 +39,6 @@
 #include "ui/gfx/icc_profile.h"
 #include "ui/platform_window/platform_window_init_properties.h"
 
-#if defined(OS_WIN)
-#include "ui/aura/native_window_occlusion_tracker_win.h"
-#endif  // OS_WIN
-
 namespace aura {
 
 namespace {
@@ -83,12 +78,6 @@
 };
 #endif
 
-#if defined(OS_WIN)
-bool IsNativeWindowOcclusionEnabled() {
-  return base::FeatureList::IsEnabled(features::kCalculateNativeWinOcclusion);
-}
-#endif  // OS_WIN
-
 }  // namespace
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -129,10 +118,6 @@
   observers_.RemoveObserver(observer);
 }
 
-bool WindowTreeHost::HasObserver(const WindowTreeHostObserver* observer) const {
-  return observers_.HasObserver(observer);
-}
-
 ui::EventSink* WindowTreeHost::event_sink() {
   return dispatcher_.get();
 }
@@ -307,38 +292,11 @@
   return true;
 }
 
-void WindowTreeHost::EnableNativeWindowOcclusionTracking() {
-#if defined(OS_WIN)
-  if (IsNativeWindowOcclusionEnabled()) {
-    NativeWindowOcclusionTrackerWin::GetOrCreateInstance()->Enable(window());
-  }
-#endif  // OS_WIN
-}
-
-void WindowTreeHost::DisableNativeWindowOcclusionTracking() {
-#if defined(OS_WIN)
-  if (IsNativeWindowOcclusionEnabled()) {
-    occlusion_state_ = Window::OcclusionState::UNKNOWN;
-    NativeWindowOcclusionTrackerWin::GetOrCreateInstance()->Disable(window());
-  }
-#endif  // OS_WIN
-}
-
-void WindowTreeHost::SetNativeWindowOcclusionState(
-    Window::OcclusionState state) {
-  if (occlusion_state_ != state) {
-    occlusion_state_ = state;
-    for (WindowTreeHostObserver& observer : observers_)
-      observer.OnOcclusionStateChanged(this, state);
-  }
-}
-
 ////////////////////////////////////////////////////////////////////////////////
 // WindowTreeHost, protected:
 
 WindowTreeHost::WindowTreeHost(std::unique_ptr<Window> window)
     : window_(window.release()),  // See header for details on ownership.
-      occlusion_state_(Window::OcclusionState::UNKNOWN),
       last_cursor_(ui::CursorType::kNull),
       input_method_(nullptr),
       owned_input_method_(false),
diff --git a/ui/aura/window_tree_host.h b/ui/aura/window_tree_host.h
index 50b18ca..7e19ae7 100644
--- a/ui/aura/window_tree_host.h
+++ b/ui/aura/window_tree_host.h
@@ -80,7 +80,6 @@
 
   void AddObserver(WindowTreeHostObserver* observer);
   void RemoveObserver(WindowTreeHostObserver* observer);
-  bool HasObserver(const WindowTreeHostObserver* observer) const;
 
   Window* window() { return window_; }
   const Window* window() const { return window_; }
@@ -230,18 +229,6 @@
   // WindowEventDispatcher during event dispatch.
   virtual bool ShouldSendKeyEventToIme();
 
-  // Enables native window occlusion tracking for the native window this host
-  // represents.
-  virtual void EnableNativeWindowOcclusionTracking();
-
-  // Disables native window occlusion tracking for the native window this host
-  // represents.
-  virtual void DisableNativeWindowOcclusionTracking();
-
-  // Remembers the current occlusion state, and if it has changed, notifies
-  // observers of the change.
-  virtual void SetNativeWindowOcclusionState(Window::OcclusionState state);
-
  protected:
   friend class ScopedKeyboardHook;
   friend class TestScreen;  // TODO(beng): see if we can remove/consolidate.
@@ -341,10 +328,6 @@
   // the end of the dtor).
   Window* window_;  // Owning.
 
-  // Keeps track of the occlusion state of the host, and used to send
-  // notifications to observers when it changes.
-  Window::OcclusionState occlusion_state_;
-
   base::ObserverList<WindowTreeHostObserver>::Unchecked observers_;
 
   std::unique_ptr<WindowEventDispatcher> dispatcher_;
diff --git a/ui/aura/window_tree_host_observer.h b/ui/aura/window_tree_host_observer.h
index 00fe3b4..e71455dc 100644
--- a/ui/aura/window_tree_host_observer.h
+++ b/ui/aura/window_tree_host_observer.h
@@ -6,7 +6,6 @@
 #define UI_AURA_WINDOW_TREE_HOST_OBSERVER_H_
 
 #include "ui/aura/aura_export.h"
-#include "ui/aura/window.h"
 
 namespace gfx {
 class Point;
@@ -30,11 +29,6 @@
   // Called when the native window system sends the host request to close.
   virtual void OnHostCloseRequested(WindowTreeHost* host) {}
 
-  // Called when the occlusion status of the native window changes, iff
-  // occlusion tracking is enabled for a descendant of the root.
-  virtual void OnOcclusionStateChanged(WindowTreeHost* host,
-                                       Window::OcclusionState new_state) {}
-
  protected:
   virtual ~WindowTreeHostObserver() {}
 };
diff --git a/ui/aura/window_tree_host_unittest.cc b/ui/aura/window_tree_host_unittest.cc
index 6d40482..abbe0b8 100644
--- a/ui/aura/window_tree_host_unittest.cc
+++ b/ui/aura/window_tree_host_unittest.cc
@@ -14,40 +14,9 @@
 #include "ui/events/base_event_utils.h"
 #include "ui/events/event_rewriter.h"
 #include "ui/events/keycodes/dom/dom_code.h"
+#include "ui/events/test/test_event_rewriter.h"
 #include "ui/platform_window/stub/stub_window.h"
 
-namespace {
-
-// Counts number of events observed.
-class CounterEventRewriter : public ui::EventRewriter {
- public:
-  CounterEventRewriter() : events_seen_(0) {}
-  ~CounterEventRewriter() override {}
-
-  int events_seen() const { return events_seen_; }
-
- private:
-  // ui::EventRewriter:
-  ui::EventRewriteStatus RewriteEvent(
-      const ui::Event& event,
-      std::unique_ptr<ui::Event>* new_event) override {
-    events_seen_++;
-    return ui::EVENT_REWRITE_CONTINUE;
-  }
-
-  ui::EventRewriteStatus NextDispatchEvent(
-      const ui::Event& last_event,
-      std::unique_ptr<ui::Event>* new_event) override {
-    return ui::EVENT_REWRITE_CONTINUE;
-  }
-
-  int events_seen_;
-
-  DISALLOW_COPY_AND_ASSIGN(CounterEventRewriter);
-};
-
-}  // namespace
-
 namespace aura {
 
 using WindowTreeHostTest = test::AuraTestBase;
@@ -99,7 +68,7 @@
 #endif
 
 TEST_F(WindowTreeHostTest, NoRewritesPostIME) {
-  CounterEventRewriter event_rewriter;
+  ui::test::TestEventRewriter event_rewriter;
   host()->AddEventRewriter(&event_rewriter);
 
   ui::KeyEvent key_event('A', ui::VKEY_A, ui::DomCode::NONE, 0);
diff --git a/ui/base/ui_base_features.cc b/ui/base/ui_base_features.cc
index 98700d7f..674998b 100644
--- a/ui/base/ui_base_features.cc
+++ b/ui/base/ui_base_features.cc
@@ -12,11 +12,6 @@
 
 namespace features {
 
-#if defined(OS_WIN)
-// If enabled, calculate native window occlusion - Windows-only.
-const base::Feature kCalculateNativeWinOcclusion{
-    "CalculateNativeWinOcclusion", base::FEATURE_DISABLED_BY_DEFAULT};
-#endif  // OW_WIN
 // If enabled, the emoji picker context menu item may be shown for editable
 // text areas.
 const base::Feature kEnableEmojiContextMenu {
diff --git a/ui/base/ui_base_features.h b/ui/base/ui_base_features.h
index a6c9a2c..4a799dda3 100644
--- a/ui/base/ui_base_features.h
+++ b/ui/base/ui_base_features.h
@@ -32,7 +32,6 @@
 UI_BASE_EXPORT bool IsUiGpuRasterizationEnabled();
 
 #if defined(OS_WIN)
-UI_BASE_EXPORT extern const base::Feature kCalculateNativeWinOcclusion;
 UI_BASE_EXPORT extern const base::Feature kInputPaneOnScreenKeyboard;
 UI_BASE_EXPORT extern const base::Feature kPointerEventsForTouch;
 UI_BASE_EXPORT extern const base::Feature kPrecisionTouchpad;
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index 4b073ec..dbbfe29 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -113,6 +113,7 @@
       device_scale_factor_(1.0f),
       cache_render_surface_requests_(0),
       deferred_paint_requests_(0),
+      backdrop_filter_quality_(1.0f),
       trilinear_filtering_request_(0),
       weak_ptr_factory_(this) {
   CreateCcLayer();
@@ -141,6 +142,7 @@
       device_scale_factor_(1.0f),
       cache_render_surface_requests_(0),
       deferred_paint_requests_(0),
+      backdrop_filter_quality_(1.0f),
       trilinear_filtering_request_(0),
       weak_ptr_factory_(this) {
   CreateCcLayer();
@@ -638,6 +640,7 @@
   cc_layer_->SetContentsOpaque(fills_bounds_opaquely_);
   cc_layer_->SetIsDrawable(type_ != LAYER_NOT_DRAWN);
   cc_layer_->SetHideLayerAndSubtree(!visible_);
+  cc_layer_->SetBackdropFilterQuality(backdrop_filter_quality_);
   cc_layer_->SetElementId(cc::ElementId(cc_layer_->id()));
 
   SetLayerFilters();
@@ -673,6 +676,10 @@
     cc_layer_->SetCacheRenderSurface(false);
 }
 
+void Layer::SetBackdropFilterQuality(const float quality) {
+  backdrop_filter_quality_ = quality / GetDeviceScaleFactor();
+  cc_layer_->SetBackdropFilterQuality(backdrop_filter_quality_);
+}
 void Layer::AddDeferredPaintRequest() {
   ++deferred_paint_requests_;
   TRACE_COUNTER_ID1("ui", "DeferredPaintRequests", this,
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h
index 54c04338..0f9cc33 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -428,6 +428,14 @@
   void AddDeferredPaintRequest();
   void RemoveDeferredPaintRequest();
 
+  // |quality| is used as a multiplier to scale the temporary surface
+  // that might be created by the compositor to apply the backdrop filters.
+  // The filter will be applied on a surface |quality|^2 times the area of the
+  // original background.
+  // |quality| lower than one will decrease memory usage and increase
+  // performance.
+  void SetBackdropFilterQuality(const float quality);
+
   bool IsPaintDeferredForTesting() const { return deferred_paint_requests_; }
 
   // Request trilinear filtering for layer.
@@ -624,6 +632,8 @@
   // means we should paint the layer.
   unsigned deferred_paint_requests_;
 
+  float backdrop_filter_quality_;
+
   // The counter to maintain how many trilinear filtering requests we have. If
   // the value > 0, means we need to perform trilinear filtering on the layer.
   // If the value == 0, means we should not perform trilinear filtering on the
diff --git a/ui/events/BUILD.gn b/ui/events/BUILD.gn
index 54001ac..27aee57 100644
--- a/ui/events/BUILD.gn
+++ b/ui/events/BUILD.gn
@@ -415,6 +415,8 @@
     "test/test_event_handler.h",
     "test/test_event_processor.cc",
     "test/test_event_processor.h",
+    "test/test_event_rewriter.cc",
+    "test/test_event_rewriter.h",
     "test/test_event_target.cc",
     "test/test_event_target.h",
     "test/test_event_targeter.cc",
diff --git a/ui/events/test/test_event_rewriter.cc b/ui/events/test/test_event_rewriter.cc
new file mode 100644
index 0000000..3351a6c
--- /dev/null
+++ b/ui/events/test/test_event_rewriter.cc
@@ -0,0 +1,30 @@
+// 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 "ui/events/test/test_event_rewriter.h"
+
+#include "ui/events/event.h"
+
+namespace ui {
+namespace test {
+
+TestEventRewriter::TestEventRewriter() = default;
+
+TestEventRewriter::~TestEventRewriter() = default;
+
+ui::EventRewriteStatus TestEventRewriter::RewriteEvent(
+    const ui::Event& event,
+    std::unique_ptr<ui::Event>* new_event) {
+  ++events_seen_;
+  return ui::EVENT_REWRITE_CONTINUE;
+}
+
+ui::EventRewriteStatus TestEventRewriter::NextDispatchEvent(
+    const ui::Event& last_event,
+    std::unique_ptr<ui::Event>* new_event) {
+  return ui::EVENT_REWRITE_CONTINUE;
+}
+
+}  // namespace test
+}  // namespace ui
diff --git a/ui/events/test/test_event_rewriter.h b/ui/events/test/test_event_rewriter.h
new file mode 100644
index 0000000..86512c88
--- /dev/null
+++ b/ui/events/test/test_event_rewriter.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 UI_EVENTS_TEST_TEST_EVENT_REWRITER_H_
+#define UI_EVENTS_TEST_TEST_EVENT_REWRITER_H_
+
+#include "base/macros.h"
+#include "ui/events/event_rewriter.h"
+
+namespace ui {
+namespace test {
+
+// Counts number of events observed.
+class TestEventRewriter : public ui::EventRewriter {
+ public:
+  TestEventRewriter();
+  ~TestEventRewriter() override;
+
+  void clear_events_seen() { events_seen_ = 0; }
+  int events_seen() const { return events_seen_; }
+
+  // ui::EventRewriter:
+  ui::EventRewriteStatus RewriteEvent(
+      const ui::Event& event,
+      std::unique_ptr<ui::Event>* new_event) override;
+  ui::EventRewriteStatus NextDispatchEvent(
+      const ui::Event& last_event,
+      std::unique_ptr<ui::Event>* new_event) override;
+
+ private:
+  int events_seen_ = 0;
+
+  DISALLOW_COPY_AND_ASSIGN(TestEventRewriter);
+};
+
+}  // namespace test
+}  // namespace ui
+
+#endif  // UI_EVENTS_TEST_TEST_EVENT_REWRITER_H_
diff --git a/ui/message_center/public/cpp/notification.h b/ui/message_center/public/cpp/notification.h
index 0b04be65..51430bb 100644
--- a/ui/message_center/public/cpp/notification.h
+++ b/ui/message_center/public/cpp/notification.h
@@ -430,6 +430,12 @@
   // method explicitly, to avoid setting it accidentally.
   void SetSystemPriority();
 
+  const std::string& custom_view_type() const { return custom_view_type_; }
+  void set_custom_view_type(const std::string& custom_view_type) {
+    DCHECK_EQ(type(), NotificationType::NOTIFICATION_TYPE_CUSTOM);
+    custom_view_type_ = custom_view_type;
+  }
+
   // Helper method to create a simple system notification. |click_callback|
   // will be invoked when the notification is clicked.
   //
@@ -497,6 +503,11 @@
   // A proxy object that allows access back to the JavaScript object that
   // represents the notification, for firing events.
   scoped_refptr<NotificationDelegate> delegate_;
+
+  // For custom notifications this determines which factory will be used for
+  // creating the view for this notification. The type should match the type
+  // used to register the factory in MessageViewFactory.
+  std::string custom_view_type_;
 };
 
 // Registering a vector icon allows it to later be looked up by name. This is
diff --git a/ui/message_center/public/mojo/notification.mojom b/ui/message_center/public/mojo/notification.mojom
index 5edb4301..eb7fba8b 100644
--- a/ui/message_center/public/mojo/notification.mojom
+++ b/ui/message_center/public/mojo/notification.mojom
@@ -89,4 +89,5 @@
   // |shown_as_popup_| intentionally omitted.
   // |is_read_| intentionally omitted.
   // |delegate_| intentionally omitted.
+  // |custom_view_type_| intentionally omitted.
 };
diff --git a/ui/message_center/views/message_view.cc b/ui/message_center/views/message_view.cc
index a4081c1..e6185bba 100644
--- a/ui/message_center/views/message_view.cc
+++ b/ui/message_center/views/message_view.cc
@@ -122,6 +122,8 @@
 
   SetBorder(views::CreateRoundedRectBorder(
       kNotificationBorderThickness, kNotificationCornerRadius, kBorderColor));
+  if (GetControlButtonsView())
+    GetControlButtonsView()->ShowCloseButton(GetMode() != Mode::PINNED);
 }
 
 void MessageView::CloseSwipeControl() {
diff --git a/ui/message_center/views/message_view_factory.cc b/ui/message_center/views/message_view_factory.cc
index ce4ef49..0ce0d31 100644
--- a/ui/message_center/views/message_view_factory.cc
+++ b/ui/message_center/views/message_view_factory.cc
@@ -4,6 +4,8 @@
 
 #include "ui/message_center/views/message_view_factory.h"
 
+#include <vector>
+
 #include "base/command_line.h"
 #include "base/feature_list.h"
 #include "base/lazy_instance.h"
@@ -16,8 +18,19 @@
 
 namespace {
 
-base::LazyInstance<MessageViewFactory::CustomMessageViewFactoryFunction>::Leaky
-    g_custom_view_factory = LAZY_INSTANCE_INITIALIZER;
+using MessageViewCustomFactoryMap =
+    std::map<std::string, MessageViewFactory::CustomMessageViewFactoryFunction>;
+
+base::LazyInstance<MessageViewCustomFactoryMap>::Leaky g_custom_view_factories =
+    LAZY_INSTANCE_INITIALIZER;
+
+std::unique_ptr<MessageView> GetCustomNotificationView(
+    const Notification& notification) {
+  MessageViewCustomFactoryMap* factories = g_custom_view_factories.Pointer();
+  auto iter = factories->find(notification.custom_view_type());
+  DCHECK(iter != factories->end());
+  return iter->second.Run(notification);
+}
 
 }  // namespace
 
@@ -37,8 +50,7 @@
         notification_view = new NotificationView(notification);
       break;
     case NOTIFICATION_TYPE_CUSTOM:
-      notification_view =
-          g_custom_view_factory.Get().Run(notification).release();
+      notification_view = GetCustomNotificationView(notification).release();
       break;
     default:
       // If the caller asks for an unrecognized kind of view (entirely possible
@@ -56,13 +68,24 @@
 
 // static
 void MessageViewFactory::SetCustomNotificationViewFactory(
+    const std::string& custom_view_type,
     const CustomMessageViewFactoryFunction& factory_function) {
-  g_custom_view_factory.Get() = factory_function;
+  MessageViewCustomFactoryMap* factories = g_custom_view_factories.Pointer();
+  DCHECK(factories->find(custom_view_type) == factories->end());
+  factories->emplace(custom_view_type, factory_function);
 }
 
 // static
-bool MessageViewFactory::HasCustomNotificationViewFactory() {
-  return !g_custom_view_factory.Get().is_null();
+bool MessageViewFactory::HasCustomNotificationViewFactory(
+    const std::string& custom_view_type) {
+  MessageViewCustomFactoryMap* factories = g_custom_view_factories.Pointer();
+  return factories->find(custom_view_type) != factories->end();
+}
+
+// static
+void MessageViewFactory::ClearCustomNotificationViewFactoryForTest(
+    const std::string& custom_view_type) {
+  g_custom_view_factories.Get().erase(custom_view_type);
 }
 
 }  // namespace message_center
diff --git a/ui/message_center/views/message_view_factory.h b/ui/message_center/views/message_view_factory.h
index 30c8520..f4d48b8b 100644
--- a/ui/message_center/views/message_view_factory.h
+++ b/ui/message_center/views/message_view_factory.h
@@ -8,6 +8,7 @@
 #include "ui/message_center/message_center_export.h"
 
 #include <memory>
+#include <string>
 
 #include "base/callback_forward.h"
 
@@ -29,16 +30,18 @@
 
   static MessageView* Create(const Notification& notification);
 
-  // Sets the function that will be invoked to create a custom notification
-  // view. This should be a repeating callback. It's an error to attempt to show
-  // a custom notification without first having called this function. Currently,
-  // only ARC uses custom notifications, so this doesn't need to distinguish
-  // between various sources of custom notification.
+  // Sets the function that will be invoked to create a custom notification view
+  // for a specific |custom_view_type|. This should be a repeating callback.
+  // It's an error to attempt to show a custom notification without first having
+  // called this function. The |custom_view_type| on the notification should
+  // also match the type used here.
   static void SetCustomNotificationViewFactory(
+      const std::string& custom_view_type,
       const CustomMessageViewFactoryFunction& factory_function);
-
-  // Returns whether the custom view factory function has already been set.
-  static bool HasCustomNotificationViewFactory();
+  static bool HasCustomNotificationViewFactory(
+      const std::string& custom_view_type);
+  static void ClearCustomNotificationViewFactoryForTest(
+      const std::string& custom_view_type);
 };
 
 }  // namespace message_center
diff --git a/ui/message_center/views/notification_header_view.h b/ui/message_center/views/notification_header_view.h
index b1f14665..72f6caa7 100644
--- a/ui/message_center/views/notification_header_view.h
+++ b/ui/message_center/views/notification_header_view.h
@@ -6,6 +6,7 @@
 #define UI_MESSAGE_CENTER_VIEWS_NOTIFICATION_HEADER_VIEW_H_
 
 #include "base/macros.h"
+#include "ui/message_center/message_center_export.h"
 #include "ui/message_center/public/cpp/message_center_constants.h"
 #include "ui/views/controls/button/button.h"
 
@@ -18,7 +19,7 @@
 
 class NotificationControlButtonsView;
 
-class NotificationHeaderView : public views::Button {
+class MESSAGE_CENTER_EXPORT NotificationHeaderView : public views::Button {
  public:
   NotificationHeaderView(NotificationControlButtonsView* control_buttons_view,
                          views::ButtonListener* listener);
diff --git a/ui/ozone/platform/scenic/scenic_session.cc b/ui/ozone/platform/scenic/scenic_session.cc
index c29bc82c..ae3fffd 100644
--- a/ui/ozone/platform/scenic/scenic_session.cc
+++ b/ui/ozone/platform/scenic/scenic_session.cc
@@ -69,12 +69,14 @@
 
 ScenicSession::ResourceId ScenicSession::CreateMemory(
     base::SharedMemoryHandle vmo,
-    fuchsia::images::MemoryType memory_type) {
+    fuchsia::images::MemoryType memory_type,
+    uint64_t allocation_size) {
   DCHECK(vmo.IsValid());
 
   fuchsia::ui::gfx::MemoryArgs memory;
   memory.vmo = zx::vmo(vmo.GetHandle());
   memory.memory_type = memory_type;
+  memory.allocation_size = allocation_size;
 
   fuchsia::ui::gfx::ResourceArgs resource;
   resource.set_memory(std::move(memory));
diff --git a/ui/ozone/platform/scenic/scenic_session.h b/ui/ozone/platform/scenic/scenic_session.h
index ad81b47..212ed27 100644
--- a/ui/ozone/platform/scenic/scenic_session.h
+++ b/ui/ozone/platform/scenic/scenic_session.h
@@ -55,7 +55,8 @@
   // the session.
   void ReleaseResource(ResourceId resource_id);
   ResourceId CreateMemory(base::SharedMemoryHandle vmo,
-                          fuchsia::images::MemoryType memory_type);
+                          fuchsia::images::MemoryType memory_type,
+                          uint64_t allocation_size);
   ResourceId CreateImage(ResourceId memory_id,
                          ResourceId memory_offset,
                          fuchsia::images::ImageInfo info);
diff --git a/ui/ozone/platform/scenic/scenic_window_canvas.cc b/ui/ozone/platform/scenic/scenic_window_canvas.cc
index 623208d..e683fce4 100644
--- a/ui/ozone/platform/scenic/scenic_window_canvas.cc
+++ b/ui/ozone/platform/scenic/scenic_window_canvas.cc
@@ -23,15 +23,17 @@
                                            ScenicSession* scenic) {
   memory.Unmap();
 
-  int bytes_per_row = size.width() * SkColorTypeBytesPerPixel(kN32_SkColorType);
-  int buffer_size = bytes_per_row * size.height();
+  size_t bytes_per_row =
+      size.width() * SkColorTypeBytesPerPixel(kN32_SkColorType);
+  size_t buffer_size = bytes_per_row * size.height();
   if (!memory.CreateAndMapAnonymous(buffer_size)) {
     LOG(WARNING) << "Failed to map memory for ScenicWindowCanvas.";
     memory.Unmap();
     surface.reset();
   } else {
     memory_id = scenic->CreateMemory(memory.GetReadOnlyHandle(),
-                                     fuchsia::images::MemoryType::HOST_MEMORY);
+                                     fuchsia::images::MemoryType::HOST_MEMORY,
+                                     buffer_size);
     surface = SkSurface::MakeRasterDirect(
         SkImageInfo::MakeN32Premul(size.width(), size.height()),
         memory.memory(), bytes_per_row);
@@ -53,8 +55,8 @@
   dirty_region.setEmpty();
 }
 
-ScenicWindowCanvas::ScenicWindowCanvas(ScenicWindow* window) : window_(window) {
-}
+ScenicWindowCanvas::ScenicWindowCanvas(ScenicWindow* window)
+    : window_(window) {}
 
 ScenicWindowCanvas::~ScenicWindowCanvas() {
   ScenicSession* scenic = window_->scenic_session();
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
index 8d460cc..9158c11 100644
--- a/ui/views/BUILD.gn
+++ b/ui/views/BUILD.gn
@@ -94,7 +94,6 @@
     "color_chooser/color_chooser_listener.h",
     "color_chooser/color_chooser_view.h",
     "context_menu_controller.h",
-    "controls/animated_icon_view.h",
     "controls/animated_image_view.h",
     "controls/button/button.h",
     "controls/button/checkbox.h",
@@ -292,7 +291,6 @@
     "bubble/tooltip_icon.cc",
     "button_drag_utils.cc",
     "color_chooser/color_chooser_view.cc",
-    "controls/animated_icon_view.cc",
     "controls/animated_image_view.cc",
     "controls/button/button.cc",
     "controls/button/checkbox.cc",
diff --git a/ui/views/controls/animated_icon_view.cc b/ui/views/controls/animated_icon_view.cc
deleted file mode 100644
index 68453c7..0000000
--- a/ui/views/controls/animated_icon_view.cc
+++ /dev/null
@@ -1,91 +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 "ui/views/controls/animated_icon_view.h"
-
-#include "ui/compositor/compositor.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/color_palette.h"
-#include "ui/gfx/paint_vector_icon.h"
-#include "ui/views/widget/widget.h"
-
-namespace views {
-
-AnimatedIconView::AnimatedIconView(const gfx::VectorIcon& icon)
-    : icon_(icon),
-      color_(gfx::kPlaceholderColor),
-      duration_(gfx::GetDurationOfAnimation(icon)) {
-  UpdateStaticImage();
-}
-
-AnimatedIconView::~AnimatedIconView() {
-  if (compositor_ && compositor_->HasAnimationObserver(this))
-    compositor_->RemoveAnimationObserver(this);
-}
-
-void AnimatedIconView::SetColor(SkColor color) {
-  if (color_ != color) {
-    color_ = color;
-    UpdateStaticImage();
-  }
-}
-
-void AnimatedIconView::Animate(State target) {
-  SetState(target);
-  if (!IsAnimating()) {
-    compositor_ = GetWidget()->GetCompositor();
-    compositor_->AddAnimationObserver(this);
-  }
-  start_time_ = base::TimeTicks::Now();
-}
-
-void AnimatedIconView::SetState(State state) {
-  state_ = state;
-  UpdateStaticImage();
-}
-
-bool AnimatedIconView::IsAnimating() const {
-  return start_time_ != base::TimeTicks();
-}
-
-void AnimatedIconView::OnPaint(gfx::Canvas* canvas) {
-  if (!IsAnimating()) {
-    views::ImageView::OnPaint(canvas);
-    return;
-  }
-
-  auto timestamp = base::TimeTicks::Now();
-  base::TimeDelta elapsed = timestamp - start_time_;
-  if (state_ == END)
-    elapsed = start_time_ + duration_ - timestamp;
-
-  canvas->Translate(GetImageBounds().OffsetFromOrigin());
-  gfx::PaintVectorIcon(canvas, icon_, color_, elapsed);
-}
-
-void AnimatedIconView::OnAnimationStep(base::TimeTicks timestamp) {
-  base::TimeDelta elapsed = timestamp - start_time_;
-  if (elapsed > duration_) {
-    compositor_->RemoveAnimationObserver(this);
-    compositor_ = nullptr;
-    start_time_ = base::TimeTicks();
-  }
-
-  SchedulePaint();
-}
-
-void AnimatedIconView::OnCompositingShuttingDown(ui::Compositor* compositor) {
-  DCHECK_EQ(compositor, compositor_);
-  compositor_->RemoveAnimationObserver(this);
-  compositor_ = nullptr;
-}
-
-void AnimatedIconView::UpdateStaticImage() {
-  gfx::IconDescription description(
-      icon_, 0, color_, state_ == START ? base::TimeDelta() : duration_,
-      gfx::kNoneIcon);
-  SetImage(gfx::CreateVectorIcon(description));
-}
-
-}  // namespace views
diff --git a/ui/views/controls/animated_icon_view.h b/ui/views/controls/animated_icon_view.h
deleted file mode 100644
index 2f0eddf5..0000000
--- a/ui/views/controls/animated_icon_view.h
+++ /dev/null
@@ -1,71 +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 UI_VIEWS_CONTROLS_ANIMATED_ICON_VIEW_H_
-#define UI_VIEWS_CONTROLS_ANIMATED_ICON_VIEW_H_
-
-#include "base/macros.h"
-#include "base/time/time.h"
-#include "ui/compositor/compositor_animation_observer.h"
-#include "ui/gfx/vector_icon_types.h"
-#include "ui/views/controls/image_view.h"
-
-namespace views {
-
-// This class hosts a vector icon that defines transitions. It can be in the
-// start steady state, the end steady state, or transitioning in between.
-class VIEWS_EXPORT AnimatedIconView : public views::ImageView,
-                                      public ui::CompositorAnimationObserver {
- public:
-  enum State {
-    START,
-    END,
-  };
-
-  explicit AnimatedIconView(const gfx::VectorIcon& icon);
-  ~AnimatedIconView() override;
-
-  void SetColor(SkColor color);
-
-  // Animates to the end or start state.
-  void Animate(State target);
-
-  // Jumps to the end or start state.
-  void SetState(State state);
-
-  bool IsAnimating() const;
-
-  // views::ImageView
-  void OnPaint(gfx::Canvas* canvas) override;
-
-  // ui::CompositorAnimationObserver
-  void OnAnimationStep(base::TimeTicks timestamp) override;
-  void OnCompositingShuttingDown(ui::Compositor* compositor) override;
-
- private:
-  void UpdateStaticImage();
-
-  const gfx::VectorIcon& icon_;
-  SkColor color_;
-
-  // Tracks the last time Animate() was called.
-  base::TimeTicks start_time_;
-
-  // The amount of time that must elapse until all transitions are done, i.e.
-  // the length of the animation.
-  const base::TimeDelta duration_;
-
-  // The current state, or when transitioning the goal state.
-  State state_ = START;
-
-  // The compositor that |this| is observing, if and when there is an active
-  // animation. Otherwise it is null.
-  ui::Compositor* compositor_ = nullptr;
-
-  DISALLOW_COPY_AND_ASSIGN(AnimatedIconView);
-};
-
-}  // namespace views
-
-#endif  // UI_VIEWS_CONTROLS_ANIMATED_ICON_VIEW_H_
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index a039a7a..0886f20 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -15,7 +15,6 @@
 #include "ui/base/class_property.h"
 #include "ui/base/cursor/cursor_loader_win.h"
 #include "ui/base/ime/input_method.h"
-#include "ui/base/ui_base_features.h"
 #include "ui/base/win/shell.h"
 #include "ui/compositor/paint_context.h"
 #include "ui/display/win/dpi.h"
@@ -29,7 +28,6 @@
 #include "ui/gfx/path.h"
 #include "ui/gfx/path_win.h"
 #include "ui/views/corewm/tooltip_win.h"
-#include "ui/views/views_switches.h"
 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_win.h"
 #include "ui/views/widget/desktop_aura/desktop_native_cursor_manager.h"
 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
@@ -177,6 +175,7 @@
 
 void DesktopWindowTreeHostWin::Close() {
   content_window()->Hide();
+
   // TODO(beng): Move this entire branch to DNWA so it can be shared with X11.
   if (should_animate_window_close_) {
     pending_close_ = true;
@@ -881,9 +880,6 @@
 }
 
 bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) {
-  // TODO(davidbienvenu): Check for getting mouse events for an occluded window
-  // with either a DCHECK or a stat.  Event can cause this object to be deleted
-  // so look at occlusion state before we do anything with the event.
   SendEventToSink(event);
   return event->handled();
 }
diff --git a/ui/webui/resources/cr_elements/cr_toast/cr_toast.html b/ui/webui/resources/cr_elements/cr_toast/cr_toast.html
index b9be21d..72256755 100644
--- a/ui/webui/resources/cr_elements/cr_toast/cr_toast.html
+++ b/ui/webui/resources/cr_elements/cr_toast/cr_toast.html
@@ -23,7 +23,6 @@
         transform: translateY(100px);
         transition: opacity 300ms, transform 300ms, visibility 300ms;
         visibility: hidden;
-        white-space: nowrap;
         z-index: 1;
       }