diff --git a/DEPS b/DEPS
index f04844e..8da860e 100644
--- a/DEPS
+++ b/DEPS
@@ -44,7 +44,7 @@
   # 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': 'd23043ad2a77a25575409fb5758a906a37aa2970',
+  'v8_revision': 'b6bf2cf7592692af6f230e9fe6d4438bb26b6d55',
   # 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.
@@ -56,7 +56,7 @@
   # 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.
-  'buildtools_revision': '8e94621c369e79625028f49e02bd0215f840291d',
+  'buildtools_revision': 'a7cc7a3e21a061975b33dcdcd81a9716ba614c3c',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling SwiftShader
   # and whatever else without interference from each other.
@@ -404,7 +404,7 @@
 
     # For Linux and Chromium OS.
     'src/third_party/cros_system_api':
-      Var('chromium_git') + '/chromiumos/platform/system_api.git' + '@' + 'e7adbd525794273e4e48f7f88ae4105238bd8b25',
+      Var('chromium_git') + '/chromiumos/platform/system_api.git' + '@' + '83f092867190983307074773a93cbcabb88886c3',
 
     # Note that this is different from Android's freetype repo.
     'src/third_party/freetype2/src':
diff --git a/ash/common/wm/maximize_mode/maximize_mode_controller.cc b/ash/common/wm/maximize_mode/maximize_mode_controller.cc
index 8879f2a5..e0dced60 100644
--- a/ash/common/wm/maximize_mode/maximize_mode_controller.cc
+++ b/ash/common/wm/maximize_mode/maximize_mode_controller.cc
@@ -226,6 +226,12 @@
     bool on,
     const base::TimeTicks& time) {
   tablet_mode_switch_is_on_ = on;
+  // Do not change if docked.
+  if (!display::Display::HasInternalDisplay() ||
+      !WmShell::Get()->IsActiveDisplayId(
+          display::Display::InternalDisplayId())) {
+    return;
+  }
   if (on && !IsMaximizeModeWindowManagerEnabled())
     EnterMaximizeMode();
 }
@@ -359,6 +365,14 @@
       !WmShell::Get()->IsActiveDisplayId(
           display::Display::InternalDisplayId())) {
     LeaveMaximizeMode();
+  } else if (tablet_mode_switch_is_on_ &&
+             !IsMaximizeModeWindowManagerEnabled()) {
+    // The internal display has returned, as we are exiting docked mode.
+    // The device is still in tablet mode, so trigger maximize mode, as this
+    // switch leads to the ignoring of accelerometer events. When the switch is
+    // not set the next stable accelerometer readings will trigger maximize
+    // mode.
+    EnterMaximizeMode();
   }
 }
 
diff --git a/ash/common/wm_window.cc b/ash/common/wm_window.cc
index 0cdaf6b..f7e86e1e 100644
--- a/ash/common/wm_window.cc
+++ b/ash/common/wm_window.cc
@@ -937,6 +937,11 @@
     ash::wm::GetWindowState(window_)->OnWindowShowStateChanged();
     return;
   }
+  if (key == aura::client::kImmersiveFullscreenKey) {
+    bool enable = window_->GetProperty(aura::client::kImmersiveFullscreenKey);
+    GetWindowState()->set_in_immersive_fullscreen(enable);
+    return;
+  }
   WmWindowProperty wm_property;
   if (key == aura::client::kAlwaysOnTopKey) {
     wm_property = WmWindowProperty::ALWAYS_ON_TOP;
diff --git a/ash/resources/vector_icons/vector_icons.h.template b/ash/resources/vector_icons/vector_icons.h.template
index a8473475..cf4860d 100644
--- a/ash/resources/vector_icons/vector_icons.h.template
+++ b/ash/resources/vector_icons/vector_icons.h.template
@@ -21,4 +21,6 @@
 
 }  // namespace ash
 
+#undef VECTOR_ICON_TEMPLATE_H
+
 #endif  // ASH_RESOURCES_VECTOR_ICONS_VECTOR_ICONS_H_
diff --git a/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc b/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
index 616917d..f627dff5 100644
--- a/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
+++ b/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
@@ -506,6 +506,45 @@
   OpenLidToAngle(270.0f);
   EXPECT_FALSE(IsMaximizeModeStarted());
   EXPECT_FALSE(AreEventsBlocked());
+
+  // Tablet mode signal should also be ignored.
+  SetTabletMode(true);
+  EXPECT_FALSE(IsMaximizeModeStarted());
+  EXPECT_FALSE(AreEventsBlocked());
+}
+
+// Tests that is a tablet mode signal is received while docked, that maximize
+// mode is enabled upon exiting docked mode.
+TEST_F(MaximizeModeControllerTest, MaximizeModeAfterExitingDockedMode) {
+  UpdateDisplay("200x200, 200x200");
+  const int64_t internal_display_id =
+      display::test::DisplayManagerTestApi(display_manager())
+          .SetFirstDisplayAsInternalDisplay();
+  ASSERT_FALSE(IsMaximizeModeStarted());
+
+  // Deactivate internal display to simulate Docked Mode.
+  std::vector<display::ManagedDisplayInfo> all_displays;
+  all_displays.push_back(display_manager()->GetDisplayInfo(
+      display_manager()->GetDisplayAt(0).id()));
+  std::vector<display::ManagedDisplayInfo> secondary_only;
+  display::ManagedDisplayInfo secondary_display =
+      display_manager()->GetDisplayInfo(
+          display_manager()->GetDisplayAt(1).id());
+  all_displays.push_back(secondary_display);
+  secondary_only.push_back(secondary_display);
+  display_manager()->OnNativeDisplaysChanged(secondary_only);
+  ASSERT_FALSE(display_manager()->IsActiveDisplayId(internal_display_id));
+
+  // Tablet mode signal should also be ignored.
+  SetTabletMode(true);
+  EXPECT_FALSE(IsMaximizeModeStarted());
+  EXPECT_FALSE(AreEventsBlocked());
+
+  // Exiting docked state
+  display_manager()->OnNativeDisplaysChanged(all_displays);
+  display::test::DisplayManagerTestApi(display_manager())
+      .SetFirstDisplayAsInternalDisplay();
+  EXPECT_TRUE(IsMaximizeModeStarted());
 }
 
 // Verify that the device won't exit touchview / maximize mode for unstable
diff --git a/cc/trees/layer_tree_host_pixeltest_tiles.cc b/cc/trees/layer_tree_host_pixeltest_tiles.cc
index b569208..058eb547 100644
--- a/cc/trees/layer_tree_host_pixeltest_tiles.cc
+++ b/cc/trees/layer_tree_host_pixeltest_tiles.cc
@@ -11,6 +11,8 @@
 #include "cc/playback/display_item_list_settings.h"
 #include "cc/playback/drawing_display_item.h"
 #include "cc/test/layer_tree_pixel_test.h"
+#include "cc/test/test_compositor_frame_sink.h"
+#include "gpu/command_buffer/client/gles2_interface.h"
 #include "third_party/skia/include/core/SkCanvas.h"
 #include "third_party/skia/include/core/SkPictureRecorder.h"
 
@@ -175,6 +177,18 @@
     }
   }
 
+  void WillPrepareTilesOnThread(LayerTreeHostImpl* host_impl) override {
+    // Issue a GL finish before preparing tiles to ensure resources become
+    // available for use in a timely manner. Needed for the one-copy path.
+    ContextProvider* context_provider =
+        host_impl->compositor_frame_sink()->worker_context_provider();
+    if (!context_provider)
+      return;
+
+    ContextProvider::ScopedContextLock lock(context_provider);
+    lock.ContextGL()->Finish();
+  }
+
  protected:
   BlueYellowClient client_;
   scoped_refptr<PictureLayer> picture_layer_;
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
index 0ceda16..dacb503 100644
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -68,17 +68,6 @@
       monochrome_android_manifest_jinja_variables + [ "target_sdk_version=24" ]
 }
 
-java_cpp_template("chrome_webapk_signature_srcjar") {
-  sources = [
-    "java/src/org/chromium/chrome/browser/webapps/ChromeWebApkHostSignature.template",
-  ]
-  package_name = "org/chromium/chrome/browser/webapps"
-  inputs = [
-    "webapk/channel_keys.h",
-  ]
-  defines = [ "channel_" + android_channel ]
-}
-
 jinja_template("chrome_sync_shell_android_manifest") {
   input = "java/AndroidManifest.xml"
   output = chrome_sync_shell_android_manifest
@@ -238,7 +227,6 @@
 
   srcjar_deps = [
     ":chrome_android_java_enums_srcjar",
-    ":chrome_webapk_signature_srcjar",
     ":chrome_android_java_google_api_keys_srcjar",
     ":chrome_version_srcjar",
     ":resource_id_javagen",
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
index 0479f00..11eeae57 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
@@ -30,6 +30,7 @@
 import android.view.inputmethod.EditorInfo;
 import android.view.inputmethod.InputConnection;
 import android.view.inputmethod.InputConnectionWrapper;
+import android.widget.TextView;
 
 import org.chromium.base.ApiCompatibilityUtils;
 import org.chromium.base.Log;
@@ -1160,6 +1161,17 @@
         return mIsPastedText;
     }
 
+    @Override
+    public CharSequence getAccessibilityClassName() {
+        // When UrlBar is used as a read-only TextView, force Talkback to pronounce it like
+        // TextView. Otherwise Talkback will say "Edit box, http://...". crbug.com/636988
+        if (isEnabled()) {
+            return super.getAccessibilityClassName();
+        } else {
+            return TextView.class.getName();
+        }
+    }
+
     private void notifyAutocompleteTextStateChanged(boolean textDeleted) {
         if (mUrlBarDelegate == null) return;
         if (!hasFocus()) return;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/ChromeWebApkHostSignature.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/ChromeWebApkHostSignature.java
new file mode 100644
index 0000000..8ccf454
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/ChromeWebApkHostSignature.java
@@ -0,0 +1,68 @@
+// 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.
+
+package org.chromium.chrome.browser.webapps;
+
+public class ChromeWebApkHostSignature {
+
+    // The public key to verify whether a WebAPK is signed by WebAPK Server.
+    static final byte[] EXPECTED_SIGNATURE = new byte[] {48, -126, 4, 104, 48, -126, 2, -48, -96, 3,
+            2, 1, 2, 2, 20, 120, 33, -22, -36, -115, 7, 116, 66, 116, 113, -122, -126, -124, 32, 44,
+            72, -43, 127, -13, -11, 48, 13, 6, 9, 42, -122, 72, -122, -9, 13, 1, 1, 11, 5, 0, 48,
+            67, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 85, 83, 49, 15, 48, 13, 6, 3, 85, 4, 10, 19,
+            6, 71, 111, 111, 103, 108, 101, 49, 22, 48, 20, 6, 3, 85, 4, 11, 19, 13, 67, 104, 114,
+            111, 109, 101, 32, 87, 101, 98, 65, 80, 75, 49, 11, 48, 9, 6, 3, 85, 4, 3, 19, 2, 67,
+            65, 48, 30, 23, 13, 49, 54, 48, 56, 50, 51, 50, 48, 48, 56, 49, 49, 90, 23, 13, 52, 52,
+            48, 49, 49, 48, 50, 48, 48, 56, 49, 49, 90, 48, 67, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19,
+            2, 85, 83, 49, 15, 48, 13, 6, 3, 85, 4, 10, 19, 6, 71, 111, 111, 103, 108, 101, 49, 22,
+            48, 20, 6, 3, 85, 4, 11, 19, 13, 67, 104, 114, 111, 109, 101, 32, 87, 101, 98, 65, 80,
+            75, 49, 11, 48, 9, 6, 3, 85, 4, 3, 19, 2, 67, 65, 48, -126, 1, -94, 48, 13, 6, 9, 42,
+            -122, 72, -122, -9, 13, 1, 1, 1, 5, 0, 3, -126, 1, -113, 0, 48, -126, 1, -118, 2, -126,
+            1, -127, 0, -60, 57, -128, 54, 45, -71, -75, 1, 42, 100, 64, 111, -6, 104, -8, -57, -45,
+            42, 33, 124, 43, 20, -115, -88, -100, -115, -19, 90, 25, 16, 50, -96, 27, 4, 64, -65,
+            92, -74, 61, 98, 54, 88, 122, -71, -116, -86, -26, -30, -34, -16, -87, -113, 103, -81,
+            -76, -2, -120, -124, -70, 41, 30, 46, 75, 119, 22, 61, 92, -8, 92, 55, 8, -53, -70, 100,
+            40, 77, 77, 10, -5, -74, 37, 48, -71, 108, 92, -72, -56, 17, 39, -11, 61, -86, -52, -3,
+            -128, 72, 68, 27, 28, -128, -126, 91, 64, -117, -67, 58, 114, -70, 112, -44, -70, -51,
+            -81, -95, -78, 12, -1, 123, 68, -96, -32, -76, 65, -59, 37, -31, 88, 34, -125, -67, 58,
+            77, 75, -112, 23, 127, -15, -45, 56, -10, 46, -40, -82, -49, 42, 35, 127, -70, 120, -37,
+            8, 24, 38, 59, -1, -39, -104, -85, 101, 43, 39, 107, -35, -7, -80, -38, -47, -86, -53,
+            -94, 11, 62, 86, 78, 72, 90, -54, 5, 21, -72, -122, 14, 102, 95, -81, 94, -11, -101, 36,
+            -31, 104, -66, -51, 24, -99, 74, 21, -106, 76, 67, 86, 49, 121, 59, -7, 79, -87, -115,
+            27, -82, -98, 15, -5, 13, -90, -20, 70, 17, -68, 124, 82, 35, 53, 76, -52, 69, 23, -97,
+            -2, -117, 7, -27, 79, 46, -54, -99, 41, -22, -108, -25, 8, 108, 109, -23, 13, -11, 56,
+            11, -71, 20, 37, -64, -13, -114, -34, -78, -49, 7, 45, 80, 7, 69, 106, 3, -128, 70, 0,
+            41, -105, 76, 106, -114, 18, -22, 92, -113, -12, 109, 11, 111, 48, -63, 22, 29, -5,
+            -113, -2, 117, -105, 1, -21, 40, 23, -8, -36, -109, -41, -1, 92, 94, 51, 122, -67, -116,
+            -64, 28, 38, 112, 4, -25, -18, -92, 53, -119, -37, 58, -28, 62, -88, 126, -66, -113,
+            -101, 57, -66, -48, -88, -47, -65, -65, 108, -116, -52, -87, -33, 30, 121, -6, -50, -97,
+            99, -102, 106, -31, 119, -26, -49, 63, 90, -19, 119, 103, -83, 125, 29, -32, -102, -97,
+            -99, -45, 59, 36, 30, 58, 28, 59, 2, 48, 0, -76, 108, 98, 62, 68, -11, -82, -74, -38,
+            93, -22, -79, -110, 73, 13, 2, 3, 1, 0, 1, -93, 84, 48, 82, 48, 14, 6, 3, 85, 29, 15, 1,
+            1, -1, 4, 4, 3, 2, 2, -92, 48, 19, 6, 3, 85, 29, 37, 4, 12, 48, 10, 6, 8, 43, 6, 1, 5,
+            5, 7, 3, 1, 48, 12, 6, 3, 85, 29, 19, 1, 1, -1, 4, 2, 48, 0, 48, 29, 6, 3, 85, 29, 14,
+            4, 22, 4, 20, 62, -89, -113, -1, -62, -65, -19, 4, 56, -51, 41, -53, 51, 41, -28, -42,
+            -36, 31, -89, -19, 48, 13, 6, 9, 42, -122, 72, -122, -9, 13, 1, 1, 11, 5, 0, 3, -126, 1,
+            -127, 0, 27, -3, -41, -125, 123, -93, 20, -83, -83, -13, -120, -13, -123, 29, 107, -9,
+            77, -75, -118, 106, 5, 113, -11, 40, -84, 98, -126, -55, 39, 77, -87, -53, -5, 122, -63,
+            -108, 23, 112, -88, 17, 28, 15, -103, 75, 75, 123, -21, 119, 125, -78, -125, 87, 78, 41,
+            -103, 6, 9, 91, 89, 42, 86, 25, -62, -30, 117, 22, -107, 53, 66, 56, -23, -115, 16, -85,
+            -38, 77, -117, -87, 106, -4, -91, 36, 81, 40, -31, 123, -40, 69, -119, -69, -83, -78,
+            64, 123, 46, 36, 31, -29, 64, 36, -8, -22, -93, 22, -48, -49, 11, -67, 48, -1, 26, 94,
+            -82, 65, 6, 82, 18, 91, -56, 118, -55, 111, -18, -114, -86, -98, -3, 40, -48, -46, -102,
+            -120, 20, 101, -60, 91, -103, -92, 43, 12, -104, -10, -60, 10, -31, -26, 111, -125, 103,
+            102, -105, 116, -66, -89, -58, 11, 34, 1, 22, 112, 126, 81, 115, -104, -120, 115, -43,
+            -59, 50, -67, -42, -42, 122, -66, 57, 121, 30, -22, -8, 96, 114, -110, -98, 102, 41,
+            -64, 115, -44, -84, 10, 63, 19, -105, 118, -2, 98, 45, -49, 94, 114, 81, -84, -111, -34,
+            -23, 49, 73, 91, 76, 81, 90, 86, 112, 12, -87, -41, -61, -82, 32, -87, -7, 95, -28, -25,
+            -9, -38, -102, 54, -81, -109, -126, 59, -82, 103, 126, -92, -51, -81, 44, 61, 103, 127,
+            -1, -23, -84, -35, -43, -88, 41, 120, 76, 120, 39, -124, 81, 90, 64, 69, 112, 18, 54,
+            -115, -7, 12, -110, 105, 48, -44, 88, 35, -104, 107, -83, -4, -16, 123, 59, -13, 121,
+            63, -89, 118, 100, 38, 118, -30, 9, -57, -54, -108, -26, -45, 29, -22, 57, -81, 83,
+            -124, -114, -50, 16, 78, 23, -41, -4, 119, -13, -68, 38, -23, 56, 22, -96, -63, -27, 70,
+            -94, -35, 111, -45, -9, 59, -90, -27, 103, 95, 16, 127, -118, -98, -75, -52, 7, 32, 65,
+            -27, -68, 62, -81, 98, -54, -80, -23, 59, 38, -127, 96, 71, 123, 34, -113, -23, -80, 32,
+            -97, -55, -100, 121, 120, 50, -48, 58, 69, -105, 26, 126, 30, -1, -112, -41, -18, -16,
+            62, 48, -22, -2, 19, 117, -6, 59, 74, -13, 92, -1};
+}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/ChromeWebApkHostSignature.template b/chrome/android/java/src/org/chromium/chrome/browser/webapps/ChromeWebApkHostSignature.template
deleted file mode 100644
index 7575c732..0000000
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/ChromeWebApkHostSignature.template
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.chrome.browser.webapps;
-
-public abstract class ChromeWebApkHostSignature {
-
-    // The public key to verify whether a WebAPK is signed by WebAPK Server.
-    #include "chrome/android/webapk/channel_keys.h"
-    static final byte[] EXPECTED_SIGNATURE = new byte[] { SIGNATURE };
-}
diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
index b7ccd7f..13be379 100644
--- a/chrome/android/java_sources.gni
+++ b/chrome/android/java_sources.gni
@@ -1049,6 +1049,7 @@
   "java/src/org/chromium/chrome/browser/webapps/AddToHomescreenDialog.java",
   "java/src/org/chromium/chrome/browser/webapps/AddToHomescreenManager.java",
   "java/src/org/chromium/chrome/browser/webapps/ChromeWebApkHost.java",
+  "java/src/org/chromium/chrome/browser/webapps/ChromeWebApkHostSignature.java",
   "java/src/org/chromium/chrome/browser/webapps/FullScreenActivity.java",
   "java/src/org/chromium/chrome/browser/webapps/FullScreenDelegateFactory.java",
   "java/src/org/chromium/chrome/browser/webapps/GooglePlayWebApkInstallDelegate.java",
diff --git a/chrome/android/webapk/channel_keys.h b/chrome/android/webapk/channel_keys.h
deleted file mode 100644
index 8418f71..0000000
--- a/chrome/android/webapk/channel_keys.h
+++ /dev/null
@@ -1,5 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#define SIGNATURE 48, -126, 4, 104, 48, -126, 2, -48, -96, 3, 2, 1, 2, 2, 20, 120, 33, -22, -36, -115, 7, 116, 66, 116, 113, -122, -126, -124, 32, 44, 72, -43, 127, -13, -11, 48, 13, 6, 9, 42, -122, 72, -122, -9, 13, 1, 1, 11, 5, 0, 48, 67, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 85, 83, 49, 15, 48, 13, 6, 3, 85, 4, 10, 19, 6, 71, 111, 111, 103, 108, 101, 49, 22, 48, 20, 6, 3, 85, 4, 11, 19, 13, 67, 104, 114, 111, 109, 101, 32, 87, 101, 98, 65, 80, 75, 49, 11, 48, 9, 6, 3, 85, 4, 3, 19, 2, 67, 65, 48, 30, 23, 13, 49, 54, 48, 56, 50, 51, 50, 48, 48, 56, 49, 49, 90, 23, 13, 52, 52, 48, 49, 49, 48, 50, 48, 48, 56, 49, 49, 90, 48, 67, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 85, 83, 49, 15, 48, 13, 6, 3, 85, 4, 10, 19, 6, 71, 111, 111, 103, 108, 101, 49, 22, 48, 20, 6, 3, 85, 4, 11, 19, 13, 67, 104, 114, 111, 109, 101, 32, 87, 101, 98, 65, 80, 75, 49, 11, 48, 9, 6, 3, 85, 4, 3, 19, 2, 67, 65, 48, -126, 1, -94, 48, 13, 6, 9, 42, -122, 72, -122, -9, 13, 1, 1, 1, 5, 0, 3, -126, 1, -113, 0, 48, -126, 1, -118, 2, -126, 1, -127, 0, -60, 57, -128, 54, 45, -71, -75, 1, 42, 100, 64, 111, -6, 104, -8, -57, -45, 42, 33, 124, 43, 20, -115, -88, -100, -115, -19, 90, 25, 16, 50, -96, 27, 4, 64, -65, 92, -74, 61, 98, 54, 88, 122, -71, -116, -86, -26, -30, -34, -16, -87, -113, 103, -81, -76, -2, -120, -124, -70, 41, 30, 46, 75, 119, 22, 61, 92, -8, 92, 55, 8, -53, -70, 100, 40, 77, 77, 10, -5, -74, 37, 48, -71, 108, 92, -72, -56, 17, 39, -11, 61, -86, -52, -3, -128, 72, 68, 27, 28, -128, -126, 91, 64, -117, -67, 58, 114, -70, 112, -44, -70, -51, -81, -95, -78, 12, -1, 123, 68, -96, -32, -76, 65, -59, 37, -31, 88, 34, -125, -67, 58, 77, 75, -112, 23, 127, -15, -45, 56, -10, 46, -40, -82, -49, 42, 35, 127, -70, 120, -37, 8, 24, 38, 59, -1, -39, -104, -85, 101, 43, 39, 107, -35, -7, -80, -38, -47, -86, -53, -94, 11, 62, 86, 78, 72, 90, -54, 5, 21, -72, -122, 14, 102, 95, -81, 94, -11, -101, 36, -31, 104, -66, -51, 24, -99, 74, 21, -106, 76, 67, 86, 49, 121, 59, -7, 79, -87, -115, 27, -82, -98, 15, -5, 13, -90, -20, 70, 17, -68, 124, 82, 35, 53, 76, -52, 69, 23, -97, -2, -117, 7, -27, 79, 46, -54, -99, 41, -22, -108, -25, 8, 108, 109, -23, 13, -11, 56, 11, -71, 20, 37, -64, -13, -114, -34, -78, -49, 7, 45, 80, 7, 69, 106, 3, -128, 70, 0, 41, -105, 76, 106, -114, 18, -22, 92, -113, -12, 109, 11, 111, 48, -63, 22, 29, -5, -113, -2, 117, -105, 1, -21, 40, 23, -8, -36, -109, -41, -1, 92, 94, 51, 122, -67, -116, -64, 28, 38, 112, 4, -25, -18, -92, 53, -119, -37, 58, -28, 62, -88, 126, -66, -113, -101, 57, -66, -48, -88, -47, -65, -65, 108, -116, -52, -87, -33, 30, 121, -6, -50, -97, 99, -102, 106, -31, 119, -26, -49, 63, 90, -19, 119, 103, -83, 125, 29, -32, -102, -97, -99, -45, 59, 36, 30, 58, 28, 59, 2, 48, 0, -76, 108, 98, 62, 68, -11, -82, -74, -38, 93, -22, -79, -110, 73, 13, 2, 3, 1, 0, 1, -93, 84, 48, 82, 48, 14, 6, 3, 85, 29, 15, 1, 1, -1, 4, 4, 3, 2, 2, -92, 48, 19, 6, 3, 85, 29, 37, 4, 12, 48, 10, 6, 8, 43, 6, 1, 5, 5, 7, 3, 1, 48, 12, 6, 3, 85, 29, 19, 1, 1, -1, 4, 2, 48, 0, 48, 29, 6, 3, 85, 29, 14, 4, 22, 4, 20, 62, -89, -113, -1, -62, -65, -19, 4, 56, -51, 41, -53, 51, 41, -28, -42, -36, 31, -89, -19, 48, 13, 6, 9, 42, -122, 72, -122, -9, 13, 1, 1, 11, 5, 0, 3, -126, 1, -127, 0, 27, -3, -41, -125, 123, -93, 20, -83, -83, -13, -120, -13, -123, 29, 107, -9, 77, -75, -118, 106, 5, 113, -11, 40, -84, 98, -126, -55, 39, 77, -87, -53, -5, 122, -63, -108, 23, 112, -88, 17, 28, 15, -103, 75, 75, 123, -21, 119, 125, -78, -125, 87, 78, 41, -103, 6, 9, 91, 89, 42, 86, 25, -62, -30, 117, 22, -107, 53, 66, 56, -23, -115, 16, -85, -38, 77, -117, -87, 106, -4, -91, 36, 81, 40, -31, 123, -40, 69, -119, -69, -83, -78, 64, 123, 46, 36, 31, -29, 64, 36, -8, -22, -93, 22, -48, -49, 11, -67, 48, -1, 26, 94, -82, 65, 6, 82, 18, 91, -56, 118, -55, 111, -18, -114, -86, -98, -3, 40, -48, -46, -102, -120, 20, 101, -60, 91, -103, -92, 43, 12, -104, -10, -60, 10, -31, -26, 111, -125, 103, 102, -105, 116, -66, -89, -58, 11, 34, 1, 22, 112, 126, 81, 115, -104, -120, 115, -43, -59, 50, -67, -42, -42, 122, -66, 57, 121, 30, -22, -8, 96, 114, -110, -98, 102, 41, -64, 115, -44, -84, 10, 63, 19, -105, 118, -2, 98, 45, -49, 94, 114, 81, -84, -111, -34, -23, 49, 73, 91, 76, 81, 90, 86, 112, 12, -87, -41, -61, -82, 32, -87, -7, 95, -28, -25, -9, -38, -102, 54, -81, -109, -126, 59, -82, 103, 126, -92, -51, -81, 44, 61, 103, 127, -1, -23, -84, -35, -43, -88, 41, 120, 76, 120, 39, -124, 81, 90, 64, 69, 112, 18, 54, -115, -7, 12, -110, 105, 48, -44, 88, 35, -104, 107, -83, -4, -16, 123, 59, -13, 121, 63, -89, 118, 100, 38, 118, -30, 9, -57, -54, -108, -26, -45, 29, -22, 57, -81, 83, -124, -114, -50, 16, 78, 23, -41, -4, 119, -13, -68, 38, -23, 56, 22, -96, -63, -27, 70, -94, -35, 111, -45, -9, 59, -90, -27, 103, 95, 16, 127, -118, -98, -75, -52, 7, 32, 65, -27, -68, 62, -81, 98, -54, -80, -23, 59, 38, -127, 96, 71, 123, 34, -113, -23, -80, 32, -97, -55, -100, 121, 120, 50, -48, 58, 69, -105, 26, 126, 30, -1, -112, -41, -18, -16, 62, 48, -22, -2, 19, 117, -6, 59, 74, -13, 92, -1
diff --git a/chrome/app/vector_icons/BUILD.gn b/chrome/app/vector_icons/BUILD.gn
index abc780f..9561cbd 100644
--- a/chrome/app/vector_icons/BUILD.gn
+++ b/chrome/app/vector_icons/BUILD.gn
@@ -8,6 +8,8 @@
   script = "//ui/gfx/vector_icons/aggregate_vector_icons.py"
 
   icons = [
+    "autologin.icon",
+    "bluetooth_connected.icon",
     "browser_tools.icon",
     "browser_tools_error.icon",
     "browser_tools_update.icon",
@@ -15,6 +17,17 @@
     "caret_down.icon",
     "caret_up.1x.icon",
     "caret_up.icon",
+    "crashed_tab.icon",
+    "credit_card.1x.icon",
+    "credit_card.icon",
+    "folder.1x.icon",
+    "folder.icon",
+    "folder_managed.1x.icon",
+    "folder_managed.icon",
+    "folder_supervised.1x.icon",
+    "folder_supervised.icon",
+    "incognito.1x.icon",
+    "incognito.icon",
     "laptop.icon",
     "navigate_back.1x.icon",
     "navigate_back.icon",
@@ -26,6 +39,8 @@
     "navigate_reload.icon",
     "navigate_stop.1x.icon",
     "navigate_stop.icon",
+    "overflow_chevron.1x.icon",
+    "overflow_chevron.icon",
     "smartphone.icon",
     "tab.icon",
     "tab_audio.1x.icon",
@@ -42,6 +57,9 @@
     "tab_usb_connected.1x.icon",
     "tab_usb_connected.icon",
     "tablet.icon",
+    "translate.icon",
+    "zoom_minus.icon",
+    "zoom_plus.icon",
   ]
 
   output_cc = "$target_gen_dir/vector_icons.cc"
diff --git a/ui/gfx/vector_icons/autologin.icon b/chrome/app/vector_icons/autologin.icon
similarity index 100%
rename from ui/gfx/vector_icons/autologin.icon
rename to chrome/app/vector_icons/autologin.icon
diff --git a/ui/gfx/vector_icons/bluetooth_connected.icon b/chrome/app/vector_icons/bluetooth_connected.icon
similarity index 100%
rename from ui/gfx/vector_icons/bluetooth_connected.icon
rename to chrome/app/vector_icons/bluetooth_connected.icon
diff --git a/ui/gfx/vector_icons/crashed_tab.icon b/chrome/app/vector_icons/crashed_tab.icon
similarity index 100%
rename from ui/gfx/vector_icons/crashed_tab.icon
rename to chrome/app/vector_icons/crashed_tab.icon
diff --git a/ui/gfx/vector_icons/credit_card.1x.icon b/chrome/app/vector_icons/credit_card.1x.icon
similarity index 100%
rename from ui/gfx/vector_icons/credit_card.1x.icon
rename to chrome/app/vector_icons/credit_card.1x.icon
diff --git a/ui/gfx/vector_icons/credit_card.icon b/chrome/app/vector_icons/credit_card.icon
similarity index 100%
rename from ui/gfx/vector_icons/credit_card.icon
rename to chrome/app/vector_icons/credit_card.icon
diff --git a/ui/gfx/vector_icons/folder.1x.icon b/chrome/app/vector_icons/folder.1x.icon
similarity index 100%
rename from ui/gfx/vector_icons/folder.1x.icon
rename to chrome/app/vector_icons/folder.1x.icon
diff --git a/ui/gfx/vector_icons/folder.icon b/chrome/app/vector_icons/folder.icon
similarity index 100%
rename from ui/gfx/vector_icons/folder.icon
rename to chrome/app/vector_icons/folder.icon
diff --git a/ui/gfx/vector_icons/folder_managed.1x.icon b/chrome/app/vector_icons/folder_managed.1x.icon
similarity index 100%
rename from ui/gfx/vector_icons/folder_managed.1x.icon
rename to chrome/app/vector_icons/folder_managed.1x.icon
diff --git a/ui/gfx/vector_icons/folder_managed.icon b/chrome/app/vector_icons/folder_managed.icon
similarity index 100%
rename from ui/gfx/vector_icons/folder_managed.icon
rename to chrome/app/vector_icons/folder_managed.icon
diff --git a/ui/gfx/vector_icons/folder_supervised.1x.icon b/chrome/app/vector_icons/folder_supervised.1x.icon
similarity index 100%
rename from ui/gfx/vector_icons/folder_supervised.1x.icon
rename to chrome/app/vector_icons/folder_supervised.1x.icon
diff --git a/ui/gfx/vector_icons/folder_supervised.icon b/chrome/app/vector_icons/folder_supervised.icon
similarity index 100%
rename from ui/gfx/vector_icons/folder_supervised.icon
rename to chrome/app/vector_icons/folder_supervised.icon
diff --git a/ui/gfx/vector_icons/incognito.1x.icon b/chrome/app/vector_icons/incognito.1x.icon
similarity index 100%
rename from ui/gfx/vector_icons/incognito.1x.icon
rename to chrome/app/vector_icons/incognito.1x.icon
diff --git a/ui/gfx/vector_icons/incognito.icon b/chrome/app/vector_icons/incognito.icon
similarity index 100%
rename from ui/gfx/vector_icons/incognito.icon
rename to chrome/app/vector_icons/incognito.icon
diff --git a/ui/gfx/vector_icons/overflow_chevron.1x.icon b/chrome/app/vector_icons/overflow_chevron.1x.icon
similarity index 100%
rename from ui/gfx/vector_icons/overflow_chevron.1x.icon
rename to chrome/app/vector_icons/overflow_chevron.1x.icon
diff --git a/ui/gfx/vector_icons/overflow_chevron.icon b/chrome/app/vector_icons/overflow_chevron.icon
similarity index 100%
rename from ui/gfx/vector_icons/overflow_chevron.icon
rename to chrome/app/vector_icons/overflow_chevron.icon
diff --git a/ui/gfx/vector_icons/translate.icon b/chrome/app/vector_icons/translate.icon
similarity index 100%
rename from ui/gfx/vector_icons/translate.icon
rename to chrome/app/vector_icons/translate.icon
diff --git a/chrome/app/vector_icons/vector_icons.h.template b/chrome/app/vector_icons/vector_icons.h.template
index 4bc81a72..22ba0a16 100644
--- a/chrome/app/vector_icons/vector_icons.h.template
+++ b/chrome/app/vector_icons/vector_icons.h.template
@@ -17,4 +17,6 @@
 
 TEMPLATE_PLACEHOLDER
 
+#undef VECTOR_ICON_TEMPLATE_H
+
 #endif  // CHROME_APP_VECTOR_ICONS_VECTOR_ICONS_H_
diff --git a/ui/gfx/vector_icons/zoom_minus.icon b/chrome/app/vector_icons/zoom_minus.icon
similarity index 100%
rename from ui/gfx/vector_icons/zoom_minus.icon
rename to chrome/app/vector_icons/zoom_minus.icon
diff --git a/ui/gfx/vector_icons/zoom_plus.icon b/chrome/app/vector_icons/zoom_plus.icon
similarity index 100%
rename from ui/gfx/vector_icons/zoom_plus.icon
rename to chrome/app/vector_icons/zoom_plus.icon
diff --git a/chrome/browser/background_sync/OWNERS b/chrome/browser/background_sync/OWNERS
index c60b9f9..a97cadfa 100644
--- a/chrome/browser/background_sync/OWNERS
+++ b/chrome/browser/background_sync/OWNERS
@@ -1,2 +1,4 @@
 iclelland@chromium.org
 jkarlin@chromium.org
+
+# COMPONENT: Blink>BackgroundSync
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 00f3d7c..4d3d5dd 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1624,7 +1624,7 @@
   // Profile creation ----------------------------------------------------------
 
   metrics::MetricsService::SetExecutionPhase(
-      metrics::MetricsService::CREATE_PROFILE,
+      metrics::ExecutionPhase::CREATE_PROFILE,
       g_browser_process->local_state());
 
   UMA_HISTOGRAM_TIMES("Startup.PreMainMessageLoopRunImplStep1Time",
@@ -1793,7 +1793,7 @@
   // ThreadWatcher takes over or when browser is shutdown or when
   // startup_watcher_ is deleted.
   metrics::MetricsService::SetExecutionPhase(
-      metrics::MetricsService::STARTUP_TIMEBOMB_ARM,
+      metrics::ExecutionPhase::STARTUP_TIMEBOMB_ARM,
       g_browser_process->local_state());
   startup_watcher_->Arm(base::TimeDelta::FromSeconds(600));
 
@@ -1817,7 +1817,7 @@
 
   // Start watching all browser threads for responsiveness.
   metrics::MetricsService::SetExecutionPhase(
-      metrics::MetricsService::THREAD_WATCHER_START,
+      metrics::ExecutionPhase::THREAD_WATCHER_START,
       g_browser_process->local_state());
   ThreadWatcherList::StartWatchingAll(parsed_command_line());
 
@@ -1995,7 +1995,7 @@
   performance_monitor::PerformanceMonitor::GetInstance()->StartGatherCycle();
 
   metrics::MetricsService::SetExecutionPhase(
-      metrics::MetricsService::MAIN_MESSAGE_LOOP_RUN,
+      metrics::ExecutionPhase::MAIN_MESSAGE_LOOP_RUN,
       g_browser_process->local_state());
   run_loop.Run();
 
@@ -2019,7 +2019,7 @@
   // Start watching for jank during shutdown. It gets disarmed when
   // |shutdown_watcher_| object is destructed.
   metrics::MetricsService::SetExecutionPhase(
-      metrics::MetricsService::SHUTDOWN_TIMEBOMB_ARM,
+      metrics::ExecutionPhase::SHUTDOWN_TIMEBOMB_ARM,
       g_browser_process->local_state());
   shutdown_watcher_->Arm(base::TimeDelta::FromSeconds(300));
 
diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
index a73ef31..5e9fb9c 100644
--- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
+++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
@@ -480,11 +480,6 @@
   // ProfileHelper has to be initialized after UserManager instance is created.
   ProfileHelper::Get()->Initialize();
 
-  // TODO(abarth): Should this move to InitializeNetworkOptions()?
-  // Allow access to file:// on ChromeOS for tests.
-  if (parsed_command_line().HasSwitch(::switches::kAllowFileAccess))
-    ChromeNetworkDelegate::AllowAccessToAllFiles();
-
   // If kLoginUser is passed this indicates that user has already
   // logged in and we should behave accordingly.
   bool immediate_login =
diff --git a/chrome/browser/chromeos/login/signin/oauth2_login_manager.cc b/chrome/browser/chromeos/login/signin/oauth2_login_manager.cc
index 69f2f86..3a768062 100644
--- a/chrome/browser/chromeos/login/signin/oauth2_login_manager.cc
+++ b/chrome/browser/chromeos/login/signin/oauth2_login_manager.cc
@@ -96,6 +96,12 @@
 }
 
 void OAuth2LoginManager::RestoreSessionFromSavedTokens() {
+  // Just return if there is a pending TokenService::LoadCredentials call.
+  // Session restore continues in OnRefreshTokenAvailable when the call
+  // finishes.
+  if (pending_token_service_load_)
+    return;
+
   ProfileOAuth2TokenService* token_service = GetTokenService();
   const std::string& primary_account_id = GetPrimaryAccountId();
   if (token_service->RefreshTokenIsAvailable(primary_account_id)) {
@@ -113,6 +119,7 @@
         AccountId::FromUserEmail(primary_account_id),
         user_manager::User::OAUTH_TOKEN_STATUS_UNKNOWN);
 
+    pending_token_service_load_ = true;
     token_service->LoadCredentials(primary_account_id);
   }
 }
@@ -153,6 +160,8 @@
     user_manager::UserManager::Get()->SaveUserOAuthStatus(
         AccountId::FromUserEmail(user_email),
         user_manager::User::OAUTH2_TOKEN_STATUS_VALID);
+
+    pending_token_service_load_ = false;
     VerifySessionCookies();
   }
 }
diff --git a/chrome/browser/chromeos/login/signin/oauth2_login_manager.h b/chrome/browser/chromeos/login/signin/oauth2_login_manager.h
index f35e47e..cf06ef0 100644
--- a/chrome/browser/chromeos/login/signin/oauth2_login_manager.h
+++ b/chrome/browser/chromeos/login/signin/oauth2_login_manager.h
@@ -235,6 +235,9 @@
   SessionRestoreStrategy restore_strategy_;
   SessionRestoreState state_;
 
+  // Whether there is pending TokenService::LoadCredentials call.
+  bool pending_token_service_load_ = false;
+
   std::unique_ptr<OAuth2TokenFetcher> oauth2_token_fetcher_;
   std::unique_ptr<OAuth2LoginVerifier> login_verifier_;
   std::unique_ptr<gaia::GaiaOAuthClient> account_info_fetcher_;
diff --git a/chrome/browser/chromeos/login/signin_screen_controller.cc b/chrome/browser/chromeos/login/signin_screen_controller.cc
index 5e524b7..71475fd4 100644
--- a/chrome/browser/chromeos/login/signin_screen_controller.cc
+++ b/chrome/browser/chromeos/login/signin_screen_controller.cc
@@ -28,9 +28,13 @@
   user_selection_screen_.reset(new ChromeUserSelectionScreen(display_type));
   user_selection_screen_->SetLoginDisplayDelegate(login_display_delegate);
 
-  UserBoardView* user_board_view = oobe_ui_->GetUserBoardScreenActor();
-  user_selection_screen_->SetView(user_board_view);
-  user_board_view->Bind(*user_selection_screen_.get());
+  user_board_view_ = oobe_ui_->GetUserBoardScreenActor()->GetWeakPtr();
+  user_selection_screen_->SetView(user_board_view_.get());
+  // TODO(jdufault): Bind and Unbind should be controlled by either the
+  // Model/View which are then each responsible for automatically unbinding the
+  // other associated View/Model instance. Then we can eliminate this exposed
+  // WeakPtr logic. See crbug.com/685287.
+  user_board_view_->Bind(*user_selection_screen_);
 
   registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED,
                  content::NotificationService::AllSources());
@@ -38,6 +42,9 @@
 }
 
 SignInScreenController::~SignInScreenController() {
+  if (user_board_view_)
+    user_board_view_->Unbind();
+
   user_manager::UserManager::Get()->RemoveObserver(this);
   instance_ = nullptr;
 }
diff --git a/chrome/browser/chromeos/login/signin_screen_controller.h b/chrome/browser/chromeos/login/signin_screen_controller.h
index 02d6786..8765693f 100644
--- a/chrome/browser/chromeos/login/signin_screen_controller.h
+++ b/chrome/browser/chromeos/login/signin_screen_controller.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_SCREEN_CONTROLLER_H_
 
 #include "base/macros.h"
+#include "base/memory/weak_ptr.h"
 #include "chrome/browser/chromeos/login/screens/gaia_screen.h"
 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h"
 #include "chrome/browser/chromeos/login/ui/login_display_host.h"
@@ -81,6 +82,8 @@
   std::unique_ptr<GaiaScreen> gaia_screen_;
   std::unique_ptr<UserSelectionScreen> user_selection_screen_;
 
+  base::WeakPtr<UserBoardView> user_board_view_;
+
   // Used for notifications during the login process.
   content::NotificationRegistrar registrar_;
 
diff --git a/chrome/browser/chromeos/login/ui/views/user_board_view.h b/chrome/browser/chromeos/login/ui/views/user_board_view.h
index 416a802..1a4cf33 100644
--- a/chrome/browser/chromeos/login/ui/views/user_board_view.h
+++ b/chrome/browser/chromeos/login/ui/views/user_board_view.h
@@ -8,6 +8,7 @@
 #include <memory>
 #include <string>
 
+#include "base/memory/weak_ptr.h"
 #include "base/strings/string16.h"
 #include "base/values.h"
 #include "components/proximity_auth/screenlock_bridge.h"
@@ -27,6 +28,8 @@
   virtual void Bind(UserBoardModel& model) = 0;
   virtual void Unbind() = 0;
 
+  virtual base::WeakPtr<UserBoardView> GetWeakPtr() = 0;
+
   virtual void SetPublicSessionDisplayName(const AccountId& account_id,
                                            const std::string& display_name) = 0;
   virtual void SetPublicSessionLocales(const AccountId& account_id,
diff --git a/chrome/browser/download/download_target_determiner.cc b/chrome/browser/download/download_target_determiner.cc
index 8949f08..5c071c7 100644
--- a/chrome/browser/download/download_target_determiner.cc
+++ b/chrome/browser/download/download_target_determiner.cc
@@ -207,7 +207,6 @@
     // (WebStore, Drag&Drop). Treat the path as a virtual path. We will
     // eventually determine whether this is a local path and if not, figure out
     // a local path.
-
     std::string suggested_filename = download_->GetSuggestedFilename();
     if (suggested_filename.empty() &&
         download_->GetMimeType() == "application/x-x509-user-cert") {
@@ -233,12 +232,18 @@
     } else {
       target_directory = download_prefs_->DownloadPath();
     }
-    virtual_path_ = target_directory.Append(generated_filename);
 #if defined(OS_ANDROID)
-    conflict_action_ = DownloadPathReservationTracker::PROMPT;
+    // If |virtual_path_| is not empty, we are resuming a download which already
+    // has a target path. Don't prompt user in this case.
+    if (!virtual_path_.empty()) {
+      conflict_action_ = DownloadPathReservationTracker::UNIQUIFY;
+    } else {
+      conflict_action_ = DownloadPathReservationTracker::PROMPT;
+    }
 #else
     conflict_action_ = DownloadPathReservationTracker::UNIQUIFY;
 #endif
+    virtual_path_ = target_directory.Append(generated_filename);
     should_notify_extensions_ = true;
   } else {
     virtual_path_ = download_->GetForcedFilePath();
@@ -620,7 +625,6 @@
 DownloadTargetDeterminer::Result
     DownloadTargetDeterminer::DoCheckVisitedReferrerBefore() {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
-
   next_state_ = STATE_DETERMINE_INTERMEDIATE_PATH;
 
   // Checking if there are prior visits to the referrer is only necessary if the
diff --git a/chrome/browser/download/download_target_determiner_unittest.cc b/chrome/browser/download/download_target_determiner_unittest.cc
index 68585ab..72e18273 100644
--- a/chrome/browser/download/download_target_determiner_unittest.cc
+++ b/chrome/browser/download/download_target_determiner_unittest.cc
@@ -1569,7 +1569,14 @@
     // type == AUTOMATIC.
     EXPECT_CALL(*delegate(), NotifyExtensions(_, _, _))
         .Times(test_case.test_type == AUTOMATIC ? 1 : 0);
-    EXPECT_CALL(*delegate(), ReserveVirtualPath(_, expected_path, false, _, _));
+    // When resuming an AUTOMATIC download with non-empty initial path, the file
+    // name conflict action should be UNIQUIFY.
+    DownloadPathReservationTracker::FilenameConflictAction action =
+        test_case.test_type == AUTOMATIC ?
+            DownloadPathReservationTracker::UNIQUIFY :
+            DownloadPathReservationTracker::OVERWRITE;
+    EXPECT_CALL(*delegate(), ReserveVirtualPath(
+        _, expected_path, false, action, _));
     EXPECT_CALL(*delegate(), PromptUserForDownloadPath(_, expected_path, _))
         .Times(0);
     EXPECT_CALL(*delegate(), DetermineLocalPath(_, expected_path, _));
diff --git a/chrome/browser/lifetime/application_lifetime.cc b/chrome/browser/lifetime/application_lifetime.cc
index e603602..44eee4a 100644
--- a/chrome/browser/lifetime/application_lifetime.cc
+++ b/chrome/browser/lifetime/application_lifetime.cc
@@ -307,7 +307,7 @@
   ShutdownWatcherHelper shutdown_watcher;
   shutdown_watcher.Arm(base::TimeDelta::FromSeconds(90));
   metrics::MetricsService::SetExecutionPhase(
-      metrics::MetricsService::SHUTDOWN_TIMEBOMB_ARM,
+      metrics::ExecutionPhase::SHUTDOWN_TIMEBOMB_ARM,
       g_browser_process->local_state());
 
   browser_shutdown::OnShutdownStarting(browser_shutdown::END_SESSION);
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc
index 3b86610..0a2b6b5 100644
--- a/chrome/browser/net/chrome_network_delegate.cc
+++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -81,14 +81,6 @@
 using content::RenderViewHost;
 using content::ResourceRequestInfo;
 
-// By default we don't allow access to all file:// urls on ChromeOS and
-// Android.
-#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
-bool ChromeNetworkDelegate::g_allow_file_access_ = false;
-#else
-bool ChromeNetworkDelegate::g_allow_file_access_ = true;
-#endif
-
 namespace {
 
 const char kDNTHeader[] = "DNT";
@@ -220,11 +212,6 @@
   }
 }
 
-// static
-void ChromeNetworkDelegate::AllowAccessToAllFiles() {
-  g_allow_file_access_ = true;
-}
-
 int ChromeNetworkDelegate::OnBeforeURLRequest(
     net::URLRequest* request,
     const net::CompletionCallback& callback,
@@ -464,9 +451,6 @@
 
 bool ChromeNetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
                                             const base::FilePath& path) const {
-  if (g_allow_file_access_)
-    return true;
-
 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
   return true;
 #else
diff --git a/chrome/browser/net/chrome_network_delegate.h b/chrome/browser/net/chrome_network_delegate.h
index 241cf2c..759a0e5 100644
--- a/chrome/browser/net/chrome_network_delegate.h
+++ b/chrome/browser/net/chrome_network_delegate.h
@@ -129,10 +129,6 @@
       StringPrefMember* allowed_domains_for_apps,
       PrefService* pref_service);
 
-  // When called, all file:// URLs will now be accessible.  If this is not
-  // called, then some platforms restrict access to file:// paths.
-  static void AllowAccessToAllFiles();
-
  private:
   // NetworkDelegate implementation.
   int OnBeforeURLRequest(net::URLRequest* request,
@@ -207,9 +203,6 @@
   std::unique_ptr<domain_reliability::DomainReliabilityMonitor>
       domain_reliability_monitor_;
 
-  // When true, allow access to all file:// URLs.
-  static bool g_allow_file_access_;
-
   bool experimental_web_platform_features_enabled_;
 
   // Aggregates and reports network usage.
diff --git a/chrome/browser/ui/app_list/search/omnibox_result.cc b/chrome/browser/ui/app_list/search/omnibox_result.cc
index 6d8812af..efd3686d 100644
--- a/chrome/browser/ui/app_list/search/omnibox_result.cc
+++ b/chrome/browser/ui/app_list/search/omnibox_result.cc
@@ -15,9 +15,9 @@
 #include "components/bookmarks/browser/bookmark_model.h"
 #include "components/omnibox/browser/autocomplete_controller.h"
 #include "components/omnibox/browser/autocomplete_match_type.h"
+#include "components/omnibox/browser/vector_icons.h"
 #include "ui/app_list/app_list_constants.h"
 #include "ui/gfx/paint_vector_icon.h"
-#include "ui/gfx/vector_icons_public.h"
 #include "url/gurl.h"
 #include "url/url_canon.h"
 
@@ -168,10 +168,10 @@
   bool is_bookmarked =
       bookmark_model && bookmark_model->IsBookmarked(match_.destination_url);
 
-  gfx::VectorIconId icon_id = is_bookmarked ?
-      gfx::VectorIconId::OMNIBOX_STAR :
-      AutocompleteMatch::TypeToVectorIcon(match_.type);
-  SetIcon(gfx::CreateVectorIcon(icon_id, 16, app_list::kIconColor));
+  const gfx::VectorIcon& icon =
+      is_bookmarked ? omnibox::kStarIcon
+                    : AutocompleteMatch::TypeToVectorIcon(match_.type);
+  SetIcon(gfx::CreateVectorIcon(icon, 16, app_list::kIconColor));
 }
 
 void OmniboxResult::UpdateTitleAndDetails() {
diff --git a/chrome/browser/ui/autofill/autofill_popup_layout_model.cc b/chrome/browser/ui/autofill/autofill_popup_layout_model.cc
index a481c95..b985edd7 100644
--- a/chrome/browser/ui/autofill/autofill_popup_layout_model.cc
+++ b/chrome/browser/ui/autofill/autofill_popup_layout_model.cc
@@ -23,7 +23,10 @@
 #include "ui/gfx/geometry/rect_conversions.h"
 #include "ui/gfx/image/image_skia.h"
 #include "ui/gfx/paint_vector_icon.h"
-#include "ui/gfx/vector_icons_public.h"
+
+#if !defined(OS_ANDROID)
+#include "components/toolbar/vector_icons.h"  // nogncheck
+#endif
 
 namespace autofill {
 
@@ -208,16 +211,16 @@
   std::vector<autofill::Suggestion> suggestions = delegate_->GetSuggestions();
   const base::string16& icon_str = suggestions[index].icon;
 
-  // For http warning message, get icon images from VectorIconId, which is the
+  // For http warning message, get icon images from VectorIcon, which is the
   // same as security indicator icons in location bar.
   if (suggestions[index].frontend_id ==
       POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE) {
     if (icon_str == base::ASCIIToUTF16("httpWarning")) {
-      return gfx::CreateVectorIcon(gfx::VectorIconId::LOCATION_BAR_HTTP,
-                                   kHttpWarningIconWidth, gfx::kChromeIconGrey);
+      return gfx::CreateVectorIcon(toolbar::kHttpIcon, kHttpWarningIconWidth,
+                                   gfx::kChromeIconGrey);
     }
     DCHECK_EQ(icon_str, base::ASCIIToUTF16("httpsInvalid"));
-    return gfx::CreateVectorIcon(gfx::VectorIconId::LOCATION_BAR_HTTPS_INVALID,
+    return gfx::CreateVectorIcon(toolbar::kHttpsInvalidIcon,
                                  kHttpWarningIconWidth, gfx::kGoogleRed700);
   }
 
diff --git a/chrome/browser/ui/bookmarks/bookmark_utils.cc b/chrome/browser/ui/bookmarks/bookmark_utils.cc
index d2af2ee..e3cfeb3 100644
--- a/chrome/browser/ui/bookmarks/bookmark_utils.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_utils.cc
@@ -32,9 +32,9 @@
 #endif
 
 #if defined(TOOLKIT_VIEWS)
+#include "chrome/app/vector_icons/vector_icons.h"
 #include "ui/gfx/color_utils.h"
 #include "ui/gfx/paint_vector_icon.h"
-#include "ui/gfx/vector_icons_public.h"
 #endif
 
 #if defined(OS_WIN)
@@ -95,8 +95,8 @@
 }
 
 #if defined(TOOLKIT_VIEWS) && !defined(OS_WIN)
-gfx::ImageSkia GetFolderIcon(gfx::VectorIconId id, SkColor text_color) {
-  return gfx::CreateVectorIcon(id,
+gfx::ImageSkia GetFolderIcon(const gfx::VectorIcon& icon, SkColor text_color) {
+  return gfx::CreateVectorIcon(icon,
                                color_utils::DeriveDefaultIconColor(text_color));
 }
 #endif
@@ -298,7 +298,7 @@
   return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
       IDR_BOOKMARK_BAR_FOLDER);
 #else
-  return GetFolderIcon(gfx::VectorIconId::FOLDER, text_color);
+  return GetFolderIcon(kFolderIcon, text_color);
 #endif
 }
 
@@ -307,7 +307,7 @@
   return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
       IDR_BOOKMARK_BAR_FOLDER_SUPERVISED);
 #else
-  return GetFolderIcon(gfx::VectorIconId::FOLDER_SUPERVISED, text_color);
+  return GetFolderIcon(kFolderSupervisedIcon, text_color);
 #endif
 }
 
@@ -316,7 +316,7 @@
   return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
       IDR_BOOKMARK_BAR_FOLDER_MANAGED);
 #else
-  return GetFolderIcon(gfx::VectorIconId::FOLDER_MANAGED, text_color);
+  return GetFolderIcon(kFolderManagedIcon, text_color);
 #endif
 }
 #endif
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm
index f06cf3e..e95bea9 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm
@@ -13,6 +13,7 @@
 #include "chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h"
 #include "components/autofill/core/browser/popup_item_ids.h"
 #include "components/autofill/core/browser/suggestion.h"
+#include "components/toolbar/vector_icons.h"
 #include "skia/ext/skia_utils_mac.h"
 #include "third_party/skia/include/core/SkColor.h"
 #include "ui/base/cocoa/window_size_constants.h"
@@ -24,7 +25,6 @@
 #include "ui/gfx/image/image.h"
 #include "ui/gfx/image/image_skia_util_mac.h"
 #include "ui/gfx/paint_vector_icon.h"
-#include "ui/gfx/vector_icons_public.h"
 #include "ui/native_theme/native_theme.h"
 #include "ui/native_theme/native_theme_mac.h"
 
@@ -291,15 +291,15 @@
   // pages, reuse the omnibox vector icons.
   if (icon == base::ASCIIToUTF16("httpWarning")) {
     return NSImageFromImageSkiaWithColorSpace(
-        gfx::CreateVectorIcon(gfx::VectorIconId::LOCATION_BAR_HTTP,
-                              kHttpWarningIconWidth, gfx::kChromeIconGrey),
+        gfx::CreateVectorIcon(toolbar::kHttpIcon, kHttpWarningIconWidth,
+                              gfx::kChromeIconGrey),
         base::mac::GetSRGBColorSpace());
   }
 
   if (icon == base::ASCIIToUTF16("httpsInvalid")) {
     return NSImageFromImageSkiaWithColorSpace(
-        gfx::CreateVectorIcon(gfx::VectorIconId::LOCATION_BAR_HTTPS_INVALID,
-                              kHttpWarningIconWidth, gfx::kGoogleRed700),
+        gfx::CreateVectorIcon(toolbar::kHttpsInvalidIcon, kHttpWarningIconWidth,
+                              gfx::kGoogleRed700),
         base::mac::GetSRGBColorSpace());
   }
 
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
index d3b2c4f1..172955d 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
@@ -12,6 +12,7 @@
 #import "base/mac/sdk_forward_declarations.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/strings/sys_string_conversions.h"
+#include "chrome/app/vector_icons/vector_icons.h"
 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
 #include "chrome/browser/bookmarks/bookmark_stats.h"
 #include "chrome/browser/bookmarks/managed_bookmark_service_factory.h"
@@ -57,6 +58,7 @@
 #include "components/bookmarks/browser/bookmark_utils.h"
 #include "components/bookmarks/common/bookmark_pref_names.h"
 #include "components/bookmarks/managed/managed_bookmark_service.h"
+#include "components/omnibox/browser/vector_icons.h"
 #include "components/prefs/pref_service.h"
 #include "content/public/browser/user_metrics.h"
 #include "content/public/browser/web_contents.h"
@@ -73,7 +75,6 @@
 #include "ui/gfx/image/image.h"
 #include "ui/gfx/image/image_skia_util_mac.h"
 #include "ui/gfx/paint_vector_icon.h"
-#include "ui/gfx/vector_icons_public.h"
 #include "ui/resources/grit/ui_resources.h"
 
 using base::UserMetricsAction;
@@ -288,14 +289,11 @@
         rb.GetNativeImageNamed(IDR_BOOKMARK_BAR_FOLDER_WHITE).CopyNSImage());
 
     const int kIconSize = 16;
-    defaultImage_.reset([NSImageFromImageSkia(
-        gfx::CreateVectorIcon(gfx::VectorIconId::OMNIBOX_HTTP,
-                              kIconSize,
-                              gfx::kChromeIconGrey)) retain]);
-    defaultImageIncognito_.reset([NSImageFromImageSkia(
-        gfx::CreateVectorIcon(gfx::VectorIconId::OMNIBOX_HTTP,
-                              kIconSize,
-                              SkColorSetA(SK_ColorWHITE, 0xCC))) retain]);
+    defaultImage_.reset([NSImageFromImageSkia(gfx::CreateVectorIcon(
+        omnibox::kHttpIcon, kIconSize, gfx::kChromeIconGrey)) retain]);
+    defaultImageIncognito_.reset([NSImageFromImageSkia(gfx::CreateVectorIcon(
+        omnibox::kHttpIcon, kIconSize, SkColorSetA(SK_ColorWHITE, 0xCC)))
+        retain]);
 
     innerContentAnimationsEnabled_ = YES;
     stateAnimationsEnabled_ = YES;
@@ -890,9 +888,7 @@
   SkColor vectorIconColor = forDarkMode ? SkColorSetA(SK_ColorWHITE, 0xCC)
                                         : gfx::kChromeIconGrey;
   return NSImageFromImageSkia(
-      gfx::CreateVectorIcon(gfx::VectorIconId::OVERFLOW_CHEVRON,
-                            kIconSize,
-                            vectorIconColor));
+      gfx::CreateVectorIcon(kOverflowChevronIcon, kIconSize, vectorIconColor));
 }
 
 #pragma mark Private Methods
diff --git a/chrome/browser/ui/cocoa/device_chooser_content_view_cocoa.mm b/chrome/browser/ui/cocoa/device_chooser_content_view_cocoa.mm
index d754865..3586328f 100644
--- a/chrome/browser/ui/cocoa/device_chooser_content_view_cocoa.mm
+++ b/chrome/browser/ui/cocoa/device_chooser_content_view_cocoa.mm
@@ -9,6 +9,7 @@
 
 #include "base/macros.h"
 #include "base/strings/sys_string_conversions.h"
+#include "chrome/app/vector_icons/vector_icons.h"
 #include "chrome/browser/chooser_controller/chooser_controller.h"
 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_button.h"
 #include "chrome/browser/ui/cocoa/spinner_view.h"
@@ -21,7 +22,6 @@
 #include "ui/gfx/color_palette.h"
 #include "ui/gfx/image/image_skia_util_mac.h"
 #include "ui/gfx/paint_vector_icon.h"
-#include "ui/gfx/vector_icons_public.h"
 #include "ui/resources/grit/ui_resources.h"
 
 namespace {
@@ -147,8 +147,8 @@
     ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
     NSImage* image = nullptr;
     if (isConnected) {
-      image = gfx::NSImageFromImageSkia(gfx::CreateVectorIcon(
-          gfx::VectorIconId::BLUETOOTH_CONNECTED, gfx::kChromeIconGrey));
+      image = gfx::NSImageFromImageSkia(
+          gfx::CreateVectorIcon(kBluetoothConnectedIcon, gfx::kChromeIconGrey));
     } else if (level != -1) {
       DCHECK_GE(level, 0);
       DCHECK_LT(level, base::checked_cast<NSInteger>(
@@ -857,7 +857,7 @@
       if (chooserController_->IsConnected(rowIndex)) {
         [[self tableRowViewImage:rowIndex]
             setImage:gfx::NSImageFromImageSkia(gfx::CreateVectorIcon(
-                         gfx::VectorIconId::BLUETOOTH_CONNECTED,
+                         kBluetoothConnectedIcon,
                          isSelected ? SK_ColorWHITE : gfx::kChromeIconGrey))];
       } else {
         int signalStrengthLevel =
diff --git a/chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller_unittest.mm b/chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller_unittest.mm
index f018c1ab..ec368cb 100644
--- a/chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller_unittest.mm
@@ -10,6 +10,7 @@
 #include <vector>
 
 #include "base/strings/utf_string_conversions.h"
+#include "chrome/app/vector_icons/vector_icons.h"
 #include "chrome/browser/chooser_controller/mock_chooser_controller.h"
 #import "chrome/browser/ui/cocoa/device_chooser_content_view_cocoa.h"
 #import "chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa.h"
@@ -27,7 +28,6 @@
 #include "ui/gfx/image/image.h"
 #include "ui/gfx/image/image_unittest_util.h"
 #include "ui/gfx/paint_vector_icon.h"
-#include "ui/gfx/vector_icons_public.h"
 #include "ui/resources/grit/ui_resources.h"
 
 namespace {
@@ -118,10 +118,10 @@
     NSImageView* image_view = [device_chooser_content_view_
         tableRowViewImage:static_cast<NSInteger>(row)];
     ASSERT_TRUE(image_view);
-    EXPECT_TRUE(gfx::test::AreImagesEqual(
-        gfx::Image(gfx::CreateVectorIcon(gfx::VectorIconId::BLUETOOTH_CONNECTED,
-                                         expected_color)),
-        gfx::Image([[image_view image] copy])));
+    EXPECT_TRUE(
+        gfx::test::AreImagesEqual(gfx::Image(gfx::CreateVectorIcon(
+                                      kBluetoothConnectedIcon, expected_color)),
+                                  gfx::Image([[image_view image] copy])));
   }
 
   void ExpectRowTextIs(int row, NSString* expected_text) {
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h b/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h
index 9b1e1a9..93e1ab5f 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h
@@ -10,11 +10,14 @@
 #include "base/mac/scoped_nsobject.h"
 #include "base/macros.h"
 #include "third_party/skia/include/core/SkColor.h"
-#include "ui/gfx/vector_icons_public.h"
 
 @class DecorationMouseTrackingDelegate;
 @class CrTrackingArea;
 
+namespace gfx {
+struct VectorIcon;
+}
+
 // Base class for decorations at the left and right of the location
 // bar.  For instance, the location icon.
 
@@ -157,10 +160,10 @@
   // override.
   virtual SkColor GetMaterialIconColor(bool location_bar_is_dark) const;
 
-  // Gets the id of the decoration's Material Design vector icon. Subclasses
-  // should override to return the correct id. Not an abstract method because
-  // some decorations are assigned their icon (vs. creating it themselves).
-  virtual gfx::VectorIconId GetMaterialVectorIconId() const;
+  // Gets the decoration's Material Design vector icon. Subclasses should
+  // override to return the correct icon. Not an abstract method because some
+  // decorations are assigned their icon (vs. creating it themselves).
+  virtual const gfx::VectorIcon* GetMaterialVectorIcon() const;
 
   // Gets the color used for the divider. Only used in Material design.
   NSColor* GetDividerColor(bool location_bar_is_dark) const;
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.mm
index e8a0f191..b67c589 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.mm
@@ -329,8 +329,8 @@
 NSImage* LocationBarDecoration::GetMaterialIcon(
     bool location_bar_is_dark) const {
   const int kIconSize = 16;
-  gfx::VectorIconId vector_icon_id = GetMaterialVectorIconId();
-  if (vector_icon_id == gfx::VectorIconId::VECTOR_ICON_NONE) {
+  const gfx::VectorIcon* vector_icon = GetMaterialVectorIcon();
+  if (!vector_icon) {
     // Return an empty image when the decoration specifies no vector icon, so
     // that its bubble is positioned correctly (the position is based on the
     // width of the image; returning nil will mess up the positioning).
@@ -340,7 +340,7 @@
 
   SkColor vector_icon_color = GetMaterialIconColor(location_bar_is_dark);
   return NSImageFromImageSkia(
-      gfx::CreateVectorIcon(vector_icon_id, kIconSize, vector_icon_color));
+      gfx::CreateVectorIcon(*vector_icon, kIconSize, vector_icon_color));
 }
 
 // static
@@ -380,7 +380,7 @@
       [NSColor colorWithCalibratedWhite:gray_scale alpha:kDividerAlpha / 255.0];
 }
 
-gfx::VectorIconId LocationBarDecoration::GetMaterialVectorIconId() const {
+const gfx::VectorIcon* LocationBarDecoration::GetMaterialVectorIcon() const {
   NOTREACHED();
-  return gfx::VectorIconId::VECTOR_ICON_NONE;
+  return nullptr;
 }
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index 06e6398f..429101a6 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -56,9 +56,11 @@
 #include "components/bookmarks/common/bookmark_pref_names.h"
 #include "components/grit/components_scaled_resources.h"
 #import "components/omnibox/browser/omnibox_popup_model.h"
+#include "components/omnibox/browser/vector_icons.h"
 #include "components/prefs/pref_service.h"
 #include "components/search_engines/template_url.h"
 #include "components/search_engines/template_url_service.h"
+#include "components/toolbar/vector_icons.h"
 #include "components/translate/core/browser/language_state.h"
 #include "components/variations/variations_associated_data.h"
 #include "components/zoom/zoom_controller.h"
@@ -76,7 +78,6 @@
 #include "ui/gfx/image/image.h"
 #include "ui/gfx/image/image_skia_util_mac.h"
 #include "ui/gfx/paint_vector_icon.h"
-#include "ui/gfx/vector_icons_public.h"
 
 using content::WebContents;
 
@@ -606,11 +607,10 @@
 
 void LocationBarViewMac::UpdateLocationIcon() {
   SkColor vector_icon_color = GetLocationBarIconColor();
-  gfx::VectorIconId vector_icon_id =
-      ShouldShowEVBubble() ? gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID
-                           : omnibox_view_->GetVectorIcon();
+  const gfx::VectorIcon& vector_icon_id = ShouldShowEVBubble()
+                                              ? toolbar::kHttpsValidIcon
+                                              : omnibox_view_->GetVectorIcon();
 
-  DCHECK(vector_icon_id != gfx::VectorIconId::VECTOR_ICON_NONE);
   NSImage* image = NSImageFromImageSkiaWithColorSpace(
       gfx::CreateVectorIcon(vector_icon_id, kDefaultIconSize,
                             vector_icon_color),
@@ -714,8 +714,7 @@
   SkColor icon_color =
       IsLocationBarDark() ? kMaterialDarkVectorIconColor : gfx::kGoogleBlue700;
   return NSImageFromImageSkiaWithColorSpace(
-      gfx::CreateVectorIcon(gfx::VectorIconId::OMNIBOX_SEARCH, kDefaultIconSize,
-                            icon_color),
+      gfx::CreateVectorIcon(omnibox::kSearchIcon, kDefaultIconSize, icon_color),
       base::mac::GetSRGBColorSpace());
 }
 
diff --git a/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.h b/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.h
index 8acc0d1..5129f5c 100644
--- a/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.h
@@ -59,7 +59,7 @@
 
  protected:
   // Overridden from LocationBarDecoration:
-  gfx::VectorIconId GetMaterialVectorIconId() const override;
+  const gfx::VectorIcon* GetMaterialVectorIcon() const override;
 
  private:
   // Triggers a redraw after a state change.
diff --git a/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.mm b/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.mm
index 76789901..899c1cc 100644
--- a/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.mm
@@ -5,6 +5,7 @@
 #import "chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.h"
 
 #include "chrome/app/chrome_command_ids.h"
+#include "chrome/app/vector_icons/vector_icons.h"
 #include "chrome/browser/command_updater.h"
 #include "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
 #include "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h"
@@ -15,7 +16,6 @@
 #include "ui/gfx/color_palette.h"
 #include "ui/gfx/image/image_skia_util_mac.h"
 #include "ui/gfx/paint_vector_icon.h"
-#include "ui/gfx/vector_icons_public.h"
 
 // ManagePasswordsIconCocoa
 
@@ -104,8 +104,9 @@
     ManagePasswordsBubbleCocoa::instance()->Close();
 }
 
-gfx::VectorIconId ManagePasswordsDecoration::GetMaterialVectorIconId() const {
-  // Note: update unit tests if this vector id ever changes (it's hard-coded
+const gfx::VectorIcon* ManagePasswordsDecoration::GetMaterialVectorIcon()
+    const {
+  // Note: update unit tests if this vector icon ever changes (it's hard-coded
   // there).
-  return gfx::VectorIconId::AUTOLOGIN;
+  return &kAutologinIcon;
 }
diff --git a/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration_unittest.mm b/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration_unittest.mm
index 279677d..7dd61904 100644
--- a/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration_unittest.mm
+++ b/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration_unittest.mm
@@ -6,6 +6,7 @@
 
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/app/chrome_command_ids.h"
+#include "chrome/app/vector_icons/vector_icons.h"
 #include "chrome/browser/command_updater.h"
 #include "chrome/browser/command_updater_delegate.h"
 #include "chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.h"
@@ -22,7 +23,6 @@
 #include "ui/gfx/image/image.h"
 #include "ui/gfx/image/image_skia_util_mac.h"
 #include "ui/gfx/paint_vector_icon.h"
-#include "ui/gfx/vector_icons_public.h"
 
 namespace {
 
@@ -104,13 +104,13 @@
   NSImage* expected_image = nil;
   if (GetParam().image) {
     // IDR_SAVE_PASSWORD_ACTIVE and IDR_SAVE_PASSWORD_INACTIVE map to
-    // gfx::VectorIconId::AUTOLOGIN in Material Design; fail the test if
-    // somehow some other value is present.
+    // kAutologinIcon in Material Design; fail the test if somehow some other
+    // value is present.
     EXPECT_TRUE(GetParam().image == IDR_SAVE_PASSWORD_ACTIVE ||
                 GetParam().image == IDR_SAVE_PASSWORD_INACTIVE);
     const int kIconSize = 16;
-    expected_image = NSImageFromImageSkia(gfx::CreateVectorIcon(
-        gfx::VectorIconId::AUTOLOGIN, kIconSize, gfx::kChromeIconGrey));
+    expected_image = NSImageFromImageSkia(
+        gfx::CreateVectorIcon(kAutologinIcon, kIconSize, gfx::kChromeIconGrey));
   }
   EXPECT_TRUE(ImagesEqual(expected_image, decoration()->GetImage()));
   EXPECT_NSEQ(GetParam().toolTip
diff --git a/chrome/browser/ui/cocoa/location_bar/save_credit_card_decoration.mm b/chrome/browser/ui/cocoa/location_bar/save_credit_card_decoration.mm
index dbd5b11..4f0d8c8 100644
--- a/chrome/browser/ui/cocoa/location_bar/save_credit_card_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/save_credit_card_decoration.mm
@@ -5,6 +5,7 @@
 #import "chrome/browser/ui/cocoa/location_bar/save_credit_card_decoration.h"
 
 #include "chrome/app/chrome_command_ids.h"
+#include "chrome/app/vector_icons/vector_icons.h"
 #include "chrome/browser/command_updater.h"
 #include "chrome/grit/generated_resources.h"
 #include "ui/base/l10n/l10n_util_mac.h"
@@ -12,7 +13,6 @@
 #include "ui/gfx/color_palette.h"
 #include "ui/gfx/image/image_skia_util_mac.h"
 #include "ui/gfx/paint_vector_icon.h"
-#include "ui/gfx/vector_icons_public.h"
 
 SaveCreditCardDecoration::SaveCreditCardDecoration(
     CommandUpdater* command_updater)
@@ -25,8 +25,8 @@
   SkColor theColor = theColor =
       locationBarIsDark ? SK_ColorWHITE : gfx::kChromeIconGrey;
 
-  SetImage(NSImageFromImageSkia(gfx::CreateVectorIcon(
-        gfx::VectorIconId::CREDIT_CARD, 16, theColor)));
+  SetImage(NSImageFromImageSkia(
+      gfx::CreateVectorIcon(kCreditCardIcon, 16, theColor)));
 }
 
 NSPoint SaveCreditCardDecoration::GetBubblePointInFrame(NSRect frame) {
diff --git a/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm b/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm
index a4db11b..ea53bdd 100644
--- a/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm
+++ b/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration_unittest.mm
@@ -7,6 +7,7 @@
 #include "base/strings/utf_string_conversions.h"
 #import "chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.h"
 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h"
+#include "components/omnibox/browser/vector_icons.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #import "testing/gtest_mac.h"
 #include "ui/base/material_design/material_design_controller.h"
@@ -32,7 +33,7 @@
     // initialize it now.
     const int kDefaultIconSize = 16;
     decoration_.SetImage(NSImageFromImageSkia(gfx::CreateVectorIcon(
-        gfx::VectorIconId::OMNIBOX_SEARCH, kDefaultIconSize, SK_ColorBLACK)));
+        omnibox::kSearchIcon, kDefaultIconSize, SK_ColorBLACK)));
   }
 
   SelectedKeywordDecoration decoration_;
diff --git a/chrome/browser/ui/cocoa/location_bar/star_decoration.h b/chrome/browser/ui/cocoa/location_bar/star_decoration.h
index f63ee2a..f0a6661 100644
--- a/chrome/browser/ui/cocoa/location_bar/star_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/star_decoration.h
@@ -34,7 +34,7 @@
  protected:
   // Overridden from LocationBarDecoration:
   SkColor GetMaterialIconColor(bool location_bar_is_dark) const override;
-  gfx::VectorIconId GetMaterialVectorIconId() const override;
+  const gfx::VectorIcon* GetMaterialVectorIcon() const override;
 
  private:
   // For bringing up bookmark bar.
diff --git a/chrome/browser/ui/cocoa/location_bar/star_decoration.mm b/chrome/browser/ui/cocoa/location_bar/star_decoration.mm
index 8703ebbf..245da9fa 100644
--- a/chrome/browser/ui/cocoa/location_bar/star_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/star_decoration.mm
@@ -11,6 +11,7 @@
 #include "chrome/grit/generated_resources.h"
 #include "chrome/grit/theme_resources.h"
 #include "components/strings/grit/components_strings.h"
+#include "components/toolbar/vector_icons.h"
 #include "ui/base/l10n/l10n_util_mac.h"
 #include "ui/base/material_design/material_design_controller.h"
 #include "ui/gfx/color_palette.h"
@@ -67,7 +68,6 @@
   return starred_ ? gfx::kGoogleBlue500 : gfx::kChromeIconGrey;
 }
 
-gfx::VectorIconId StarDecoration::GetMaterialVectorIconId() const {
-  return starred_ ? gfx::VectorIconId::LOCATION_BAR_STAR_ACTIVE
-                  : gfx::VectorIconId::LOCATION_BAR_STAR;
+const gfx::VectorIcon* StarDecoration::GetMaterialVectorIcon() const {
+  return starred_ ? &toolbar::kStarActiveIcon : &toolbar::kStarIcon;
 }
diff --git a/chrome/browser/ui/cocoa/location_bar/translate_decoration.h b/chrome/browser/ui/cocoa/location_bar/translate_decoration.h
index 1b630c3..cee2e7f5 100644
--- a/chrome/browser/ui/cocoa/location_bar/translate_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/translate_decoration.h
@@ -32,7 +32,7 @@
 
  protected:
   // Overridden from LocationBarDecoration:
-  gfx::VectorIconId GetMaterialVectorIconId() const override;
+  const gfx::VectorIcon* GetMaterialVectorIcon() const override;
 
  private:
   // For showing the translate bubble up.
diff --git a/chrome/browser/ui/cocoa/location_bar/translate_decoration.mm b/chrome/browser/ui/cocoa/location_bar/translate_decoration.mm
index 983ad820..34b6ea1 100644
--- a/chrome/browser/ui/cocoa/location_bar/translate_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/translate_decoration.mm
@@ -5,6 +5,7 @@
 #import "chrome/browser/ui/cocoa/location_bar/translate_decoration.h"
 
 #include "chrome/app/chrome_command_ids.h"
+#include "chrome/app/vector_icons/vector_icons.h"
 #include "chrome/browser/command_updater.h"
 #import "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h"
 #include "chrome/grit/generated_resources.h"
@@ -41,6 +42,6 @@
   return l10n_util::GetNSStringWithFixup(IDS_TOOLTIP_TRANSLATE);
 }
 
-gfx::VectorIconId TranslateDecoration::GetMaterialVectorIconId() const {
-  return gfx::VectorIconId::TRANSLATE;
+const gfx::VectorIcon* TranslateDecoration::GetMaterialVectorIcon() const {
+  return &kTranslateIcon;
 }
diff --git a/chrome/browser/ui/cocoa/location_bar/zoom_decoration.h b/chrome/browser/ui/cocoa/location_bar/zoom_decoration.h
index ffd8b1354..88fa72d 100644
--- a/chrome/browser/ui/cocoa/location_bar/zoom_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/zoom_decoration.h
@@ -53,7 +53,7 @@
                         bool location_bar_is_dark);
 
   // Overridden from LocationBarDecoration:
-  gfx::VectorIconId GetMaterialVectorIconId() const override;
+  const gfx::VectorIcon* GetMaterialVectorIcon() const override;
 
  private:
   friend ZoomDecorationTest;
@@ -82,7 +82,7 @@
   // The string to show for a tooltip.
   base::scoped_nsobject<NSString> tooltip_;
 
-  gfx::VectorIconId vector_icon_id_;
+  const gfx::VectorIcon* vector_icon_;
 
   DISALLOW_COPY_AND_ASSIGN(ZoomDecoration);
 };
diff --git a/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm b/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm
index 8f1f921..7e4c133a 100644
--- a/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm
@@ -8,6 +8,7 @@
 #include "base/strings/string16.h"
 #include "base/strings/string_number_conversions.h"
 #include "chrome/app/chrome_command_ids.h"
+#include "chrome/app/vector_icons/vector_icons.h"
 #import "chrome/browser/ui/cocoa/l10n_util.h"
 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h"
 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h"
@@ -20,9 +21,7 @@
 #include "ui/base/l10n/l10n_util_mac.h"
 
 ZoomDecoration::ZoomDecoration(LocationBarViewMac* owner)
-    : owner_(owner),
-      bubble_(nil),
-      vector_icon_id_(gfx::VectorIconId::VECTOR_ICON_NONE) {}
+    : owner_(owner), bubble_(nullptr), vector_icon_(nullptr) {}
 
 ZoomDecoration::~ZoomDecoration() {
   [bubble_ closeWithoutAnimation];
@@ -97,14 +96,14 @@
 void ZoomDecoration::UpdateUI(zoom::ZoomController* zoom_controller,
                               NSString* tooltip_string,
                               bool location_bar_is_dark) {
-  vector_icon_id_ = gfx::VectorIconId::VECTOR_ICON_NONE;
+  vector_icon_ = nullptr;
   zoom::ZoomController::RelativeZoom relative_zoom =
       zoom_controller->GetZoomRelativeToDefault();
   // There is no icon at the default zoom factor.
   if (relative_zoom == zoom::ZoomController::ZOOM_BELOW_DEFAULT_ZOOM) {
-    vector_icon_id_ = gfx::VectorIconId::ZOOM_MINUS;
+    vector_icon_ = &kZoomMinusIcon;
   } else if (relative_zoom == zoom::ZoomController::ZOOM_ABOVE_DEFAULT_ZOOM) {
-    vector_icon_id_ = gfx::VectorIconId::ZOOM_PLUS;
+    vector_icon_ = &kZoomPlusIcon;
   }
 
   SetImage(GetMaterialIcon(location_bar_is_dark));
@@ -170,6 +169,6 @@
   }
 }
 
-gfx::VectorIconId ZoomDecoration::GetMaterialVectorIconId() const {
-  return vector_icon_id_;
+const gfx::VectorIcon* ZoomDecoration::GetMaterialVectorIcon() const {
+  return vector_icon_;
 }
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm
index b7c9ef5..40066e8d 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.mm
@@ -20,6 +20,7 @@
 #include "components/omnibox/browser/autocomplete_match_type.h"
 #include "components/omnibox/browser/omnibox_edit_model.h"
 #include "components/omnibox/browser/omnibox_popup_model.h"
+#include "components/toolbar/vector_icons.h"
 #include "skia/ext/skia_utils_mac.h"
 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSAnimation+Duration.h"
 #import "ui/base/cocoa/cocoa_base_utils.h"
@@ -32,7 +33,6 @@
 #include "ui/gfx/paint_vector_icon.h"
 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
 #include "ui/gfx/text_elider.h"
-#include "ui/gfx/vector_icons_public.h"
 
 namespace {
 
@@ -332,13 +332,13 @@
   bool is_dark_mode = [matrix_ hasDarkTheme];
   const SkColor icon_color =
       is_dark_mode ? SkColorSetA(SK_ColorWHITE, 0xCC) : gfx::kChromeIconGrey;
-  const gfx::VectorIconId vector_icon_id =
+  const gfx::VectorIcon& vector_icon =
       model_->IsStarredMatch(match)
-          ? gfx::VectorIconId::LOCATION_BAR_STAR
+          ? toolbar::kStarIcon
           : AutocompleteMatch::TypeToVectorIcon(match.type);
   const int kIconSize = 16;
   return NSImageFromImageSkia(
-      gfx::CreateVectorIcon(vector_icon_id, kIconSize, icon_color));
+      gfx::CreateVectorIcon(vector_icon, kIconSize, icon_color));
 }
 
 void OmniboxPopupViewMac::OpenURLForRow(size_t row,
diff --git a/chrome/browser/ui/cocoa/profiles/avatar_icon_controller.mm b/chrome/browser/ui/cocoa/profiles/avatar_icon_controller.mm
index 26c3bfa..9e3b0ac 100644
--- a/chrome/browser/ui/cocoa/profiles/avatar_icon_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/avatar_icon_controller.mm
@@ -8,6 +8,7 @@
 
 #include "base/mac/foundation_util.h"
 #include "base/strings/sys_string_conversions.h"
+#include "chrome/app/vector_icons/vector_icons.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/profiles/profile_avatar_icon_util.h"
 #include "chrome/browser/ui/browser.h"
@@ -20,7 +21,6 @@
 #include "ui/gfx/image/image_skia_util_mac.h"
 #include "ui/gfx/paint_vector_icon.h"
 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
-#include "ui/gfx/vector_icons_public.h"
 
 @interface AvatarIconController (Private)
 - (void)setButtonEnabled:(BOOL)flag;
@@ -77,7 +77,7 @@
                            forAttribute:NSAccessibilityDescriptionAttribute];
 
     NSImage* icon = NSImageFromImageSkia(
-        gfx::CreateVectorIcon(gfx::VectorIconId::INCOGNITO, 24, SK_ColorWHITE));
+        gfx::CreateVectorIcon(kIncognitoIcon, 24, SK_ColorWHITE));
     [button_ setImage:icon];
     [button_ setEnabled:NO];
 
diff --git a/chrome/browser/ui/layout_constants.cc b/chrome/browser/ui/layout_constants.cc
index 264409f..9fd179c6 100644
--- a/chrome/browser/ui/layout_constants.cc
+++ b/chrome/browser/ui/layout_constants.cc
@@ -18,6 +18,8 @@
       if (ui::MaterialDesignController::IsSecondaryUiMaterial())
         return 1;
       return hybrid ? 8 : 6;
+    case LOCATION_BAR_ELEMENT_PADDING:
+      return hybrid ? 3 : 1;
     case LOCATION_BAR_HEIGHT:
       return hybrid ? 32 : 28;
     case TABSTRIP_NEW_TAB_BUTTON_OVERLAP:
diff --git a/chrome/browser/ui/layout_constants.h b/chrome/browser/ui/layout_constants.h
index b51bdcba..aff8a33 100644
--- a/chrome/browser/ui/layout_constants.h
+++ b/chrome/browser/ui/layout_constants.h
@@ -19,6 +19,10 @@
   // images inside.
   LOCATION_BAR_BUBBLE_ANCHOR_VERTICAL_INSET,
 
+  // The horizontal padding between location bar decorations as well as the
+  // vertical and horizontal padding inside the border.
+  LOCATION_BAR_ELEMENT_PADDING,
+
   // The height to be occupied by the LocationBar.
   LOCATION_BAR_HEIGHT,
 
diff --git a/chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.cc b/chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.cc
index e707141..643a331 100644
--- a/chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.cc
+++ b/chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.cc
@@ -21,7 +21,11 @@
 #include "content/public/browser/web_contents.h"
 #include "content/public/common/url_constants.h"
 #include "extensions/common/constants.h"
-#include "ui/gfx/vector_icons_public.h"
+
+#if !defined(OS_ANDROID)
+#include "components/omnibox/browser/vector_icons.h" // nogncheck
+#include "components/toolbar/vector_icons.h"  // nogncheck
+#endif
 
 ChromeToolbarModelDelegate::ChromeToolbarModelDelegate() {}
 
@@ -106,19 +110,20 @@
          security_state::MALICIOUS_CONTENT_STATUS_NONE;
 }
 
-gfx::VectorIconId ChromeToolbarModelDelegate::GetVectorIconOverride() const {
+const gfx::VectorIcon* ChromeToolbarModelDelegate::GetVectorIconOverride()
+    const {
 #if !defined(OS_ANDROID)
   GURL url;
   GetURL(&url);
 
   if (url.SchemeIs(content::kChromeUIScheme))
-    return gfx::VectorIconId::LOCATION_BAR_PRODUCT;
+    return &toolbar::kProductIcon;
 
   if (url.SchemeIs(extensions::kExtensionScheme))
-    return gfx::VectorIconId::OMNIBOX_EXTENSION_APP;
+    return &omnibox::kExtensionAppIcon;
 #endif
 
-  return gfx::VectorIconId::VECTOR_ICON_NONE;
+  return nullptr;
 }
 
 content::NavigationController*
diff --git a/chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.h b/chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.h
index bb5d882..4c60822 100644
--- a/chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.h
+++ b/chrome/browser/ui/toolbar/chrome_toolbar_model_delegate.h
@@ -36,7 +36,7 @@
   SecurityLevel GetSecurityLevel() const override;
   scoped_refptr<net::X509Certificate> GetCertificate() const override;
   bool FailsMalwareCheck() const override;
-  gfx::VectorIconId GetVectorIconOverride() const override;
+  const gfx::VectorIcon* GetVectorIconOverride() const override;
 
   // Returns the navigation controller used to retrieve the navigation entry
   // from which the states are retrieved. If this returns null, default values
diff --git a/chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc b/chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc
index f7f9a962c..06299c1 100644
--- a/chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc
+++ b/chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc
@@ -6,6 +6,7 @@
 
 #include "base/macros.h"
 #include "base/strings/string16.h"
+#include "chrome/app/vector_icons/vector_icons.h"
 #include "chrome/browser/ui/autofill/password_generation_popup_controller.h"
 #include "chrome/browser/ui/autofill/popup_constants.h"
 #include "ui/accessibility/ax_node_data.h"
@@ -13,7 +14,6 @@
 #include "ui/gfx/canvas.h"
 #include "ui/gfx/color_palette.h"
 #include "ui/gfx/paint_vector_icon.h"
-#include "ui/gfx/vector_icons_public.h"
 #include "ui/native_theme/native_theme.h"
 #include "ui/views/background.h"
 #include "ui/views/border.h"
@@ -99,8 +99,8 @@
     SetLayoutManager(box_layout);
 
     views::ImageView* key_image = new views::ImageView();
-    key_image->SetImage(gfx::CreateVectorIcon(gfx::VectorIconId::AUTOLOGIN, 32,
-                                              gfx::kChromeIconGrey));
+    key_image->SetImage(
+        gfx::CreateVectorIcon(kAutologinIcon, 32, gfx::kChromeIconGrey));
     AddChildView(key_image);
 
     PasswordTextBox* password_text_box = new PasswordTextBox();
diff --git a/chrome/browser/ui/views/autofill/save_card_icon_view.cc b/chrome/browser/ui/views/autofill/save_card_icon_view.cc
index 36b3eb2..c786061 100644
--- a/chrome/browser/ui/views/autofill/save_card_icon_view.cc
+++ b/chrome/browser/ui/views/autofill/save_card_icon_view.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/views/autofill/save_card_icon_view.h"
 
 #include "chrome/app/chrome_command_ids.h"
+#include "chrome/app/vector_icons/vector_icons.h"
 #include "chrome/browser/ui/autofill/save_card_bubble_controller_impl.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
@@ -40,8 +41,8 @@
       controller->save_card_bubble_view());
 }
 
-gfx::VectorIconId SaveCardIconView::GetVectorIcon() const {
-  return gfx::VectorIconId::CREDIT_CARD;
+const gfx::VectorIcon& SaveCardIconView::GetVectorIcon() const {
+  return kCreditCardIcon;
 }
 
 void SaveCardIconView::TabDeactivated(content::WebContents* contents) {
diff --git a/chrome/browser/ui/views/autofill/save_card_icon_view.h b/chrome/browser/ui/views/autofill/save_card_icon_view.h
index d2a6d03..b1b4194 100644
--- a/chrome/browser/ui/views/autofill/save_card_icon_view.h
+++ b/chrome/browser/ui/views/autofill/save_card_icon_view.h
@@ -28,7 +28,7 @@
   // BubbleIconView:
   void OnExecuting(BubbleIconView::ExecuteSource execute_source) override;
   views::BubbleDialogDelegateView* GetBubble() const override;
-  gfx::VectorIconId GetVectorIcon() const override;
+  const gfx::VectorIcon& GetVectorIcon() const override;
 
   // TabStripModelObserver:
   void TabDeactivated(content::WebContents* contents) override;
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
index e8379140..3010e8e 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
@@ -21,6 +21,7 @@
 #include "base/strings/utf_string_conversions.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "build/build_config.h"
+#include "chrome/app/vector_icons/vector_icons.h"
 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
 #include "chrome/browser/bookmarks/managed_bookmark_service_factory.h"
 #include "chrome/browser/browser_process.h"
@@ -86,7 +87,6 @@
 #include "ui/gfx/scoped_canvas.h"
 #include "ui/gfx/text_constants.h"
 #include "ui/gfx/text_elider.h"
-#include "ui/gfx/vector_icons_public.h"
 #include "ui/resources/grit/ui_resources.h"
 #include "ui/views/animation/flood_fill_ink_drop_ripple.h"
 #include "ui/views/animation/ink_drop_highlight.h"
@@ -2097,7 +2097,7 @@
 
   overflow_button_->SetImage(
       views::Button::STATE_NORMAL,
-      gfx::CreateVectorIcon(gfx::VectorIconId::OVERFLOW_CHEVRON, 8,
+      gfx::CreateVectorIcon(kOverflowChevronIcon, 8,
                             theme_provider->GetColor(
                                 ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON)));
 
diff --git a/chrome/browser/ui/views/device_chooser_content_view.cc b/chrome/browser/ui/views/device_chooser_content_view.cc
index a648edfd..966571e 100644
--- a/chrome/browser/ui/views/device_chooser_content_view.cc
+++ b/chrome/browser/ui/views/device_chooser_content_view.cc
@@ -6,6 +6,7 @@
 
 #include "base/memory/ptr_util.h"
 #include "base/numerics/safe_conversions.h"
+#include "chrome/app/vector_icons/vector_icons.h"
 #include "chrome/grit/generated_resources.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/resource/resource_bundle.h"
@@ -14,7 +15,6 @@
 #include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/image/image_skia.h"
 #include "ui/gfx/paint_vector_icon.h"
-#include "ui/gfx/vector_icons_public.h"
 #include "ui/resources/grit/ui_resources.h"
 #include "ui/views/controls/styled_label.h"
 #include "ui/views/controls/table/table_view.h"
@@ -156,10 +156,8 @@
   DCHECK_GE(row, 0);
   DCHECK_LT(row, base::checked_cast<int>(num_options));
 
-  if (chooser_controller_->IsConnected(row)) {
-    return gfx::CreateVectorIcon(gfx::VectorIconId::BLUETOOTH_CONNECTED,
-                                 gfx::kChromeIconGrey);
-  }
+  if (chooser_controller_->IsConnected(row))
+    return gfx::CreateVectorIcon(kBluetoothConnectedIcon, gfx::kChromeIconGrey);
 
   int level = chooser_controller_->GetSignalStrengthLevel(row);
 
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
index 4353e75..3da8b11 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
 
 #include "build/build_config.h"
+#include "chrome/app/vector_icons/vector_icons.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/profiles/avatar_menu.h"
 #include "chrome/browser/profiles/profile.h"
@@ -20,7 +21,6 @@
 #include "ui/gfx/color_palette.h"
 #include "ui/gfx/image/image.h"
 #include "ui/gfx/paint_vector_icon.h"
-#include "ui/gfx/vector_icons_public.h"
 #include "ui/views/background.h"
 
 #if defined(OS_WIN)
@@ -52,7 +52,7 @@
 gfx::ImageSkia BrowserNonClientFrameView::GetIncognitoAvatarIcon() const {
   const SkColor icon_color = color_utils::PickContrastingColor(
       SK_ColorWHITE, gfx::kChromeIconGrey, GetFrameColor());
-  return gfx::CreateVectorIcon(gfx::VectorIconId::INCOGNITO, icon_color);
+  return gfx::CreateVectorIcon(kIncognitoIcon, icon_color);
 }
 
 SkColor BrowserNonClientFrameView::GetToolbarTopSeparatorColor() const {
diff --git a/chrome/browser/ui/views/location_bar/bubble_icon_view.cc b/chrome/browser/ui/views/location_bar/bubble_icon_view.cc
index a87aab9..8b459490 100644
--- a/chrome/browser/ui/views/location_bar/bubble_icon_view.cc
+++ b/chrome/browser/ui/views/location_bar/bubble_icon_view.cc
@@ -5,6 +5,8 @@
 #include "chrome/browser/ui/views/location_bar/bubble_icon_view.h"
 
 #include "chrome/browser/command_updater.h"
+#include "chrome/browser/ui/layout_constants.h"
+#include "chrome/browser/ui/views/location_bar/background_with_1_px_border.h"
 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
 #include "ui/accessibility/ax_node_data.h"
 #include "ui/events/event.h"
@@ -15,12 +17,7 @@
 #include "ui/views/animation/ink_drop_impl.h"
 #include "ui/views/bubble/bubble_dialog_delegate.h"
 
-BubbleIconView::BubbleIconView(CommandUpdater* command_updater, int command_id)
-    : image_(new views::ImageView()),
-      command_updater_(command_updater),
-      command_id_(command_id),
-      active_(false),
-      suppress_mouse_released_action_(false) {
+void BubbleIconView::Init() {
   AddChildView(image_);
   image_->set_interactive(false);
   image_->EnableCanvasFlippingForRTLUI(true);
@@ -28,6 +25,13 @@
   SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY);
 }
 
+BubbleIconView::BubbleIconView(CommandUpdater* command_updater, int command_id)
+    : image_(new views::ImageView()),
+      command_updater_(command_updater),
+      command_id_(command_id),
+      active_(false),
+      suppress_mouse_released_action_(false) {}
+
 BubbleIconView::~BubbleIconView() {}
 
 bool BubbleIconView::IsBubbleShowing() const {
@@ -59,7 +63,13 @@
 }
 
 gfx::Size BubbleIconView::GetPreferredSize() const {
-  return image_->GetPreferredSize();
+  gfx::Rect image_rect(image_->GetPreferredSize());
+  image_rect.Inset(-gfx::Insets(LocationBarView::kIconInteriorPadding));
+  DCHECK_EQ(image_rect.height(),
+            GetLayoutConstant(LOCATION_BAR_HEIGHT) -
+                2 * (GetLayoutConstant(LOCATION_BAR_ELEMENT_PADDING) +
+                     BackgroundWith1PxBorder::kLocationBarBorderThicknessDip));
+  return image_rect.size();
 }
 
 void BubbleIconView::Layout() {
@@ -177,10 +187,6 @@
     command_updater_->ExecuteCommand(command_id_);
 }
 
-gfx::VectorIconId BubbleIconView::GetVectorIcon() const {
-  return gfx::VectorIconId::VECTOR_ICON_NONE;
-}
-
 void BubbleIconView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
   views::BubbleDialogDelegateView* bubble = GetBubble();
   if (bubble)
diff --git a/chrome/browser/ui/views/location_bar/bubble_icon_view.h b/chrome/browser/ui/views/location_bar/bubble_icon_view.h
index 9df75992..10affd4 100644
--- a/chrome/browser/ui/views/location_bar/bubble_icon_view.h
+++ b/chrome/browser/ui/views/location_bar/bubble_icon_view.h
@@ -9,7 +9,6 @@
 
 #include "base/macros.h"
 #include "ui/gfx/image/image_skia.h"
-#include "ui/gfx/vector_icons_public.h"
 #include "ui/views/animation/ink_drop_host_view.h"
 #include "ui/views/controls/image_view.h"
 #include "ui/views/widget/widget_observer.h"
@@ -17,7 +16,7 @@
 class CommandUpdater;
 
 namespace gfx {
-enum class VectorIconId;
+struct VectorIcon;
 }
 
 namespace views {
@@ -27,6 +26,9 @@
 // Represents an icon on the omnibox that shows a bubble when clicked.
 class BubbleIconView : public views::InkDropHostView,
                        public views::WidgetObserver {
+ public:
+  void Init();
+
  protected:
   enum ExecuteSource {
     EXECUTE_SOURCE_MOUSE,
@@ -89,7 +91,7 @@
   virtual views::BubbleDialogDelegateView* GetBubble() const = 0;
 
   // Gets the given vector icon in the correct color and size based on |active|.
-  virtual gfx::VectorIconId GetVectorIcon() const;
+  virtual const gfx::VectorIcon& GetVectorIcon() const = 0;
 
   // views::View:
   void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
index 2c29938..6ea7d20 100644
--- a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
+++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
@@ -43,11 +43,9 @@
       pause_animation_state_(0.0),
       bubble_view_(nullptr),
       suppress_mouse_released_action_(false) {
+  set_next_element_interior_padding(LocationBarView::kIconInteriorPadding);
   SetInkDropMode(InkDropMode::ON);
   SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY);
-  image()->SetHorizontalAlignment(base::i18n::IsRTL()
-                                      ? views::ImageView::TRAILING
-                                      : views::ImageView::LEADING);
   image()->EnableCanvasFlippingForRTLUI(true);
   label()->SetElideBehavior(gfx::NO_ELIDE);
   label()->SetVisible(false);
@@ -161,9 +159,7 @@
 }
 
 bool ContentSettingImageView::ShouldShowLabel() const {
-  return (!IsShrinking() ||
-          (width() > (image()->GetPreferredSize().width() +
-                      2 * LocationBarView::kHorizontalPadding))) &&
+  return (!IsShrinking() || (width() > image()->GetPreferredSize().width())) &&
          (slide_animator_.is_animating() || pause_animation_);
 }
 
diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
index eb02b9e0..38e36e7 100644
--- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
+++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
@@ -4,6 +4,8 @@
 
 #include "chrome/browser/ui/views/location_bar/icon_label_bubble_view.h"
 
+#include "chrome/browser/ui/layout_constants.h"
+#include "chrome/browser/ui/views/location_bar/background_with_1_px_border.h"
 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
 #include "ui/accessibility/ax_node_data.h"
 #include "ui/gfx/canvas.h"
@@ -29,6 +31,8 @@
   // Disable separate hit testing for |image_|.  This prevents views treating
   // |image_| as a separate mouse hover region from |this|.
   image_->set_interactive(false);
+  image_->SetBorder(views::CreateEmptyBorder(
+      gfx::Insets(LocationBarView::kIconInteriorPadding)));
   AddChildView(image_);
 
   label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
@@ -93,39 +97,26 @@
 }
 
 void IconLabelBubbleView::Layout() {
-  // Compute the image bounds. Leading and trailing padding are the same.
-  int image_x = LocationBarView::kHorizontalPadding;
-  int bubble_trailing_padding = image_x;
-
-  // If ShouldShowLabel() is true, then either we show a label in the
-  // steady state, or we're not yet in the last portion of the animation.  In
-  // these cases, we leave the leading and trailing padding alone.  If this is
-  // false, however, then we're only showing the image, and either the view
-  // width is the image width, or it's animating downwards and getting close to
-  // it.  In these cases, we want to shrink the trailing padding first, so the
-  // image slides all the way to the trailing edge before slowing or stopping;
-  // then we want to shrink the leading padding down to zero.
-  const int image_preferred_width = image_->GetPreferredSize().width();
-  if (!ShouldShowLabel()) {
-    image_x = std::min(image_x, width() - image_preferred_width);
-    bubble_trailing_padding = std::min(
-        bubble_trailing_padding, width() - image_preferred_width - image_x);
+  // We may not have horizontal room for both the image and the trailing
+  // padding. When the view is expanding (or showing-label steady state), the
+  // image. When the view is contracting (or hidden-label steady state), whittle
+  // away at the trailing padding instead.
+  int bubble_trailing_padding = GetPostSeparatorPadding();
+  int image_width = image_->GetPreferredSize().width();
+  const int space_shortage = image_width + bubble_trailing_padding - width();
+  if (space_shortage > 0) {
+    if (ShouldShowLabel())
+      image_width -= space_shortage;
+    else
+      bubble_trailing_padding -= space_shortage;
   }
-
-  // Now that we've computed the padding values, give the image all the
-  // remaining width.  This will be less than the image's preferred width during
-  // the first portion of the animation; during the very beginning there may not
-  // be enough room to show the image at all.
-  const int image_width =
-      std::min(image_preferred_width,
-               std::max(0, width() - image_x - bubble_trailing_padding));
-  image_->SetBounds(image_x, 0, image_width, height());
+  image_->SetBounds(0, 0, image_width, height());
 
   // Compute the label bounds.  The label gets whatever size is left over after
   // accounting for the preferred image width and padding amounts.  Note that if
   // the label has zero size it doesn't actually matter what we compute its X
   // value to be, since it won't be visible.
-  const int label_x = image_x + image_width + GetInternalSpacing();
+  const int label_x = image_->bounds().right() + GetInternalSpacing();
   const int label_width =
       std::max(0, width() - label_x - bubble_trailing_padding);
   label_->SetBounds(label_x, 0, label_width, height());
@@ -192,9 +183,8 @@
     // enough to show the icon. We don't want to shrink all the way back to
     // zero, since this would mean the view would completely disappear and then
     // pop back to an icon after the animation finishes.
-    const int max_width = LocationBarView::kHorizontalPadding +
-                          image_->GetPreferredSize().width() +
-                          GetInternalSpacing() + label_width + post_label_width;
+    const int max_width =
+        size.width() + GetInternalSpacing() + label_width + post_label_width;
     const int current_width = WidthMultiplier() * max_width;
     size.set_width(shrinking ? std::max(current_width, size.width())
                              : current_width);
@@ -205,12 +195,14 @@
 int IconLabelBubbleView::GetInternalSpacing() const {
   return image_->GetPreferredSize().IsEmpty()
              ? 0
-             : LocationBarView::kHorizontalPadding;
+             : GetLayoutConstant(LOCATION_BAR_ELEMENT_PADDING);
 }
 
 int IconLabelBubbleView::GetPostSeparatorPadding() const {
-  // The location bar will add LocationBarView::kHorizontalPadding after us.
-  return kSpaceBesideSeparator - LocationBarView::kHorizontalPadding;
+  // The location bar will add LOCATION_BAR_ELEMENT_PADDING after us.
+  return kSpaceBesideSeparator -
+         GetLayoutConstant(LOCATION_BAR_ELEMENT_PADDING) -
+         next_element_interior_padding_;
 }
 
 float IconLabelBubbleView::GetScaleFactor() const {
@@ -234,10 +226,9 @@
   const SkColor separator_color = SkColorSetA(
       plain_text_color, color_utils::IsDark(plain_text_color) ? 0x59 : 0xCC);
 
-  gfx::Rect bounds(GetLocalBounds());
+  gfx::Rect bounds(label_->bounds());
   const int kSeparatorHeight = 16;
-  bounds.Inset(GetPostSeparatorPadding(),
-               (bounds.height() - kSeparatorHeight) / 2);
+  bounds.Inset(0, (bounds.height() - kSeparatorHeight) / 2);
 
   // Draw the 1 px separator.
   gfx::ScopedCanvas scoped_canvas(canvas);
diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h
index 0928b90..7b5d37e0 100644
--- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h
+++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h
@@ -49,6 +49,10 @@
   views::Label* label() { return label_; }
   const views::Label* label() const { return label_; }
 
+  void set_next_element_interior_padding(int padding) {
+    next_element_interior_padding_ = padding;
+  }
+
   // Gets the color for displaying text.
   virtual SkColor GetTextColor() const = 0;
 
@@ -108,6 +112,11 @@
   views::ImageView* image_;
   views::Label* label_;
 
+  // The padding of the element that will be displayed after |this|. This value
+  // is relevant for calculating the amount of space to reserve after the
+  // separator.
+  int next_element_interior_padding_ = 0;
+
   DISALLOW_COPY_AND_ASSIGN(IconLabelBubbleView);
 };
 
diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view_unittest.cc b/chrome/browser/ui/views/location_bar/icon_label_bubble_view_unittest.cc
index 28f3efe..b2fc2bb 100644
--- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view_unittest.cc
+++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view_unittest.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/views/location_bar/icon_label_bubble_view.h"
 
 #include "base/strings/utf_string_conversions.h"
+#include "chrome/browser/ui/layout_constants.h"
 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "ui/views/controls/image_view.h"
@@ -65,7 +66,8 @@
   bool ShouldShowLabel() const override {
     return !IsShrinking() ||
            (width() > (image()->GetPreferredSize().width() +
-                       2 * LocationBarView::kHorizontalPadding));
+                       2 * LocationBarView::kIconInteriorPadding +
+                       2 * GetLayoutConstant(LOCATION_BAR_ELEMENT_PADDING)));
   }
 
   double WidthMultiplier() const override {
@@ -130,7 +132,7 @@
     minimum_size_reached_ = false;
     previous_width_ = 0;
     initial_image_x_ = GetImageBounds().x();
-    EXPECT_NE(0, initial_image_x_);
+    EXPECT_EQ(0, initial_image_x_);
   }
 
   void VerifyAnimationStep() {
@@ -152,7 +154,6 @@
         if (steady_reached_)
           EXPECT_EQ(previous_width_, width());
         EXPECT_EQ(initial_image_x_, GetImageBounds().x());
-        EXPECT_GT(GetImageBounds().x(), 0);
         EXPECT_LT(GetImageBounds().right(), width());
         EXPECT_TRUE(IsLabelVisible());
         EXPECT_GT(GetLabelBounds().x(), GetImageBounds().right());
diff --git a/chrome/browser/ui/views/location_bar/keyword_hint_view.cc b/chrome/browser/ui/views/location_bar/keyword_hint_view.cc
index 5f7c0bc..041b468b 100644
--- a/chrome/browser/ui/views/location_bar/keyword_hint_view.cc
+++ b/chrome/browser/ui/views/location_bar/keyword_hint_view.cc
@@ -113,7 +113,8 @@
   // Height will be ignored by the LocationBarView.
   return gfx::Size(leading_label_->GetPreferredSize().width() +
                        tab_key_view_->GetPreferredSize().width() +
-                       trailing_label_->GetPreferredSize().width(),
+                       trailing_label_->GetPreferredSize().width() +
+                       LocationBarView::kIconInteriorPadding,
                    0);
 }
 
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 8b2f203..6fa564c 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -248,24 +248,29 @@
   }
 
   zoom_view_ = new ZoomView(delegate_);
+  zoom_view_->Init();
   AddChildView(zoom_view_);
 
   open_pdf_in_reader_view_ = new OpenPDFInReaderView();
   AddChildView(open_pdf_in_reader_view_);
 
   manage_passwords_icon_view_ = new ManagePasswordsIconViews(command_updater());
+  manage_passwords_icon_view_->Init();
   AddChildView(manage_passwords_icon_view_);
 
   save_credit_card_icon_view_ =
       new autofill::SaveCardIconView(command_updater(), browser_);
+  save_credit_card_icon_view_->Init();
   save_credit_card_icon_view_->SetVisible(false);
   AddChildView(save_credit_card_icon_view_);
 
   translate_icon_view_ = new TranslateIconView(command_updater());
+  translate_icon_view_->Init();
   translate_icon_view_->SetVisible(false);
   AddChildView(translate_icon_view_);
 
   star_view_ = new StarView(command_updater(), browser_);
+  star_view_->Init();
   star_view_->SetVisible(false);
   AddChildView(star_view_);
 
@@ -462,8 +467,8 @@
         location_icon_view_->GetMinimumSizeForLabelText(GetLocationIconText())
             .width();
   } else {
-    leading_width +=
-        kHorizontalPadding + location_icon_view_->GetMinimumSize().width();
+    leading_width += GetLayoutConstant(LOCATION_BAR_ELEMENT_PADDING) +
+                     location_icon_view_->GetMinimumSize().width();
   }
 
   // Compute width of omnibox-trailing content.
@@ -482,7 +487,7 @@
   }
 
   min_size.set_width(leading_width + omnibox_view_->GetMinimumSize().width() +
-                     2 * kHorizontalPadding -
+                     2 * GetLayoutConstant(LOCATION_BAR_ELEMENT_PADDING) -
                      omnibox_view_->GetInsets().width() + trailing_width);
   return min_size;
 }
@@ -495,14 +500,13 @@
   location_icon_view_->SetVisible(false);
   keyword_hint_view_->SetVisible(false);
 
-  constexpr int item_padding = kHorizontalPadding;
+  const int item_padding = GetLayoutConstant(LOCATION_BAR_ELEMENT_PADDING);
 
   LocationBarLayout leading_decorations(
       LocationBarLayout::LEFT_EDGE, item_padding,
       item_padding - omnibox_view_->GetInsets().left());
-  LocationBarLayout trailing_decorations(
-      LocationBarLayout::RIGHT_EDGE, item_padding,
-      item_padding - omnibox_view_->GetInsets().right());
+  LocationBarLayout trailing_decorations(LocationBarLayout::RIGHT_EDGE,
+                                         item_padding, item_padding);
 
   const base::string16 keyword(omnibox_view_->model()->keyword());
   // In some cases (e.g. fullscreen mode) we may have 0 height.  We still want
@@ -515,7 +519,7 @@
   location_icon_view_->SetLabel(base::string16());
   if (ShouldShowKeywordBubble()) {
     leading_decorations.AddDecoration(vertical_padding, location_height, true,
-                                      0, 0, item_padding,
+                                      0, item_padding, item_padding,
                                       selected_keyword_view_);
     if (selected_keyword_view_->keyword() != keyword) {
       selected_keyword_view_->SetKeyword(keyword);
@@ -536,8 +540,8 @@
     // The largest fraction of the omnibox that can be taken by the EV bubble.
     const double kMaxBubbleFraction = 0.5;
     leading_decorations.AddDecoration(vertical_padding, location_height, false,
-                                      kMaxBubbleFraction, 0, item_padding,
-                                      location_icon_view_);
+                                      kMaxBubbleFraction, item_padding,
+                                      item_padding, location_icon_view_);
   } else {
     leading_decorations.AddDecoration(vertical_padding, location_height,
                                       location_icon_view_);
@@ -691,7 +695,8 @@
 // LocationBarView, private:
 
 int LocationBarView::IncrementalMinimumWidth(views::View* view) const {
-  return view->visible() ? (kHorizontalPadding + view->GetMinimumSize().width())
+  return view->visible() ? (GetLayoutConstant(LOCATION_BAR_ELEMENT_PADDING) +
+                            view->GetMinimumSize().width())
                          : 0;
 }
 
@@ -702,9 +707,8 @@
 }
 
 int LocationBarView::GetTotalVerticalPadding() const {
-  constexpr int kInteriorPadding = 1;
   return BackgroundWith1PxBorder::kLocationBarBorderThicknessDip +
-         kInteriorPadding;
+         GetLayoutConstant(LOCATION_BAR_ELEMENT_PADDING);
 }
 
 void LocationBarView::RefreshLocationIcon() {
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.h b/chrome/browser/ui/views/location_bar/location_bar_view.h
index 70d5938..3b8fd61 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.h
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.h
@@ -108,12 +108,13 @@
     SECURITY_CHIP_TEXT,
   };
 
-  // Width (and height) of icons in location bar.
+  // Visual width (and height) of icons in location bar.
   static constexpr int kIconWidth = 16;
 
-  // Space between items in the location bar, as well as between items and the
-  // edges.
-  static constexpr int kHorizontalPadding = 6;
+  // The amount of padding between the visual edge of an icon and the edge of
+  // its click target, for all all sides of the icon. The total edge length of
+  // each icon view should be kIconWidth + 2 * kIconInteriorPadding.
+  static constexpr int kIconInteriorPadding = 4;
 
   // The additional vertical padding of a bubble.
   static constexpr int kBubbleVerticalPadding = 3;
diff --git a/chrome/browser/ui/views/location_bar/selected_keyword_view.cc b/chrome/browser/ui/views/location_bar/selected_keyword_view.cc
index edd10f77..53c7cca 100644
--- a/chrome/browser/ui/views/location_bar/selected_keyword_view.cc
+++ b/chrome/browser/ui/views/location_bar/selected_keyword_view.cc
@@ -10,6 +10,7 @@
 #include "chrome/browser/ui/location_bar/location_bar_util.h"
 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
 #include "chrome/grit/generated_resources.h"
+#include "components/omnibox/browser/vector_icons.h"
 #include "components/search_engines/template_url_service.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/theme_provider.h"
@@ -32,7 +33,7 @@
 }
 
 void SelectedKeywordView::ResetImage() {
-  SetImage(gfx::CreateVectorIcon(gfx::VectorIconId::OMNIBOX_SEARCH,
+  SetImage(gfx::CreateVectorIcon(omnibox::kSearchIcon,
                                  LocationBarView::kIconWidth, GetTextColor()));
 }
 
diff --git a/chrome/browser/ui/views/location_bar/star_view.cc b/chrome/browser/ui/views/location_bar/star_view.cc
index 912969b..e58b061 100644
--- a/chrome/browser/ui/views/location_bar/star_view.cc
+++ b/chrome/browser/ui/views/location_bar/star_view.cc
@@ -13,6 +13,7 @@
 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h"
 #include "chrome/grit/generated_resources.h"
 #include "components/strings/grit/components_strings.h"
+#include "components/toolbar/vector_icons.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/gfx/vector_icons_public.h"
 
@@ -62,7 +63,6 @@
   return BookmarkBubbleView::bookmark_bubble();
 }
 
-gfx::VectorIconId StarView::GetVectorIcon() const {
-  return active() ? gfx::VectorIconId::LOCATION_BAR_STAR_ACTIVE
-                  : gfx::VectorIconId::LOCATION_BAR_STAR;
+const gfx::VectorIcon& StarView::GetVectorIcon() const {
+  return active() ? toolbar::kStarActiveIcon : toolbar::kStarIcon;
 }
diff --git a/chrome/browser/ui/views/location_bar/star_view.h b/chrome/browser/ui/views/location_bar/star_view.h
index 32f327f..6bb7d6eb 100644
--- a/chrome/browser/ui/views/location_bar/star_view.h
+++ b/chrome/browser/ui/views/location_bar/star_view.h
@@ -25,7 +25,7 @@
   void OnExecuting(BubbleIconView::ExecuteSource execute_source) override;
   void ExecuteCommand(ExecuteSource source) override;
   views::BubbleDialogDelegateView* GetBubble() const override;
-  gfx::VectorIconId GetVectorIcon() const override;
+  const gfx::VectorIcon& GetVectorIcon() const override;
 
  private:
   Browser* browser_;
diff --git a/chrome/browser/ui/views/location_bar/zoom_view.cc b/chrome/browser/ui/views/location_bar/zoom_view.cc
index 38dd099e..53c86cfc 100644
--- a/chrome/browser/ui/views/location_bar/zoom_view.cc
+++ b/chrome/browser/ui/views/location_bar/zoom_view.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/views/location_bar/zoom_view.h"
 
 #include "base/i18n/number_formatting.h"
+#include "chrome/app/vector_icons/vector_icons.h"
 #include "chrome/browser/ui/view_ids.h"
 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h"
 #include "chrome/grit/generated_resources.h"
@@ -14,13 +15,12 @@
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/events/event.h"
 #include "ui/gfx/geometry/size.h"
-#include "ui/gfx/vector_icons_public.h"
 
 ZoomView::ZoomView(LocationBarView::Delegate* location_bar_delegate)
     : BubbleIconView(nullptr, 0),
       location_bar_delegate_(location_bar_delegate),
-      image_id_(gfx::VectorIconId::VECTOR_ICON_NONE) {
-  Update(NULL);
+      icon_(&kZoomMinusIcon) {
+  Update(nullptr);
 }
 
 ZoomView::~ZoomView() {
@@ -39,10 +39,10 @@
       base::FormatPercent(zoom_controller->GetZoomPercent())));
 
   // The icon is hidden when the zoom level is default.
-  image_id_ = zoom_controller->GetZoomRelativeToDefault() ==
-                      zoom::ZoomController::ZOOM_BELOW_DEFAULT_ZOOM
-                  ? gfx::VectorIconId::ZOOM_MINUS
-                  : gfx::VectorIconId::ZOOM_PLUS;
+  icon_ = zoom_controller->GetZoomRelativeToDefault() ==
+                  zoom::ZoomController::ZOOM_BELOW_DEFAULT_ZOOM
+              ? &kZoomMinusIcon
+              : &kZoomPlusIcon;
   if (GetNativeTheme())
     UpdateIcon();
 
@@ -63,6 +63,6 @@
   return ZoomBubbleView::GetZoomBubble();
 }
 
-gfx::VectorIconId ZoomView::GetVectorIcon() const {
-  return image_id_;
+const gfx::VectorIcon& ZoomView::GetVectorIcon() const {
+  return *icon_;
 }
diff --git a/chrome/browser/ui/views/location_bar/zoom_view.h b/chrome/browser/ui/views/location_bar/zoom_view.h
index 1a6117e..0eb2c9b4 100644
--- a/chrome/browser/ui/views/location_bar/zoom_view.h
+++ b/chrome/browser/ui/views/location_bar/zoom_view.h
@@ -32,13 +32,13 @@
   void OnExecuting(BubbleIconView::ExecuteSource source) override;
   void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
   views::BubbleDialogDelegateView* GetBubble() const override;
-  gfx::VectorIconId GetVectorIcon() const override;
+  const gfx::VectorIcon& GetVectorIcon() const override;
 
  private:
   // The delegate used to get the currently visible WebContents.
   LocationBarView::Delegate* location_bar_delegate_;
 
-  gfx::VectorIconId image_id_;
+  const gfx::VectorIcon* icon_ = nullptr;
 
   DISALLOW_COPY_AND_ASSIGN(ZoomView);
 };
diff --git a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
index a911136..3b5cf75 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
@@ -20,12 +20,14 @@
 #include "base/i18n/bidi_line_iterator.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
+#include "chrome/browser/ui/layout_constants.h"
 #include "chrome/browser/ui/views/location_bar/background_with_1_px_border.h"
 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
 #include "chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h"
 #include "chrome/grit/generated_resources.h"
 #include "components/grit/components_scaled_resources.h"
 #include "components/omnibox/browser/omnibox_popup_model.h"
+#include "components/omnibox/browser/vector_icons.h"
 #include "third_party/skia/include/core/SkColor.h"
 #include "ui/accessibility/ax_node_data.h"
 #include "ui/base/l10n/l10n_util.h"
@@ -40,7 +42,6 @@
 #include "ui/gfx/range/range.h"
 #include "ui/gfx/render_text.h"
 #include "ui/gfx/text_utils.h"
-#include "ui/gfx/vector_icons_public.h"
 #include "ui/native_theme/native_theme.h"
 
 using ui::NativeTheme;
@@ -197,8 +198,7 @@
   CHECK_GE(model_index, 0);
   keyword_icon_->set_owned_by_client();
   keyword_icon_->EnableCanvasFlippingForRTLUI(true);
-  keyword_icon_->SetImage(
-      GetVectorIcon(gfx::VectorIconId::OMNIBOX_KEYWORD_SEARCH));
+  keyword_icon_->SetImage(GetVectorIcon(omnibox::kKeywordSearchIcon));
   keyword_icon_->SizeToPreferredSize();
 }
 
@@ -565,19 +565,18 @@
   if (!image.IsEmpty())
     return image.AsImageSkia();
 
-  return GetVectorIcon(
-      model_->IsStarredMatch(match_)
-          ? gfx::VectorIconId::OMNIBOX_STAR
-          : AutocompleteMatch::TypeToVectorIcon(match_.type));
+  return GetVectorIcon(model_->IsStarredMatch(match_)
+                           ? omnibox::kStarIcon
+                           : AutocompleteMatch::TypeToVectorIcon(match_.type));
 }
 
 gfx::ImageSkia OmniboxResultView::GetVectorIcon(
-    gfx::VectorIconId icon_id) const {
+    const gfx::VectorIcon& icon) const {
   // For selected rows, paint the icon the same color as the text.
   SkColor color = GetColor(GetState(), TEXT);
   if (GetState() != SELECTED)
     color = color_utils::DeriveDefaultIconColor(color);
-  return gfx::CreateVectorIcon(icon_id, 16, color);
+  return gfx::CreateVectorIcon(icon, 16, color);
 }
 
 bool OmniboxResultView::ShowOnlyKeywordMatch() const {
@@ -594,21 +593,21 @@
 }
 
 void OmniboxResultView::Layout() {
-  constexpr int horizontal_padding = LocationBarView::kHorizontalPadding;
+  const int horizontal_padding =
+      GetLayoutConstant(LOCATION_BAR_ELEMENT_PADDING) +
+      LocationBarView::kIconInteriorPadding;
   // The horizontal bounds we're given are the outside bounds, so we can match
   // the omnibox border outline shape exactly in OnPaint().  We have to inset
   // here to keep the icons lined up.
-  constexpr int start_x =
-      BackgroundWith1PxBorder::kLocationBarBorderThicknessDip +
-      horizontal_padding;
+  const int start_x = BackgroundWith1PxBorder::kLocationBarBorderThicknessDip +
+                      horizontal_padding;
   const int end_x = width() - start_x;
 
   const gfx::ImageSkia icon = GetIcon();
   icon_bounds_.SetRect(start_x, (GetContentLineHeight() - icon.height()) / 2,
                        icon.width(), icon.height());
 
-  constexpr int text_x =
-      start_x + LocationBarView::kIconWidth + horizontal_padding;
+  const int text_x = start_x + LocationBarView::kIconWidth + horizontal_padding;
   int text_width = end_x - text_x;
 
   if (match_.associated_keyword.get()) {
diff --git a/chrome/browser/ui/views/omnibox/omnibox_result_view.h b/chrome/browser/ui/views/omnibox/omnibox_result_view.h
index 2a0f8019..7597002c 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_result_view.h
+++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.h
@@ -133,7 +133,7 @@
   gfx::ImageSkia GetIcon() const;
 
   // Utility function for creating vector icons.
-  gfx::ImageSkia GetVectorIcon(gfx::VectorIconId icon_id) const;
+  gfx::ImageSkia GetVectorIcon(const gfx::VectorIcon& icon_id) const;
 
   // Whether to render only the keyword match.  Returns true if |match_| has an
   // associated keyword match that has been animated so close to the start that
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_icon_views.cc b/chrome/browser/ui/views/passwords/manage_passwords_icon_views.cc
index bce75869..f0990974 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_icon_views.cc
+++ b/chrome/browser/ui/views/passwords/manage_passwords_icon_views.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/views/passwords/manage_passwords_icon_views.h"
 
 #include "chrome/app/chrome_command_ids.h"
+#include "chrome/app/vector_icons/vector_icons.h"
 #include "chrome/browser/command_updater.h"
 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h"
 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h"
@@ -12,7 +13,6 @@
 #include "components/password_manager/core/common/password_manager_ui.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/vector_icons_public.h"
 
 ManagePasswordsIconViews::ManagePasswordsIconViews(CommandUpdater* updater)
     : BubbleIconView(updater, IDC_MANAGE_PASSWORDS_FOR_PAGE),
@@ -83,8 +83,8 @@
   return ManagePasswordsBubbleView::manage_password_bubble();
 }
 
-gfx::VectorIconId ManagePasswordsIconViews::GetVectorIcon() const {
-  return gfx::VectorIconId::AUTOLOGIN;
+const gfx::VectorIcon& ManagePasswordsIconViews::GetVectorIcon() const {
+  return kAutologinIcon;
 }
 
 void ManagePasswordsIconViews::AboutToRequestFocusFromTabTraversal(
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_icon_views.h b/chrome/browser/ui/views/passwords/manage_passwords_icon_views.h
index 72aa4c4..d39b4052 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_icon_views.h
+++ b/chrome/browser/ui/views/passwords/manage_passwords_icon_views.h
@@ -29,7 +29,7 @@
   bool OnMousePressed(const ui::MouseEvent& event) override;
   bool OnKeyPressed(const ui::KeyEvent& event) override;
   views::BubbleDialogDelegateView* GetBubble() const override;
-  gfx::VectorIconId GetVectorIcon() const override;
+  const gfx::VectorIcon& GetVectorIcon() const override;
 
   // views::View:
   void AboutToRequestFocusFromTabTraversal(bool reverse) override;
diff --git a/chrome/browser/ui/views/sad_tab_view.cc b/chrome/browser/ui/views/sad_tab_view.cc
index 7da282d..3082cb9 100644
--- a/chrome/browser/ui/views/sad_tab_view.cc
+++ b/chrome/browser/ui/views/sad_tab_view.cc
@@ -8,12 +8,12 @@
 
 #include "base/metrics/histogram_macros.h"
 #include "build/build_config.h"
+#include "chrome/app/vector_icons/vector_icons.h"
 #include "content/public/browser/web_contents.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/resource/resource_bundle.h"
 #include "ui/gfx/color_palette.h"
 #include "ui/gfx/paint_vector_icon.h"
-#include "ui/gfx/vector_icons_public.h"
 #include "ui/native_theme/common_theme.h"
 #include "ui/native_theme/native_theme.h"
 #include "ui/views/background.h"
@@ -54,8 +54,8 @@
 
   views::ImageView* image = new views::ImageView();
 
-  image->SetImage(gfx::CreateVectorIcon(gfx::VectorIconId::CRASHED_TAB, 48,
-                                        gfx::kChromeIconGrey));
+  image->SetImage(
+      gfx::CreateVectorIcon(kCrashedTabIcon, 48, gfx::kChromeIconGrey));
   layout->AddPaddingRow(1, views::kPanelVerticalSpacing);
   layout->StartRow(0, column_set_id);
   layout->AddView(image, 2, 1);
diff --git a/chrome/browser/ui/views/translate/translate_icon_view.cc b/chrome/browser/ui/views/translate/translate_icon_view.cc
index 9ddff43..7cbc95a 100644
--- a/chrome/browser/ui/views/translate/translate_icon_view.cc
+++ b/chrome/browser/ui/views/translate/translate_icon_view.cc
@@ -7,6 +7,7 @@
 #include "base/metrics/histogram_macros.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/app/chrome_command_ids.h"
+#include "chrome/app/vector_icons/vector_icons.h"
 #include "chrome/browser/ui/browser_commands.h"
 #include "chrome/browser/ui/translate/translate_bubble_view_state_transition.h"
 #include "chrome/browser/ui/view_ids.h"
@@ -14,7 +15,6 @@
 #include "chrome/grit/generated_resources.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/vector_icons_public.h"
 
 TranslateIconView::TranslateIconView(CommandUpdater* command_updater)
     : BubbleIconView(command_updater, IDC_TRANSLATE_PAGE) {
@@ -37,6 +37,6 @@
   return TranslateBubbleView::GetCurrentBubble();
 }
 
-gfx::VectorIconId TranslateIconView::GetVectorIcon() const {
-  return gfx::VectorIconId::TRANSLATE;
+const gfx::VectorIcon& TranslateIconView::GetVectorIcon() const {
+  return kTranslateIcon;
 }
diff --git a/chrome/browser/ui/views/translate/translate_icon_view.h b/chrome/browser/ui/views/translate/translate_icon_view.h
index ec4f57d0..f05dd1e5 100644
--- a/chrome/browser/ui/views/translate/translate_icon_view.h
+++ b/chrome/browser/ui/views/translate/translate_icon_view.h
@@ -22,7 +22,7 @@
   void OnExecuting(BubbleIconView::ExecuteSource execute_source) override;
   void OnPressed(bool activated) override;
   views::BubbleDialogDelegateView* GetBubble() const override;
-  gfx::VectorIconId GetVectorIcon() const override;
+  const gfx::VectorIcon& GetVectorIcon() const override;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(TranslateIconView);
diff --git a/chrome/browser/ui/webui/chromeos/login/base_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/base_screen_handler.cc
index 2fc6069c..52b76a7 100644
--- a/chrome/browser/ui/webui/chromeos/login/base_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/base_screen_handler.cc
@@ -31,6 +31,8 @@
 }
 
 BaseScreenHandler::~BaseScreenHandler() {
+  if (base_screen_)
+    base_screen_->set_model_view_channel(nullptr);
 }
 
 void BaseScreenHandler::InitializeBase() {
diff --git a/chrome/browser/ui/webui/chromeos/login/user_board_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/user_board_screen_handler.cc
index 315cd79..28869932 100644
--- a/chrome/browser/ui/webui/chromeos/login/user_board_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/user_board_screen_handler.cc
@@ -9,8 +9,8 @@
 
 namespace chromeos {
 
-UserBoardScreenHandler::UserBoardScreenHandler() : model_(nullptr) {
-}
+UserBoardScreenHandler::UserBoardScreenHandler()
+    : model_(nullptr), weak_factory_(this) {}
 
 UserBoardScreenHandler::~UserBoardScreenHandler() {
 }
@@ -104,4 +104,8 @@
   BaseScreenHandler::SetBaseScreen(nullptr);
 }
 
+base::WeakPtr<UserBoardView> UserBoardScreenHandler::GetWeakPtr() {
+  return weak_factory_.GetWeakPtr();
+}
+
 }  // namespace chromeos
diff --git a/chrome/browser/ui/webui/chromeos/login/user_board_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/user_board_screen_handler.h
index bc7090e..74b7ca0 100644
--- a/chrome/browser/ui/webui/chromeos/login/user_board_screen_handler.h
+++ b/chrome/browser/ui/webui/chromeos/login/user_board_screen_handler.h
@@ -54,8 +54,10 @@
 
   void Bind(UserBoardModel& model) override;
   void Unbind() override;
+  base::WeakPtr<UserBoardView> GetWeakPtr() override;
 
   UserBoardModel* model_;
+  base::WeakPtrFactory<UserBoardScreenHandler> weak_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(UserBoardScreenHandler);
 };
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 6ff0a95..a57a7e8 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -28,10 +28,6 @@
 // auth username/password pair.
 const char kAllowCrossOriginAuthPrompt[]    = "allow-cross-origin-auth-prompt";
 
-// On ChromeOS, file:// access is disabled except for certain whitelisted
-// directories. This switch re-enables file:// for testing.
-const char kAllowFileAccess[]               = "allow-file-access";
-
 // Allow non-secure origins to use the screen capture API and the desktopCapture
 // extension API.
 const char kAllowHttpScreenCapture[] = "allow-http-screen-capture";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 14480fa5..ce764856 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -32,7 +32,6 @@
 // All switches in alphabetical order. The switches should be documented
 // alongside the definition of their values in the .cc file.
 extern const char kAllowCrossOriginAuthPrompt[];
-extern const char kAllowFileAccess[];
 extern const char kAllowHttpScreenCapture[];
 extern const char kAllowOutdatedPlugins[];
 extern const char kAllowRunningInsecureContent[];
diff --git a/chrome/renderer/plugins/chrome_plugin_placeholder.cc b/chrome/renderer/plugins/chrome_plugin_placeholder.cc
index 2c4677da..c40e8e4 100644
--- a/chrome/renderer/plugins/chrome_plugin_placeholder.cc
+++ b/chrome/renderer/plugins/chrome_plugin_placeholder.cc
@@ -104,7 +104,7 @@
 
   // Will destroy itself when its WebViewPlugin is going away.
   return new ChromePluginPlaceholder(render_frame, frame, params, html_data,
-                                     params.mimeType);
+                                     params.mimeType.utf16());
 }
 
 // static
diff --git a/chrome/test/base/chrome_test_launcher.cc b/chrome/test/base/chrome_test_launcher.cc
index 29cb9f0c..1a73281 100644
--- a/chrome/test/base/chrome_test_launcher.cc
+++ b/chrome/test/base/chrome_test_launcher.cc
@@ -88,9 +88,6 @@
 
   new_command_line.AppendSwitchPath(switches::kUserDataDir, temp_data_dir);
 
-  // file:// access for ChromeOS.
-  new_command_line.AppendSwitch(switches::kAllowFileAccess);
-
   *command_line = new_command_line;
   return true;
 }
diff --git a/components/exo/pointer.cc b/components/exo/pointer.cc
index b10d0186..bd267e04 100644
--- a/components/exo/pointer.cc
+++ b/components/exo/pointer.cc
@@ -307,14 +307,32 @@
   if (!focus_)
     return;
 
+  display::Screen* screen = display::Screen::GetScreen();
+  WMHelper* helper = WMHelper::GetInstance();
+
   // Update cursor scale if the effective UI scale has changed.
   display::Display display =
-      display::Screen::GetScreen()->GetDisplayNearestWindow(
-          widget_->GetNativeWindow());
-  float ui_scale = WMHelper::GetInstance()
-                       ->GetDisplayInfo(display.id())
-                       .GetEffectiveUIScale();
-  if (WMHelper::GetInstance()->GetCursorSet() == ui::CURSOR_SET_LARGE)
+      screen->GetDisplayNearestWindow(widget_->GetNativeWindow());
+  float ui_scale = helper->GetDisplayInfo(display.id()).GetEffectiveUIScale();
+
+  if (display::Display::HasInternalDisplay()) {
+    float primary_device_scale_factor =
+        screen->GetPrimaryDisplay().device_scale_factor();
+
+    // The size of the cursor surface is the quotient of its physical size and
+    // the DSF of the primary display. The physical size is proportional to the
+    // DSF of the internal display. For external displays (and the internal
+    // display when secondary to a display with a different DSF), scale the
+    // cursor so its physical size matches with the single display case.
+    if (!display.IsInternal() ||
+        display.device_scale_factor() != primary_device_scale_factor) {
+      ui_scale *= primary_device_scale_factor /
+                  helper->GetDisplayInfo(display::Display::InternalDisplayId())
+                      .device_scale_factor();
+    }
+  }
+
+  if (helper->GetCursorSet() == ui::CURSOR_SET_LARGE)
     ui_scale *= kLargeCursorScale;
 
   if (ui_scale != cursor_scale_) {
diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc
index 40fd30b..ab7a96b 100644
--- a/components/exo/shell_surface.cc
+++ b/components/exo/shell_surface.cc
@@ -1506,6 +1506,9 @@
     // small style shadow for them.
     if (!activatable_)
       shadow->SetElevation(wm::ShadowElevation::SMALL);
+    // We don't have rounded corners unless frame is enabled.
+    if (!frame_enabled_)
+      shadow->SetRoundedCornerRadius(0);
   }
 }
 
diff --git a/components/metrics/BUILD.gn b/components/metrics/BUILD.gn
index 1d08245..0ed9813 100644
--- a/components/metrics/BUILD.gn
+++ b/components/metrics/BUILD.gn
@@ -25,6 +25,8 @@
     "drive_metrics_provider_win.cc",
     "enabled_state_provider.cc",
     "enabled_state_provider.h",
+    "execution_phase.cc",
+    "execution_phase.h",
     "file_metrics_provider.cc",
     "file_metrics_provider.h",
     "histogram_encoder.cc",
diff --git a/components/metrics/execution_phase.cc b/components/metrics/execution_phase.cc
new file mode 100644
index 0000000..c37f05c5
--- /dev/null
+++ b/components/metrics/execution_phase.cc
@@ -0,0 +1,63 @@
+// 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 "components/metrics/execution_phase.h"
+
+#include "components/browser_watcher/stability_data_names.h"
+#include "components/browser_watcher/stability_debugging.h"
+#include "components/metrics/metrics_pref_names.h"
+#include "components/prefs/pref_registry_simple.h"
+#include "components/prefs/pref_service.h"
+
+namespace metrics {
+
+ExecutionPhaseManager::ExecutionPhaseManager(PrefService* local_state)
+    : local_state_(local_state) {}
+
+ExecutionPhaseManager::~ExecutionPhaseManager() {}
+
+// static
+void ExecutionPhaseManager::RegisterPrefs(PrefRegistrySimple* registry) {
+  registry->RegisterIntegerPref(
+      prefs::kStabilityExecutionPhase,
+      static_cast<int>(ExecutionPhase::UNINITIALIZED_PHASE));
+}
+
+// static
+ExecutionPhase ExecutionPhaseManager::execution_phase_ =
+    ExecutionPhase::UNINITIALIZED_PHASE;
+
+void ExecutionPhaseManager::SetExecutionPhase(ExecutionPhase execution_phase) {
+  DCHECK(execution_phase != ExecutionPhase::START_METRICS_RECORDING ||
+         execution_phase_ == ExecutionPhase::UNINITIALIZED_PHASE);
+  execution_phase_ = execution_phase;
+  local_state_->SetInteger(prefs::kStabilityExecutionPhase,
+                           static_cast<int>(execution_phase_));
+  browser_watcher::SetStabilityDataInt(
+      browser_watcher::kStabilityExecutionPhase,
+      static_cast<int>(execution_phase_));
+}
+
+ExecutionPhase ExecutionPhaseManager::GetExecutionPhase() {
+  // TODO(rtenneti): On windows, consider saving/getting execution_phase from
+  // the registry.
+  return static_cast<ExecutionPhase>(
+      local_state_->GetInteger(prefs::kStabilityExecutionPhase));
+}
+
+#if defined(OS_ANDROID) || defined(OS_IOS)
+void ExecutionPhaseManager::OnAppEnterBackground() {
+  // Note: the in-memory ExecutionPhaseManager::execution_phase_ is not updated.
+  local_state_->SetInteger(prefs::kStabilityExecutionPhase,
+                           static_cast<int>(ExecutionPhase::SHUTDOWN_COMPLETE));
+}
+
+void ExecutionPhaseManager::OnAppEnterForeground() {
+  // Restore prefs value altered by OnEnterBackground.
+  local_state_->SetInteger(prefs::kStabilityExecutionPhase,
+                           static_cast<int>(execution_phase_));
+}
+#endif  // defined(OS_ANDROID) || defined(OS_IOS)
+
+}  // namespace metrics
diff --git a/components/metrics/execution_phase.h b/components/metrics/execution_phase.h
new file mode 100644
index 0000000..b158923
--- /dev/null
+++ b/components/metrics/execution_phase.h
@@ -0,0 +1,55 @@
+// 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 COMPONENTS_METRICS_EXECUTION_PHASE_H_
+#define COMPONENTS_METRICS_EXECUTION_PHASE_H_
+
+#include "base/macros.h"
+#include "build/build_config.h"
+
+class PrefService;
+class PrefRegistrySimple;
+
+namespace metrics {
+
+enum class ExecutionPhase {
+  UNINITIALIZED_PHASE = 0,
+  START_METRICS_RECORDING = 100,
+  CREATE_PROFILE = 200,
+  STARTUP_TIMEBOMB_ARM = 300,
+  THREAD_WATCHER_START = 400,
+  MAIN_MESSAGE_LOOP_RUN = 500,
+  SHUTDOWN_TIMEBOMB_ARM = 600,
+  SHUTDOWN_COMPLETE = 700,
+};
+
+// Helper class for managing ExecutionPhase state in prefs and memory.
+// It's safe to construct temporary objects to perform these operations.
+class ExecutionPhaseManager {
+ public:
+  explicit ExecutionPhaseManager(PrefService* local_state);
+  ~ExecutionPhaseManager();
+
+  static void RegisterPrefs(PrefRegistrySimple* registry);
+
+  void SetExecutionPhase(ExecutionPhase execution_phase);
+  ExecutionPhase GetExecutionPhase();
+
+#if defined(OS_ANDROID) || defined(OS_IOS)
+  void OnAppEnterBackground();
+  void OnAppEnterForeground();
+#endif  // defined(OS_ANDROID) || defined(OS_IOS)
+
+ private:
+  // Execution phase the browser is in.
+  static ExecutionPhase execution_phase_;
+
+  PrefService* local_state_;
+
+  DISALLOW_COPY_AND_ASSIGN(ExecutionPhaseManager);
+};
+
+}  // namespace metrics
+
+#endif  // COMPONENTS_METRICS_EXECUTION_PHASE_H_
diff --git a/components/metrics/metrics_service.cc b/components/metrics/metrics_service.cc
index 43d9fafa..55164d1f 100644
--- a/components/metrics/metrics_service.cc
+++ b/components/metrics/metrics_service.cc
@@ -147,8 +147,6 @@
 #include "base/time/time.h"
 #include "base/tracked_objects.h"
 #include "build/build_config.h"
-#include "components/browser_watcher/stability_data_names.h"
-#include "components/browser_watcher/stability_debugging.h"
 #include "components/metrics/data_use_tracker.h"
 #include "components/metrics/metrics_log.h"
 #include "components/metrics/metrics_log_manager.h"
@@ -230,9 +228,7 @@
 void MarkAppCleanShutdownAndCommit(CleanExitBeacon* clean_exit_beacon,
                                    PrefService* local_state) {
   clean_exit_beacon->WriteBeaconValue(true);
-  // Note: the in-memory MetricsService::execution_phase_ is not updated.
-  local_state->SetInteger(prefs::kStabilityExecutionPhase,
-                          MetricsService::SHUTDOWN_COMPLETE);
+  ExecutionPhaseManager(local_state).OnAppEnterBackground();
   // Start writing right away (write happens on a different thread).
   local_state->CommitPendingWrite();
 }
@@ -244,9 +240,6 @@
 MetricsService::ShutdownCleanliness MetricsService::clean_shutdown_status_ =
     MetricsService::CLEANLY_SHUTDOWN;
 
-MetricsService::ExecutionPhase MetricsService::execution_phase_ =
-    MetricsService::UNINITIALIZED_PHASE;
-
 // static
 void MetricsService::RegisterPrefs(PrefRegistrySimple* registry) {
   MetricsStateManager::RegisterPrefs(registry);
@@ -260,8 +253,7 @@
   registry->RegisterStringPref(prefs::kStabilityStatsVersion, std::string());
   registry->RegisterInt64Pref(prefs::kStabilityStatsBuildTime, 0);
   registry->RegisterBooleanPref(prefs::kStabilityExitedCleanly, true);
-  registry->RegisterIntegerPref(prefs::kStabilityExecutionPhase,
-                                UNINITIALIZED_PHASE);
+  ExecutionPhaseManager::RegisterPrefs(registry);
   registry->RegisterBooleanPref(prefs::kStabilitySessionEndCompleted, true);
   registry->RegisterIntegerPref(prefs::kMetricsSessionID, -1);
 
@@ -502,9 +494,7 @@
 
 void MetricsService::OnAppEnterForeground() {
   clean_exit_beacon_.WriteBeaconValue(false);
-  // Restore the execution phase stored in prefs. It was altered in
-  // OnAppEnterBackground by a call to MarkAppCleanShutdownAndCommit.
-  local_state_->SetInteger(prefs::kStabilityExecutionPhase, execution_phase_);
+  ExecutionPhaseManager(local_state_).OnAppEnterForeground();
   StartSchedulerIfNecessary();
 }
 #else
@@ -518,10 +508,7 @@
 // static
 void MetricsService::SetExecutionPhase(ExecutionPhase execution_phase,
                                        PrefService* local_state) {
-  execution_phase_ = execution_phase;
-  local_state->SetInteger(prefs::kStabilityExecutionPhase, execution_phase_);
-  browser_watcher::SetStabilityDataInt(
-      browser_watcher::kStabilityExecutionPhase, execution_phase_);
+  ExecutionPhaseManager(local_state).SetExecutionPhase(execution_phase);
 }
 
 void MetricsService::RecordBreakpadRegistration(bool success) {
@@ -614,13 +601,10 @@
     // Reset flag, and wait until we call LogNeedForCleanShutdown() before
     // monitoring.
     clean_exit_beacon_.WriteBeaconValue(true);
-    // TODO(rtenneti): On windows, consider saving/getting execution_phase from
-    // the registry.
-    int execution_phase =
-        local_state_->GetInteger(prefs::kStabilityExecutionPhase);
+    ExecutionPhaseManager manager(local_state_);
     UMA_HISTOGRAM_SPARSE_SLOWLY("Chrome.Browser.CrashedExecutionPhase",
-                                execution_phase);
-    SetExecutionPhase(UNINITIALIZED_PHASE, local_state_);
+                                static_cast<int>(manager.GetExecutionPhase()));
+    manager.SetExecutionPhase(ExecutionPhase::UNINITIALIZED_PHASE);
   }
 
   // ProvidersHaveInitialStabilityMetrics is called first to ensure it is never
@@ -670,8 +654,7 @@
   // Stability bookkeeping
   IncrementPrefValue(prefs::kStabilityLaunchCount);
 
-  DCHECK_EQ(UNINITIALIZED_PHASE, execution_phase_);
-  SetExecutionPhase(START_METRICS_RECORDING, local_state_);
+  SetExecutionPhase(ExecutionPhase::START_METRICS_RECORDING, local_state_);
 
   if (!local_state_->GetBoolean(prefs::kStabilitySessionEndCompleted)) {
     IncrementPrefValue(prefs::kStabilityIncompleteSessionEndCount);
@@ -1269,7 +1252,7 @@
   clean_shutdown_status_ = CLEANLY_SHUTDOWN;
   client_->OnLogCleanShutdown();
   clean_exit_beacon_.WriteBeaconValue(true);
-  SetExecutionPhase(MetricsService::SHUTDOWN_COMPLETE, local_state_);
+  SetExecutionPhase(ExecutionPhase::SHUTDOWN_COMPLETE, local_state_);
   local_state_->SetBoolean(prefs::kStabilitySessionEndCompleted, end_completed);
 }
 
diff --git a/components/metrics/metrics_service.h b/components/metrics/metrics_service.h
index 4d97f18..f00dcc76 100644
--- a/components/metrics/metrics_service.h
+++ b/components/metrics/metrics_service.h
@@ -29,6 +29,7 @@
 #include "build/build_config.h"
 #include "components/metrics/clean_exit_beacon.h"
 #include "components/metrics/data_use_tracker.h"
+#include "components/metrics/execution_phase.h"
 #include "components/metrics/metrics_log.h"
 #include "components/metrics/metrics_log_manager.h"
 #include "components/metrics/metrics_provider.h"
@@ -60,18 +61,6 @@
 // See metrics_service.cc for a detailed description.
 class MetricsService : public base::HistogramFlattener {
  public:
-  // The execution phase of the browser.
-  enum ExecutionPhase {
-    UNINITIALIZED_PHASE = 0,
-    START_METRICS_RECORDING = 100,
-    CREATE_PROFILE = 200,
-    STARTUP_TIMEBOMB_ARM = 300,
-    THREAD_WATCHER_START = 400,
-    MAIN_MESSAGE_LOOP_RUN = 500,
-    SHUTDOWN_TIMEBOMB_ARM = 600,
-    SHUTDOWN_COMPLETE = 700,
-  };
-
   // Creates the MetricsService with the given |state_manager|, |client|, and
   // |local_state|.  Does not take ownership of the paramaters; instead stores
   // a weak pointer to each. Caller should ensure that the parameters are valid
@@ -455,9 +444,6 @@
   base::ObserverList<variations::SyntheticTrialObserver>
       synthetic_trial_observer_list_;
 
-  // Execution phase the browser is in.
-  static ExecutionPhase execution_phase_;
-
   // Redundant marker to check that we completed our shutdown, and set the
   // exited-cleanly bit in the prefs.
   static ShutdownCleanliness clean_shutdown_status_;
diff --git a/components/metrics/metrics_service_unittest.cc b/components/metrics/metrics_service_unittest.cc
index 37dbbdd..7556ff0 100644
--- a/components/metrics/metrics_service_unittest.cc
+++ b/components/metrics/metrics_service_unittest.cc
@@ -83,7 +83,7 @@
   }
 
   ~MetricsServiceTest() override {
-    MetricsService::SetExecutionPhase(MetricsService::UNINITIALIZED_PHASE,
+    MetricsService::SetExecutionPhase(ExecutionPhase::UNINITIALIZED_PHASE,
                                       GetLocalState());
   }
 
diff --git a/components/omnibox/browser/BUILD.gn b/components/omnibox/browser/BUILD.gn
index b0e6a38e..7b0fc11 100644
--- a/components/omnibox/browser/BUILD.gn
+++ b/components/omnibox/browser/BUILD.gn
@@ -8,6 +8,46 @@
   import("//build/config/android/rules.gni")
 }
 
+action("aggregate_vector_icons") {
+  visibility = [ ":*" ]
+
+  script = "//ui/gfx/vector_icons/aggregate_vector_icons.py"
+
+  icons = [
+    "vector_icons/calculator.1x.icon",
+    "vector_icons/calculator.icon",
+    "vector_icons/extension_app.1x.icon",
+    "vector_icons/extension_app.icon",
+    "vector_icons/http.icon",
+    "vector_icons/keyword_search.icon",
+    "vector_icons/search.icon",
+    "vector_icons/star.1x.icon",
+    "vector_icons/star.icon",
+  ]
+
+  output_cc = "$target_gen_dir/vector_icons.cc"
+  output_h = "$target_gen_dir/vector_icons.h"
+
+  inputs = icons
+  inputs += [
+    "vector_icons/vector_icons.cc.template",
+    "vector_icons/vector_icons.h.template",
+  ]
+  outputs = [
+    output_cc,
+    output_h,
+  ]
+
+  response_file_contents = rebase_path(icons, root_build_dir)
+
+  args = [
+    "--working_directory=" + rebase_path("./vector_icons"),
+    "--file_list={{response_file_name}}",
+    "--output_cc=" + rebase_path(output_cc, root_build_dir),
+    "--output_h=" + rebase_path(output_h, root_build_dir),
+  ]
+}
+
 static_library("browser") {
   sources = [
     "answers_cache.cc",
@@ -109,6 +149,8 @@
     "zero_suggest_provider.h",
   ]
 
+  defines = [ "OMNIBOX_BROWSER_IMPLEMENTATION" ]
+
   public_deps = [
     "//components/history/core/browser",
     "//components/metrics/proto",
@@ -145,6 +187,11 @@
     "//url",
   ]
 
+  if (!is_android && !is_ios) {
+    sources += get_target_outputs(":aggregate_vector_icons")
+    deps += [ ":aggregate_vector_icons" ]
+  }
+
   # TODO(brettw) Fix the include cycle and remove this line.
   allow_circular_includes_from = [ "//components/search_engines" ]
 }
diff --git a/components/omnibox/browser/autocomplete_match.cc b/components/omnibox/browser/autocomplete_match.cc
index c8b890d..bb65962 100644
--- a/components/omnibox/browser/autocomplete_match.cc
+++ b/components/omnibox/browser/autocomplete_match.cc
@@ -20,7 +20,11 @@
 #include "components/search_engines/template_url.h"
 #include "components/search_engines/template_url_service.h"
 #include "components/url_formatter/url_formatter.h"
-#include "ui/gfx/vector_icons_public.h"
+#include "ui/gfx/vector_icon_types.h"
+
+#if !defined(OS_ANDROID) && !defined(OS_IOS)
+#include "components/omnibox/browser/vector_icons.h"  // nogncheck
+#endif
 
 namespace {
 
@@ -166,39 +170,50 @@
 }
 
 // static
-gfx::VectorIconId AutocompleteMatch::TypeToVectorIcon(Type type) {
+const gfx::VectorIcon& AutocompleteMatch::TypeToVectorIcon(Type type) {
 #if !defined(OS_ANDROID) && !defined(OS_IOS)
-  static const gfx::VectorIconId kIcons[] = {
-      gfx::VectorIconId::OMNIBOX_HTTP,           // URL_WHAT_YOU_TYPE
-      gfx::VectorIconId::OMNIBOX_HTTP,           // HISTORY_URL
-      gfx::VectorIconId::OMNIBOX_HTTP,           // HISTORY_TITLE
-      gfx::VectorIconId::OMNIBOX_HTTP,           // HISTORY_BODY
-      gfx::VectorIconId::OMNIBOX_HTTP,           // HISTORY_KEYWORD
-      gfx::VectorIconId::OMNIBOX_HTTP,           // NAVSUGGEST
-      gfx::VectorIconId::OMNIBOX_SEARCH,         // SEARCH_WHAT_YOU_TYPED
-      gfx::VectorIconId::OMNIBOX_SEARCH,         // SEARCH_HISTORY
-      gfx::VectorIconId::OMNIBOX_SEARCH,         // SEARCH_SUGGEST
-      gfx::VectorIconId::OMNIBOX_SEARCH,         // SEARCH_SUGGEST_ENTITY
-      gfx::VectorIconId::OMNIBOX_SEARCH,         // SEARCH_SUGGEST_TAIL
-      gfx::VectorIconId::OMNIBOX_SEARCH,         // SEARCH_SUGGEST_PERSONALIZED
-      gfx::VectorIconId::OMNIBOX_SEARCH,         // SEARCH_SUGGEST_PROFILE
-      gfx::VectorIconId::OMNIBOX_SEARCH,         // SEARCH_OTHER_ENGINE
-      gfx::VectorIconId::OMNIBOX_EXTENSION_APP,  // EXTENSION_APP
-      gfx::VectorIconId::OMNIBOX_SEARCH,         // CONTACT_DEPRECATED
-      gfx::VectorIconId::OMNIBOX_HTTP,           // BOOKMARK_TITLE
-      gfx::VectorIconId::OMNIBOX_HTTP,           // NAVSUGGEST_PERSONALIZED
-      gfx::VectorIconId::OMNIBOX_CALCULATOR,     // CALCULATOR
-      gfx::VectorIconId::OMNIBOX_HTTP,           // CLIPBOARD
-      gfx::VectorIconId::OMNIBOX_SEARCH,         // VOICE_SEARCH
-      gfx::VectorIconId::OMNIBOX_HTTP,           // PHYSICAL_WEB
-      gfx::VectorIconId::OMNIBOX_HTTP,           // PHYSICAL_WEB_OVERFLOW
-  };
-  static_assert(arraysize(kIcons) == AutocompleteMatchType::NUM_TYPES,
-                "icons array must have NUM_TYPES elements");
-  return kIcons[type];
+  switch (type) {
+    case Type::URL_WHAT_YOU_TYPED:
+    case Type::HISTORY_URL:
+    case Type::HISTORY_TITLE:
+    case Type::HISTORY_BODY:
+    case Type::HISTORY_KEYWORD:
+    case Type::NAVSUGGEST:
+    case Type::BOOKMARK_TITLE:
+    case Type::NAVSUGGEST_PERSONALIZED:
+    case Type::CLIPBOARD:
+    case Type::PHYSICAL_WEB:
+    case Type::PHYSICAL_WEB_OVERFLOW:
+      return omnibox::kHttpIcon;
+
+    case Type::SEARCH_WHAT_YOU_TYPED:
+    case Type::SEARCH_HISTORY:
+    case Type::SEARCH_SUGGEST:
+    case Type::SEARCH_SUGGEST_ENTITY:
+    case Type::SEARCH_SUGGEST_TAIL:
+    case Type::SEARCH_SUGGEST_PERSONALIZED:
+    case Type::SEARCH_SUGGEST_PROFILE:
+    case Type::SEARCH_OTHER_ENGINE:
+    case Type::CONTACT_DEPRECATED:
+    case Type::VOICE_SUGGEST:
+      return omnibox::kSearchIcon;
+
+    case Type::EXTENSION_APP:
+      return omnibox::kExtensionAppIcon;
+
+    case Type::CALCULATOR:
+      return omnibox::kCalculatorIcon;
+
+    case Type::NUM_TYPES:
+      NOTREACHED();
+      break;
+  }
+  NOTREACHED();
+  return omnibox::kHttpIcon;
 #else
   NOTREACHED();
-  return gfx::VectorIconId::VECTOR_ICON_NONE;
+  static const gfx::VectorIcon dummy = {};
+  return dummy;
 #endif
 }
 
diff --git a/components/omnibox/browser/autocomplete_match.h b/components/omnibox/browser/autocomplete_match.h
index c78323e2..d237d2c 100644
--- a/components/omnibox/browser/autocomplete_match.h
+++ b/components/omnibox/browser/autocomplete_match.h
@@ -28,7 +28,7 @@
 }  // namespace base
 
 namespace gfx {
-enum class VectorIconId;
+struct VectorIcon;
 }  // namespace gfx
 
 const char kACMatchPropertyInputText[] = "input text";
@@ -109,7 +109,7 @@
   AutocompleteMatch& operator=(const AutocompleteMatch& match);
 
   // Gets the vector icon identifier for the icon to be shown for |type|.
-  static gfx::VectorIconId TypeToVectorIcon(Type type);
+  static const gfx::VectorIcon& TypeToVectorIcon(Type type);
 
   // Comparison function for determining when one match is better than another.
   static bool MoreRelevant(const AutocompleteMatch& elem1,
diff --git a/components/omnibox/browser/omnibox_view.cc b/components/omnibox/browser/omnibox_view.cc
index a09b954..8fe1c80 100644
--- a/components/omnibox/browser/omnibox_view.cc
+++ b/components/omnibox/browser/omnibox_view.cc
@@ -79,7 +79,7 @@
       (GetOmniboxTextLength() == 0);
 }
 
-gfx::VectorIconId OmniboxView::GetVectorIcon() const {
+const gfx::VectorIcon& OmniboxView::GetVectorIcon() const {
   if (!IsEditingOrEmpty())
     return controller_->GetToolbarModel()->GetVectorIcon();
 
diff --git a/components/omnibox/browser/omnibox_view.h b/components/omnibox/browser/omnibox_view.h
index 130c0d5..58529d17 100644
--- a/components/omnibox/browser/omnibox_view.h
+++ b/components/omnibox/browser/omnibox_view.h
@@ -89,8 +89,8 @@
   // the field is empty.
   bool IsEditingOrEmpty() const;
 
-  // Like GetIcon(), but returns a vector icon identifier.
-  gfx::VectorIconId GetVectorIcon() const;
+  // Returns the vector icon to display as the location icon.
+  const gfx::VectorIcon& GetVectorIcon() const;
 
   // The user text is the text the user has manually keyed in.  When present,
   // this is shown in preference to the permanent text; hitting escape will
diff --git a/components/omnibox/browser/physical_web_provider.cc b/components/omnibox/browser/physical_web_provider.cc
index 4159ee1e..15ba262 100644
--- a/components/omnibox/browser/physical_web_provider.cc
+++ b/components/omnibox/browser/physical_web_provider.cc
@@ -75,7 +75,10 @@
     return;
   }
 
-  if (input.from_omnibox_focus()) {
+  const bool input_from_focus = input.from_omnibox_focus();
+  const bool empty_input_from_user = !input_from_focus && input.text().empty();
+
+  if (input_from_focus || empty_input_from_user) {
     ConstructZeroSuggestMatches(data_source->GetMetadataList());
 
     if (!matches_.empty()) {
@@ -83,7 +86,12 @@
       had_physical_web_suggestions_at_focus_or_later_ = true;
     }
 
-    if (!zero_suggest_enabled_) {
+    // Don't show zero-suggest suggestions unless the PhysicalWebZeroSuggest
+    // omnibox experiment parameter is enabled. If the omnibox input is empty
+    // because the user cleared it, also require that PhysicalWebAfterTyping is
+    // enabled.
+    if (!zero_suggest_enabled_ ||
+        (empty_input_from_user && !after_typing_enabled_)) {
       matches_.clear();
     }
 
@@ -104,6 +112,8 @@
       had_physical_web_suggestions_at_focus_or_later_ = true;
     }
 
+    // Don't show Physical Web suggestions after the user starts typing unless
+    // the PhysicalWebAfterTyping omnibox experiment parameter is enabled.
     if (!after_typing_enabled_) {
       matches_.clear();
     }
diff --git a/components/omnibox/browser/physical_web_provider_unittest.cc b/components/omnibox/browser/physical_web_provider_unittest.cc
index c9d8a78..c7f537f 100644
--- a/components/omnibox/browser/physical_web_provider_unittest.cc
+++ b/components/omnibox/browser/physical_web_provider_unittest.cc
@@ -331,6 +331,37 @@
   EXPECT_TRUE(provider_->matches().empty());
 }
 
+TEST_F(PhysicalWebProviderTest, TestEmptyInputAfterTyping) {
+  FakePhysicalWebDataSource* data_source =
+      client_->GetFakePhysicalWebDataSource();
+  EXPECT_TRUE(data_source);
+
+  data_source->SetMetadataList(CreateMetadata(1));
+
+  // Construct an AutocompleteInput to simulate a blank input field, as if the
+  // user typed a query and then deleted it. The provider should generate
+  // suggestions for the zero-suggest case. No default match should be created.
+  const AutocompleteInput input(
+      base::string16(), 0, std::string(), GURL(),
+      metrics::OmniboxEventProto::INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS,
+      true, false, true, true, false, TestSchemeClassifier());
+  provider_->Start(input, false);
+
+  size_t metadata_match_count = 0;
+  size_t default_match_count = 0;
+  for (const auto& match : provider_->matches()) {
+    if (match.type == AutocompleteMatchType::PHYSICAL_WEB) {
+      ++metadata_match_count;
+    } else {
+      EXPECT_TRUE(match.allowed_to_be_default_match);
+      ++default_match_count;
+    }
+  }
+  EXPECT_EQ(1U, provider_->matches().size());
+  EXPECT_EQ(1U, metadata_match_count);
+  EXPECT_EQ(0U, default_match_count);
+}
+
 TEST_F(PhysicalWebProviderTest, TestManyMetadataItemsCreatesOverflowItem) {
   // Create enough metadata to guarantee an overflow item will be created.
   const size_t metadata_count = AutocompleteProvider::kMaxMatches + 1;
diff --git a/ui/gfx/vector_icons/omnibox_calculator.1x.icon b/components/omnibox/browser/vector_icons/calculator.1x.icon
similarity index 100%
rename from ui/gfx/vector_icons/omnibox_calculator.1x.icon
rename to components/omnibox/browser/vector_icons/calculator.1x.icon
diff --git a/ui/gfx/vector_icons/omnibox_calculator.icon b/components/omnibox/browser/vector_icons/calculator.icon
similarity index 100%
rename from ui/gfx/vector_icons/omnibox_calculator.icon
rename to components/omnibox/browser/vector_icons/calculator.icon
diff --git a/ui/gfx/vector_icons/omnibox_extension_app.1x.icon b/components/omnibox/browser/vector_icons/extension_app.1x.icon
similarity index 100%
rename from ui/gfx/vector_icons/omnibox_extension_app.1x.icon
rename to components/omnibox/browser/vector_icons/extension_app.1x.icon
diff --git a/ui/gfx/vector_icons/omnibox_extension_app.icon b/components/omnibox/browser/vector_icons/extension_app.icon
similarity index 100%
rename from ui/gfx/vector_icons/omnibox_extension_app.icon
rename to components/omnibox/browser/vector_icons/extension_app.icon
diff --git a/ui/gfx/vector_icons/omnibox_http.icon b/components/omnibox/browser/vector_icons/http.icon
similarity index 100%
rename from ui/gfx/vector_icons/omnibox_http.icon
rename to components/omnibox/browser/vector_icons/http.icon
diff --git a/ui/gfx/vector_icons/omnibox_keyword_search.icon b/components/omnibox/browser/vector_icons/keyword_search.icon
similarity index 100%
rename from ui/gfx/vector_icons/omnibox_keyword_search.icon
rename to components/omnibox/browser/vector_icons/keyword_search.icon
diff --git a/components/omnibox/browser/vector_icons/search.icon b/components/omnibox/browser/vector_icons/search.icon
new file mode 100644
index 0000000..c1e5f08
--- /dev/null
+++ b/components/omnibox/browser/vector_icons/search.icon
@@ -0,0 +1,27 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+CANVAS_DIMENSIONS, 32,
+MOVE_TO, 20.29f, 19.45f,
+LINE_TO, 19.93f, 19.09f,
+CUBIC_TO, 21.23f, 17.59f, 22.13f, 15.52f, 22.13f, 12.96f,
+CUBIC_TO, 22.13f, 8.23f, 17.85f, 4, 13.07f, 4,
+CUBIC_TO, 8.28f, 4, 4, 8.23f, 4, 12.96f,
+CUBIC_TO, 4, 17.69f, 9.18f, 21.92f, 13.26f, 21.92f,
+CUBIC_TO, 15.66f, 21.92f, 17.51f, 21.26f, 18.98f, 20.02f,
+LINE_TO, 19.35f, 20.38f,
+LINE_TO, 19.35f, 21.42f,
+LINE_TO, 26.01f, 28,
+LINE_TO, 28, 26.04f,
+LINE_TO, 21.35f, 19.45f,
+LINE_TO, 20.29f, 19.45f,
+CLOSE,
+MOVE_TO, 13.07f, 19.36f,
+CUBIC_TO, 9.49f, 19.36f, 6.59f, 16.5f, 6.59f, 12.96f,
+CUBIC_TO, 6.59f, 9.43f, 9.49f, 6.56f, 13.07f, 6.56f,
+CUBIC_TO, 16.64f, 6.56f, 19.54f, 9.43f, 19.54f, 12.96f,
+CUBIC_TO, 19.54f, 16.5f, 16.64f, 19.36f, 13.07f, 19.36f,
+LINE_TO, 13.07f, 19.36f,
+CLOSE,
+END
diff --git a/ui/gfx/vector_icons/omnibox_star.1x.icon b/components/omnibox/browser/vector_icons/star.1x.icon
similarity index 100%
rename from ui/gfx/vector_icons/omnibox_star.1x.icon
rename to components/omnibox/browser/vector_icons/star.1x.icon
diff --git a/ui/gfx/vector_icons/omnibox_star.icon b/components/omnibox/browser/vector_icons/star.icon
similarity index 100%
rename from ui/gfx/vector_icons/omnibox_star.icon
rename to components/omnibox/browser/vector_icons/star.icon
diff --git a/components/omnibox/browser/vector_icons/vector_icons.cc.template b/components/omnibox/browser/vector_icons/vector_icons.cc.template
new file mode 100644
index 0000000..d7b6f83
--- /dev/null
+++ b/components/omnibox/browser/vector_icons/vector_icons.cc.template
@@ -0,0 +1,25 @@
+// 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.
+
+// vector_icons.cc.template is used to generate vector_icons.cc. Edit the former
+// rather than the latter.
+
+#include "components/omnibox/browser/vector_icons.h"
+
+#include "base/logging.h"
+#include "ui/gfx/vector_icon_types.h"
+
+#define PATH_ELEMENT_TEMPLATE(path_name, ...) \
+static constexpr gfx::PathElement path_name[] = {__VA_ARGS__};
+
+#define VECTOR_ICON_TEMPLATE(icon_name, path_name, path_name_1x) \
+const gfx::VectorIcon icon_name = { path_name , path_name_1x };
+
+namespace omnibox {
+
+using namespace gfx;
+
+TEMPLATE_PLACEHOLDER
+
+}
diff --git a/components/omnibox/browser/vector_icons/vector_icons.h.template b/components/omnibox/browser/vector_icons/vector_icons.h.template
new file mode 100644
index 0000000..24775ff
--- /dev/null
+++ b/components/omnibox/browser/vector_icons/vector_icons.h.template
@@ -0,0 +1,26 @@
+// 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.
+
+// vector_icons.h.template is used to generate vector_icons.h. Edit the former
+// rather than the latter.
+
+#ifndef COMPONENTS_OMNIBOX_BROWSER_VECTOR_ICONS_H_
+#define COMPONENTS_OMNIBOX_BROWSER_VECTOR_ICONS_H_
+
+namespace gfx {
+struct VectorIcon;
+}
+
+#define VECTOR_ICON_TEMPLATE_H(icon_name) \
+extern const gfx::VectorIcon icon_name;
+
+namespace omnibox {
+
+TEMPLATE_PLACEHOLDER
+
+}
+
+#undef VECTOR_ICON_TEMPLATE_H
+
+#endif  // COMPONENTS_OMNIBOX_BROWSER_VECTOR_ICONS_H_
diff --git a/components/plugins/renderer/loadable_plugin_placeholder.cc b/components/plugins/renderer/loadable_plugin_placeholder.cc
index 3496764e..8bffae8 100644
--- a/components/plugins/renderer/loadable_plugin_placeholder.cc
+++ b/components/plugins/renderer/loadable_plugin_placeholder.cc
@@ -146,7 +146,7 @@
   std::string script =
       "window.setMessage(" + base::GetQuotedJSONString(message_) + ")";
   plugin()->web_view()->mainFrame()->executeScript(
-      blink::WebScriptSource(base::UTF8ToUTF16(script)));
+      blink::WebScriptSource(blink::WebString::fromUTF8(script)));
 }
 
 void LoadablePluginPlaceholder::PluginDestroyed() {
@@ -246,7 +246,7 @@
         "window.resizePoster('%dpx', '%dpx', '%dpx', '%dpx')", x, y, width,
         height);
     plugin()->web_view()->mainFrame()->executeScript(
-        blink::WebScriptSource(base::UTF8ToUTF16(script)));
+        blink::WebScriptSource(blink::WebString::fromUTF8(script)));
   }
 }
 
diff --git a/components/policy/resources/policy_templates.json b/components/policy/resources/policy_templates.json
index 076f6aa..f6bcad3 100644
--- a/components/policy/resources/policy_templates.json
+++ b/components/policy/resources/policy_templates.json
@@ -8881,7 +8881,7 @@
       'name': 'NetworkThrottlingEnabled',
       'device_only': True,
       'caption': '''Enables throttling network bandwidth''',
-      'desc': '''Allows choosing whether network throttling is enabled or not.
+      'desc': '''Allows enabling or disabling network throttling.
       This applies to all users, and to all interfaces on the device. Once set,
       the throttling persists until the policy is changed to disable it.
 
diff --git a/components/toolbar/BUILD.gn b/components/toolbar/BUILD.gn
index 94dc16b..ec98fd4 100644
--- a/components/toolbar/BUILD.gn
+++ b/components/toolbar/BUILD.gn
@@ -4,6 +4,52 @@
 
 import("//build/config/ui.gni")
 
+action("aggregate_vector_icons") {
+  visibility = [ ":*" ]
+
+  script = "//ui/gfx/vector_icons/aggregate_vector_icons.py"
+
+  icons = [
+    # TODO(estade): this is the same as ui/gfx/vector_icons/business.icon. Use
+    # that one instead once it's been updated from VectorIconId to VectorIcon.
+    "vector_icons/business.icon",
+    "vector_icons/http.1x.icon",
+    "vector_icons/http.icon",
+    "vector_icons/https_invalid.1x.icon",
+    "vector_icons/https_invalid.icon",
+    "vector_icons/https_valid.1x.icon",
+    "vector_icons/https_valid.icon",
+    "vector_icons/https_valid_in_chip.1x.icon",
+    "vector_icons/https_valid_in_chip.icon",
+    "vector_icons/product.1x.icon",
+    "vector_icons/product.icon",
+    "vector_icons/star_active.icon",
+    "vector_icons/star.icon",
+  ]
+
+  output_cc = "$target_gen_dir/vector_icons.cc"
+  output_h = "$target_gen_dir/vector_icons.h"
+
+  inputs = icons
+  inputs += [
+    "vector_icons/vector_icons.cc.template",
+    "vector_icons/vector_icons.h.template",
+  ]
+  outputs = [
+    output_cc,
+    output_h,
+  ]
+
+  response_file_contents = rebase_path(icons, root_build_dir)
+
+  args = [
+    "--working_directory=" + rebase_path("./vector_icons"),
+    "--file_list={{response_file_name}}",
+    "--output_cc=" + rebase_path(output_cc, root_build_dir),
+    "--output_h=" + rebase_path(output_h, root_build_dir),
+  ]
+}
+
 static_library("toolbar") {
   sources = [
     "toolbar_model.h",
@@ -25,6 +71,11 @@
     "//ui/gfx",
     "//url",
   ]
+
+  if (!is_android && !is_ios) {
+    sources += get_target_outputs(":aggregate_vector_icons")
+    deps += [ ":aggregate_vector_icons" ]
+  }
 }
 
 static_library("test_support") {
diff --git a/components/toolbar/test_toolbar_model.cc b/components/toolbar/test_toolbar_model.cc
index eaadf8c..cebc76cc 100644
--- a/components/toolbar/test_toolbar_model.cc
+++ b/components/toolbar/test_toolbar_model.cc
@@ -4,14 +4,14 @@
 
 #include "components/toolbar/test_toolbar_model.h"
 
-#include "ui/gfx/vector_icons_public.h"
+#if defined(TOOLKIT_VIEWS)
+#include "components/toolbar/vector_icons.h"  // nogncheck
+#endif
 
 TestToolbarModel::TestToolbarModel()
     : security_level_(security_state::NONE),
 #if defined(TOOLKIT_VIEWS)
-      icon_(gfx::VectorIconId::LOCATION_BAR_HTTP),
-#else
-      icon_(gfx::VectorIconId::VECTOR_ICON_NONE),
+      icon_(&toolbar::kHttpIcon),
 #endif
       should_display_url_(true) {
 }
@@ -31,8 +31,8 @@
   return security_level_;
 }
 
-gfx::VectorIconId TestToolbarModel::GetVectorIcon() const {
-  return icon_;
+const gfx::VectorIcon& TestToolbarModel::GetVectorIcon() const {
+  return *icon_;
 }
 
 base::string16 TestToolbarModel::GetSecureVerboseText() const {
diff --git a/components/toolbar/test_toolbar_model.h b/components/toolbar/test_toolbar_model.h
index 255ac00f..01daf60 100644
--- a/components/toolbar/test_toolbar_model.h
+++ b/components/toolbar/test_toolbar_model.h
@@ -13,7 +13,7 @@
 #include "components/toolbar/toolbar_model.h"
 
 namespace gfx {
-enum class VectorIconId;
+struct VectorIcon;
 }
 
 // A ToolbarModel that is backed by instance variables, which are initialized
@@ -27,7 +27,7 @@
   GURL GetURL() const override;
   security_state::SecurityLevel GetSecurityLevel(
       bool ignore_editing) const override;
-  gfx::VectorIconId GetVectorIcon() const override;
+  const gfx::VectorIcon& GetVectorIcon() const override;
   base::string16 GetSecureVerboseText() const override;
   base::string16 GetEVCertName() const override;
   bool ShouldDisplayURL() const override;
@@ -37,7 +37,7 @@
   void set_security_level(security_state::SecurityLevel security_level) {
     security_level_ = security_level;
   }
-  void set_icon(gfx::VectorIconId icon) { icon_ = icon; }
+  void set_icon(const gfx::VectorIcon& icon) { icon_ = &icon; }
   void set_ev_cert_name(const base::string16& ev_cert_name) {
     ev_cert_name_ = ev_cert_name;
   }
@@ -49,7 +49,7 @@
   base::string16 text_;
   GURL url_;
   security_state::SecurityLevel security_level_;
-  gfx::VectorIconId icon_;
+  const gfx::VectorIcon* icon_ = nullptr;
   base::string16 ev_cert_name_;
   bool should_display_url_;
 
diff --git a/components/toolbar/toolbar_model.h b/components/toolbar/toolbar_model.h
index c8df6c63..8aa1727d 100644
--- a/components/toolbar/toolbar_model.h
+++ b/components/toolbar/toolbar_model.h
@@ -15,7 +15,7 @@
 #include "url/gurl.h"
 
 namespace gfx {
-enum class VectorIconId;
+struct VectorIcon;
 }
 
 // This class is the model used by the toolbar, location bar and autocomplete
@@ -47,7 +47,7 @@
   // current URL.  When search term replacement is active, this returns a search
   // icon.  This doesn't cover specialized icons while the user is editing; see
   // OmniboxView::GetVectorIcon().
-  virtual gfx::VectorIconId GetVectorIcon() const = 0;
+  virtual const gfx::VectorIcon& GetVectorIcon() const = 0;
 
   // Returns text for the omnibox secure verbose chip.
   virtual base::string16 GetSecureVerboseText() const = 0;
diff --git a/components/toolbar/toolbar_model_delegate.h b/components/toolbar/toolbar_model_delegate.h
index cf88095a..8c61c45 100644
--- a/components/toolbar/toolbar_model_delegate.h
+++ b/components/toolbar/toolbar_model_delegate.h
@@ -14,7 +14,7 @@
 class GURL;
 
 namespace gfx {
-enum class VectorIconId;
+struct VectorIcon;
 }
 
 namespace net {
@@ -54,7 +54,7 @@
   // gfx::VectorIconId::VECTOR_ICON_NONE if the icon should be selected by the
   // caller. This is useful for associating particular URLs with particular
   // schemes without importing knowledge of those schemes into this component.
-  virtual gfx::VectorIconId GetVectorIconOverride() const = 0;
+  virtual const gfx::VectorIcon* GetVectorIconOverride() const = 0;
 
  protected:
   virtual ~ToolbarModelDelegate() {}
diff --git a/components/toolbar/toolbar_model_impl.cc b/components/toolbar/toolbar_model_impl.cc
index e18b120..d2041ee 100644
--- a/components/toolbar/toolbar_model_impl.cc
+++ b/components/toolbar/toolbar_model_impl.cc
@@ -19,7 +19,11 @@
 #include "net/ssl/ssl_connection_status_flags.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/gfx/text_elider.h"
-#include "ui/gfx/vector_icons_public.h"
+#include "ui/gfx/vector_icon_types.h"
+
+#if !defined(OS_ANDROID) && !defined(OS_IOS)
+#include "components/toolbar/vector_icons.h"  // nogncheck
+#endif
 
 ToolbarModelImpl::ToolbarModelImpl(ToolbarModelDelegate* delegate,
                                    size_t max_url_display_chars)
@@ -67,30 +71,34 @@
              : delegate_->GetSecurityLevel();
 }
 
-gfx::VectorIconId ToolbarModelImpl::GetVectorIcon() const {
+const gfx::VectorIcon& ToolbarModelImpl::GetVectorIcon() const {
 #if !defined(OS_ANDROID) && !defined(OS_IOS)
   const auto icon_override = delegate_->GetVectorIconOverride();
-  if (icon_override != gfx::VectorIconId::VECTOR_ICON_NONE)
-    return icon_override;
+  if (icon_override)
+    return *icon_override;
 
   switch (GetSecurityLevel(false)) {
     case security_state::NONE:
     case security_state::HTTP_SHOW_WARNING:
-      return gfx::VectorIconId::LOCATION_BAR_HTTP;
+      return toolbar::kHttpIcon;
     case security_state::EV_SECURE:
     case security_state::SECURE:
-      return gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID;
+      return toolbar::kHttpsValidIcon;
     case security_state::SECURITY_WARNING:
       // Surface Dubious as Neutral.
-      return gfx::VectorIconId::LOCATION_BAR_HTTP;
+      return toolbar::kHttpIcon;
     case security_state::SECURE_WITH_POLICY_INSTALLED_CERT:
-      return gfx::VectorIconId::BUSINESS;
+      return toolbar::kBusinessIcon;
     case security_state::DANGEROUS:
-      return gfx::VectorIconId::LOCATION_BAR_HTTPS_INVALID;
+      return toolbar::kHttpsInvalidIcon;
   }
-#endif
   NOTREACHED();
-  return gfx::VectorIconId::VECTOR_ICON_NONE;
+  return toolbar::kHttpIcon;
+#else
+  NOTREACHED();
+  static const gfx::VectorIcon dummy = {};
+  return dummy;
+#endif
 }
 
 base::string16 ToolbarModelImpl::GetEVCertName() const {
diff --git a/components/toolbar/toolbar_model_impl.h b/components/toolbar/toolbar_model_impl.h
index 3c4bcf7..619d3e56 100644
--- a/components/toolbar/toolbar_model_impl.h
+++ b/components/toolbar/toolbar_model_impl.h
@@ -32,7 +32,7 @@
   GURL GetURL() const override;
   security_state::SecurityLevel GetSecurityLevel(
       bool ignore_editing) const override;
-  gfx::VectorIconId GetVectorIcon() const override;
+  const gfx::VectorIcon& GetVectorIcon() const override;
   base::string16 GetSecureVerboseText() const override;
   base::string16 GetEVCertName() const override;
   bool ShouldDisplayURL() const override;
diff --git a/components/toolbar/vector_icons/business.icon b/components/toolbar/vector_icons/business.icon
new file mode 100644
index 0000000..bfefb7b4
--- /dev/null
+++ b/components/toolbar/vector_icons/business.icon
@@ -0,0 +1,87 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+MOVE_TO, 24, 14,
+V_LINE_TO, 6,
+H_LINE_TO, 4,
+R_V_LINE_TO, 36,
+R_H_LINE_TO, 40,
+V_LINE_TO, 14,
+H_LINE_TO, 24,
+CLOSE,
+MOVE_TO, 12, 38,
+H_LINE_TO, 8,
+R_V_LINE_TO, -4,
+R_H_LINE_TO, 4,
+R_V_LINE_TO, 4,
+CLOSE,
+R_MOVE_TO, 0, -8,
+H_LINE_TO, 8,
+R_V_LINE_TO, -4,
+R_H_LINE_TO, 4,
+R_V_LINE_TO, 4,
+CLOSE,
+R_MOVE_TO, 0, -8,
+H_LINE_TO, 8,
+R_V_LINE_TO, -4,
+R_H_LINE_TO, 4,
+R_V_LINE_TO, 4,
+CLOSE,
+R_MOVE_TO, 0, -8,
+H_LINE_TO, 8,
+R_V_LINE_TO, -4,
+R_H_LINE_TO, 4,
+R_V_LINE_TO, 4,
+CLOSE,
+R_MOVE_TO, 8, 24,
+R_H_LINE_TO, -4,
+R_V_LINE_TO, -4,
+R_H_LINE_TO, 4,
+R_V_LINE_TO, 4,
+CLOSE,
+R_MOVE_TO, 0, -8,
+R_H_LINE_TO, -4,
+R_V_LINE_TO, -4,
+R_H_LINE_TO, 4,
+R_V_LINE_TO, 4,
+CLOSE,
+R_MOVE_TO, 0, -8,
+R_H_LINE_TO, -4,
+R_V_LINE_TO, -4,
+R_H_LINE_TO, 4,
+R_V_LINE_TO, 4,
+CLOSE,
+R_MOVE_TO, 0, -8,
+R_H_LINE_TO, -4,
+R_V_LINE_TO, -4,
+R_H_LINE_TO, 4,
+R_V_LINE_TO, 4,
+CLOSE,
+R_MOVE_TO, 20, 24,
+H_LINE_TO, 24,
+R_V_LINE_TO, -4,
+R_H_LINE_TO, 4,
+R_V_LINE_TO, -4,
+R_H_LINE_TO, -4,
+R_V_LINE_TO, -4,
+R_H_LINE_TO, 4,
+R_V_LINE_TO, -4,
+R_H_LINE_TO, -4,
+R_V_LINE_TO, -4,
+R_H_LINE_TO, 16,
+R_V_LINE_TO, 20,
+CLOSE,
+R_MOVE_TO, -4, -16,
+R_H_LINE_TO, -4,
+R_V_LINE_TO, 4,
+R_H_LINE_TO, 4,
+R_V_LINE_TO, -4,
+CLOSE,
+R_MOVE_TO, 0, 8,
+R_H_LINE_TO, -4,
+R_V_LINE_TO, 4,
+R_H_LINE_TO, 4,
+R_V_LINE_TO, -4,
+CLOSE,
+END
diff --git a/ui/gfx/vector_icons/location_bar_http.1x.icon b/components/toolbar/vector_icons/http.1x.icon
similarity index 100%
rename from ui/gfx/vector_icons/location_bar_http.1x.icon
rename to components/toolbar/vector_icons/http.1x.icon
diff --git a/ui/gfx/vector_icons/location_bar_http.icon b/components/toolbar/vector_icons/http.icon
similarity index 100%
rename from ui/gfx/vector_icons/location_bar_http.icon
rename to components/toolbar/vector_icons/http.icon
diff --git a/ui/gfx/vector_icons/location_bar_https_invalid.1x.icon b/components/toolbar/vector_icons/https_invalid.1x.icon
similarity index 100%
rename from ui/gfx/vector_icons/location_bar_https_invalid.1x.icon
rename to components/toolbar/vector_icons/https_invalid.1x.icon
diff --git a/ui/gfx/vector_icons/location_bar_https_invalid.icon b/components/toolbar/vector_icons/https_invalid.icon
similarity index 100%
rename from ui/gfx/vector_icons/location_bar_https_invalid.icon
rename to components/toolbar/vector_icons/https_invalid.icon
diff --git a/ui/gfx/vector_icons/location_bar_https_valid.1x.icon b/components/toolbar/vector_icons/https_valid.1x.icon
similarity index 100%
rename from ui/gfx/vector_icons/location_bar_https_valid.1x.icon
rename to components/toolbar/vector_icons/https_valid.1x.icon
diff --git a/ui/gfx/vector_icons/location_bar_https_valid.icon b/components/toolbar/vector_icons/https_valid.icon
similarity index 100%
rename from ui/gfx/vector_icons/location_bar_https_valid.icon
rename to components/toolbar/vector_icons/https_valid.icon
diff --git a/ui/gfx/vector_icons/location_bar_https_valid_in_chip.1x.icon b/components/toolbar/vector_icons/https_valid_in_chip.1x.icon
similarity index 100%
rename from ui/gfx/vector_icons/location_bar_https_valid_in_chip.1x.icon
rename to components/toolbar/vector_icons/https_valid_in_chip.1x.icon
diff --git a/ui/gfx/vector_icons/location_bar_https_valid_in_chip.icon b/components/toolbar/vector_icons/https_valid_in_chip.icon
similarity index 100%
rename from ui/gfx/vector_icons/location_bar_https_valid_in_chip.icon
rename to components/toolbar/vector_icons/https_valid_in_chip.icon
diff --git a/ui/gfx/vector_icons/location_bar_product.1x.icon b/components/toolbar/vector_icons/product.1x.icon
similarity index 100%
rename from ui/gfx/vector_icons/location_bar_product.1x.icon
rename to components/toolbar/vector_icons/product.1x.icon
diff --git a/ui/gfx/vector_icons/location_bar_product.icon b/components/toolbar/vector_icons/product.icon
similarity index 100%
rename from ui/gfx/vector_icons/location_bar_product.icon
rename to components/toolbar/vector_icons/product.icon
diff --git a/ui/gfx/vector_icons/location_bar_star.icon b/components/toolbar/vector_icons/star.icon
similarity index 100%
rename from ui/gfx/vector_icons/location_bar_star.icon
rename to components/toolbar/vector_icons/star.icon
diff --git a/ui/gfx/vector_icons/location_bar_star_active.icon b/components/toolbar/vector_icons/star_active.icon
similarity index 100%
rename from ui/gfx/vector_icons/location_bar_star_active.icon
rename to components/toolbar/vector_icons/star_active.icon
diff --git a/components/toolbar/vector_icons/vector_icons.cc.template b/components/toolbar/vector_icons/vector_icons.cc.template
new file mode 100644
index 0000000..6120c7c
--- /dev/null
+++ b/components/toolbar/vector_icons/vector_icons.cc.template
@@ -0,0 +1,25 @@
+// 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.
+
+// vector_icons.cc.template is used to generate vector_icons.cc. Edit the former
+// rather than the latter.
+
+#include "components/toolbar/vector_icons.h"
+
+#include "base/logging.h"
+#include "ui/gfx/vector_icon_types.h"
+
+#define PATH_ELEMENT_TEMPLATE(path_name, ...) \
+static constexpr gfx::PathElement path_name[] = {__VA_ARGS__};
+
+#define VECTOR_ICON_TEMPLATE(icon_name, path_name, path_name_1x) \
+const gfx::VectorIcon icon_name = { path_name , path_name_1x };
+
+namespace toolbar {
+
+using namespace gfx;
+
+TEMPLATE_PLACEHOLDER
+
+}
diff --git a/components/toolbar/vector_icons/vector_icons.h.template b/components/toolbar/vector_icons/vector_icons.h.template
new file mode 100644
index 0000000..024a309
--- /dev/null
+++ b/components/toolbar/vector_icons/vector_icons.h.template
@@ -0,0 +1,26 @@
+// 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.
+
+// vector_icons.h.template is used to generate vector_icons.h. Edit the former
+// rather than the latter.
+
+#ifndef COMPONENTS_TOOLBAR_VECTOR_ICONS_H_
+#define COMPONENTS_TOOLBAR_VECTOR_ICONS_H_
+
+namespace gfx {
+struct VectorIcon;
+}
+
+#define VECTOR_ICON_TEMPLATE_H(icon_name) \
+extern const gfx::VectorIcon icon_name;
+
+namespace toolbar {
+
+TEMPLATE_PLACEHOLDER
+
+}
+
+#undef VECTOR_ICON_TEMPLATE_H
+
+#endif  // COMPONENTS_TOOLBAR_VECTOR_ICONS_H_
diff --git a/components/translate/core/browser/translate_manager.cc b/components/translate/core/browser/translate_manager.cc
index 33d3c51..1c9183a 100644
--- a/components/translate/core/browser/translate_manager.cc
+++ b/components/translate/core/browser/translate_manager.cc
@@ -4,6 +4,7 @@
 
 #include "components/translate/core/browser/translate_manager.h"
 
+#include <iostream>
 #include <map>
 
 #include "base/bind.h"
@@ -224,12 +225,14 @@
   InitTranslateEvent(language_code, target_lang, *translate_prefs);
 
   // Don't translate similar languages (ex: en-US to en).
-  if (language_code == target_lang) {
+  // Also do not offer to translate between Simplified and Traditional Chinese.
+  if (language_code == target_lang ||
+      (language_code == "zh-CN" && target_lang == "zh-TW") ||
+      (language_code == "zh-TW" && target_lang == "zh-CN")) {
     TranslateBrowserMetrics::ReportInitiationStatus(
         TranslateBrowserMetrics::INITIATION_STATUS_SIMILAR_LANGUAGES);
     return;
   }
-
   // Nothing to do if either the language Chrome is in or the language of the
   // page is not supported by the translation server.
   if (target_lang.empty() ||
diff --git a/components/translate/core/browser/translate_manager_unittest.cc b/components/translate/core/browser/translate_manager_unittest.cc
index fda38d7..dfe0696 100644
--- a/components/translate/core/browser/translate_manager_unittest.cc
+++ b/components/translate/core/browser/translate_manager_unittest.cc
@@ -307,6 +307,64 @@
       1);
 }
 
+// The test measures that Translate is not triggered for a zh-TW page for a
+// zh-CN user.
+TEST_F(TranslateManagerTest,
+       DontTranslateZhTraditionalPageForZhSimplifiedLocale) {
+  TranslateManager::SetIgnoreMissingKeyForTesting(true);
+  translate_manager_.reset(new translate::TranslateManager(
+      &mock_translate_client_, kAcceptLanguages));
+
+  const char kMetricName[] = "Translate.InitiationStatus.v2";
+  base::HistogramTester histogram_tester;
+
+  const std::string locale = "zh-TW";
+  const std::string page_lang = "zh-CN";
+
+  network_notifier_.SimulateOnline();
+  manager_->set_application_locale(locale);
+  ON_CALL(mock_translate_client_, IsTranslatableURL(_))
+      .WillByDefault(Return(true));
+
+  EXPECT_EQ("zh-TW", translate_manager_->GetTargetLanguage(&translate_prefs_));
+  translate_manager_->GetLanguageState().LanguageDetermined(page_lang, true);
+  translate_manager_->InitiateTranslation(page_lang);
+
+  histogram_tester.ExpectUniqueSample(
+      kMetricName,
+      translate::TranslateBrowserMetrics::INITIATION_STATUS_SIMILAR_LANGUAGES,
+      1);
+}
+
+// The test measures that Translate is not triggered for a zh-CN page for a
+// zh-TW user.
+TEST_F(TranslateManagerTest,
+       DontTranslateZhSimplifiedPageForZhTraditionalLocale) {
+  TranslateManager::SetIgnoreMissingKeyForTesting(true);
+  translate_manager_.reset(new translate::TranslateManager(
+      &mock_translate_client_, kAcceptLanguages));
+
+  const char kMetricName[] = "Translate.InitiationStatus.v2";
+  base::HistogramTester histogram_tester;
+
+  const std::string locale = "zh-CN";
+  const std::string page_lang = "zh-TW";
+
+  network_notifier_.SimulateOnline();
+  manager_->set_application_locale(locale);
+  ON_CALL(mock_translate_client_, IsTranslatableURL(_))
+      .WillByDefault(Return(true));
+
+  EXPECT_EQ("zh-CN", translate_manager_->GetTargetLanguage(&translate_prefs_));
+  translate_manager_->GetLanguageState().LanguageDetermined(page_lang, true);
+  translate_manager_->InitiateTranslation(page_lang);
+
+  histogram_tester.ExpectUniqueSample(
+      kMetricName,
+      translate::TranslateBrowserMetrics::INITIATION_STATUS_SIMILAR_LANGUAGES,
+      1);
+}
+
 // Utility function to set the threshold params
 void ChangeThresholdInParams(
     const char* initiate_translation_confidence_threshold,
diff --git a/content/browser/background_sync/OWNERS b/content/browser/background_sync/OWNERS
index c60b9f9..a97cadfa 100644
--- a/content/browser/background_sync/OWNERS
+++ b/content/browser/background_sync/OWNERS
@@ -1,2 +1,4 @@
 iclelland@chromium.org
 jkarlin@chromium.org
+
+# COMPONENT: Blink>BackgroundSync
diff --git a/content/browser/media/capture/OWNERS b/content/browser/media/capture/OWNERS
index 767e3a5..06e592c 100644
--- a/content/browser/media/capture/OWNERS
+++ b/content/browser/media/capture/OWNERS
@@ -3,3 +3,6 @@
 wez@chromium.org
 
 per-file image_capture*=mcasas@chromium.org
+
+# TEAM: media-capture-and-streams@grotations.appspotmail.com
+# COMPONENT: Blink>GetUserMedia
diff --git a/content/browser/renderer_host/media/OWNERS b/content/browser/renderer_host/media/OWNERS
index e5828b0..59a8fc5 100644
--- a/content/browser/renderer_host/media/OWNERS
+++ b/content/browser/renderer_host/media/OWNERS
@@ -7,3 +7,6 @@
 
 per-file video_*=mcasas@chromium.org
 per-file video_*=chfremer@chromium.org
+
+# TEAM: media-capture-and-streams@grotations.appspotmail.com
+# COMPONENT: Blink>GetUserMedia
diff --git a/content/browser/webrtc/OWNERS b/content/browser/webrtc/OWNERS
index a825444..95f92e8 100644
--- a/content/browser/webrtc/OWNERS
+++ b/content/browser/webrtc/OWNERS
@@ -4,3 +4,5 @@
 tommi@chromium.org
 
 per-file *test*=phoglund@chromium.org
+
+# COMPONENT: Blink>WebRTC
diff --git a/content/child/background_sync/OWNERS b/content/child/background_sync/OWNERS
index d70a98b..01f2d32 100644
--- a/content/child/background_sync/OWNERS
+++ b/content/child/background_sync/OWNERS
@@ -3,3 +3,5 @@
 
 per-file *_type_converter*.*=set noparent
 per-file *_type_converter*.*=file://ipc/SECURITY_OWNERS
+
+# COMPONENT: Blink>BackgroundSync
diff --git a/content/renderer/clipboard_utils.cc b/content/renderer/clipboard_utils.cc
index 37583e4..a3a69a04 100644
--- a/content/renderer/clipboard_utils.cc
+++ b/content/renderer/clipboard_utils.cc
@@ -17,8 +17,7 @@
   markup.append(url.string().utf8());
   markup.append("\">");
   // TODO(darin): HTML escape this
-  markup.append(
-      net::EscapeForHTML(base::UTF16ToUTF8(base::StringPiece16(title))));
+  markup.append(net::EscapeForHTML(title.utf8()));
   markup.append("</a>");
   return markup;
 }
@@ -30,8 +29,7 @@
   markup.append("\"");
   if (!title.isEmpty()) {
     markup.append(" alt=\"");
-    markup.append(
-        net::EscapeForHTML(base::UTF16ToUTF8(base::StringPiece16(title))));
+    markup.append(net::EscapeForHTML(title.utf8()));
     markup.append("\"");
   }
   markup.append("/>");
diff --git a/content/renderer/drop_data_builder.cc b/content/renderer/drop_data_builder.cc
index 3dc64de..65a5dc5f 100644
--- a/content/renderer/drop_data_builder.cc
+++ b/content/renderer/drop_data_builder.cc
@@ -16,6 +16,7 @@
 #include "ui/base/clipboard/clipboard.h"
 
 using blink::WebDragData;
+using blink::WebString;
 using blink::WebVector;
 
 namespace content {
@@ -31,33 +32,33 @@
     const WebDragData::Item& item = item_list[i];
     switch (item.storageType) {
       case WebDragData::Item::StorageTypeString: {
-        base::string16 str_type(item.stringType);
+        base::string16 str_type(item.stringType.utf16());
         if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeText)) {
-          result.text = base::NullableString16(item.stringData, false);
+          result.text = WebString::toNullableString16(item.stringData);
           break;
         }
         if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeURIList)) {
           result.url = blink::WebStringToGURL(item.stringData);
-          result.url_title = item.title;
+          result.url_title = item.title.utf16();
           break;
         }
         if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeDownloadURL)) {
-          result.download_metadata = item.stringData;
+          result.download_metadata = item.stringData.utf16();
           break;
         }
         if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeHTML)) {
-          result.html = base::NullableString16(item.stringData, false);
+          result.html = WebString::toNullableString16(item.stringData);
           result.html_base_url = item.baseURL;
           break;
         }
         result.custom_data.insert(
-            std::make_pair(item.stringType, item.stringData));
+            std::make_pair(item.stringType.utf16(), item.stringData.utf16()));
         break;
       }
       case WebDragData::Item::StorageTypeBinaryData:
         result.file_contents.assign(item.binaryData.data(),
                                     item.binaryData.size());
-        result.file_description_filename = item.title;
+        result.file_description_filename = item.title.utf16();
         break;
       case WebDragData::Item::StorageTypeFilename:
         // TODO(varunjain): This only works on chromeos. Support win/mac/gtk.
diff --git a/content/renderer/media/OWNERS b/content/renderer/media/OWNERS
index 00547324..be5b86a3 100644
--- a/content/renderer/media/OWNERS
+++ b/content/renderer/media/OWNERS
@@ -10,3 +10,5 @@
 
 per-file *midi*=toyoshim@chromium.org
 per-file media_stream_audio_processor*=aluebs@chromium.org
+
+# COMPONENT: Internals>Media
diff --git a/content/renderer/webclipboard_impl.cc b/content/renderer/webclipboard_impl.cc
index 113313e57..60d7bc1 100644
--- a/content/renderer/webclipboard_impl.cc
+++ b/content/renderer/webclipboard_impl.cc
@@ -80,7 +80,11 @@
   if (ConvertBufferType(buffer, &clipboard_type)) {
     delegate_->ReadAvailableTypes(clipboard_type, &types, contains_filenames);
   }
-  return types;
+  WebVector<WebString> web_types(types.size());
+  std::transform(
+      types.begin(), types.end(), web_types.begin(),
+      [](const base::string16& s) { return WebString::fromUTF16(s); });
+  return web_types;
 }
 
 WebString WebClipboardImpl::readPlainText(Buffer buffer) {
@@ -90,7 +94,7 @@
 
   base::string16 text;
   delegate_->ReadText(clipboard_type, &text);
-  return text;
+  return WebString::fromUTF16(text);
 }
 
 WebString WebClipboardImpl::readHTML(Buffer buffer, WebURL* source_url,
@@ -106,7 +110,7 @@
                       static_cast<uint32_t*>(fragment_start),
                       static_cast<uint32_t*>(fragment_end));
   *source_url = gurl;
-  return html_stdstr;
+  return WebString::fromUTF16(html_stdstr);
 }
 
 WebString WebClipboardImpl::readRTF(Buffer buffer) {
@@ -141,20 +145,21 @@
     return WebString();
 
   base::string16 data;
-  delegate_->ReadCustomData(clipboard_type, type, &data);
-  return data;
+  delegate_->ReadCustomData(clipboard_type, type.utf16(), &data);
+  return WebString::fromUTF16(data);
 }
 
 void WebClipboardImpl::writePlainText(const WebString& plain_text) {
-  delegate_->WriteText(ui::CLIPBOARD_TYPE_COPY_PASTE, plain_text);
+  delegate_->WriteText(ui::CLIPBOARD_TYPE_COPY_PASTE, plain_text.utf16());
   delegate_->CommitWrite(ui::CLIPBOARD_TYPE_COPY_PASTE);
 }
 
 void WebClipboardImpl::writeHTML(
     const WebString& html_text, const WebURL& source_url,
     const WebString& plain_text, bool write_smart_paste) {
-  delegate_->WriteHTML(ui::CLIPBOARD_TYPE_COPY_PASTE, html_text, source_url);
-  delegate_->WriteText(ui::CLIPBOARD_TYPE_COPY_PASTE, plain_text);
+  delegate_->WriteHTML(ui::CLIPBOARD_TYPE_COPY_PASTE, html_text.utf16(),
+                       source_url);
+  delegate_->WriteText(ui::CLIPBOARD_TYPE_COPY_PASTE, plain_text.utf16());
 
   if (write_smart_paste)
     delegate_->WriteSmartPasteMarker(ui::CLIPBOARD_TYPE_COPY_PASTE);
@@ -170,7 +175,7 @@
     return;
 
   if (!url.isEmpty()) {
-    delegate_->WriteBookmark(ui::CLIPBOARD_TYPE_COPY_PASTE, url, title);
+    delegate_->WriteBookmark(ui::CLIPBOARD_TYPE_COPY_PASTE, url, title.utf16());
 #if !defined(OS_MACOSX)
     // When writing the image, we also write the image markup so that pasting
     // into rich text editors, such as Gmail, reveals the image. We also don't
diff --git a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
index af200714..4b00720 100644
--- a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
+++ b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
@@ -379,7 +379,7 @@
         ['mac', ('nvidia', 0xfe9)], bug=635081)
     self.Fail('conformance/textures/misc/tex-input-validation.html',
         ['mac', ('nvidia', 0xfe9)], bug=635081)
-    self.Flaky('conformance/uniforms/' +
+    self.Fail('conformance/uniforms/' +
         'no-over-optimization-on-uniform-array-12.html',
         ['mac', ('nvidia', 0xfe9)], bug=684903)
 
diff --git a/device/geolocation/OWNERS b/device/geolocation/OWNERS
index aff8155..fc779d99 100644
--- a/device/geolocation/OWNERS
+++ b/device/geolocation/OWNERS
@@ -1,3 +1,5 @@
 mcasas@chromium.org
 mvanouwerkerk@chromium.org
 timvolodine@chromium.org
+
+# COMPONENT: Blink>Location
diff --git a/ios/chrome/app/theme/default_100_percent/omnibox/physical_web_highlighted_ios.png b/ios/chrome/app/theme/default_100_percent/omnibox/physical_web_highlighted_ios.png
index 9acf6b8..15d07e5 100644
--- a/ios/chrome/app/theme/default_100_percent/omnibox/physical_web_highlighted_ios.png
+++ b/ios/chrome/app/theme/default_100_percent/omnibox/physical_web_highlighted_ios.png
Binary files differ
diff --git a/ios/chrome/app/theme/default_100_percent/omnibox/physical_web_ios.png b/ios/chrome/app/theme/default_100_percent/omnibox/physical_web_ios.png
index 377a5f9..3735a74 100644
--- a/ios/chrome/app/theme/default_100_percent/omnibox/physical_web_ios.png
+++ b/ios/chrome/app/theme/default_100_percent/omnibox/physical_web_ios.png
Binary files differ
diff --git a/ios/chrome/app/theme/default_200_percent/omnibox/physical_web_highlighted_ios.png b/ios/chrome/app/theme/default_200_percent/omnibox/physical_web_highlighted_ios.png
index a9b8c5d..c9f2d21 100644
--- a/ios/chrome/app/theme/default_200_percent/omnibox/physical_web_highlighted_ios.png
+++ b/ios/chrome/app/theme/default_200_percent/omnibox/physical_web_highlighted_ios.png
Binary files differ
diff --git a/ios/chrome/app/theme/default_200_percent/omnibox/physical_web_ios.png b/ios/chrome/app/theme/default_200_percent/omnibox/physical_web_ios.png
index 3febfa59..1b3498f 100644
--- a/ios/chrome/app/theme/default_200_percent/omnibox/physical_web_ios.png
+++ b/ios/chrome/app/theme/default_200_percent/omnibox/physical_web_ios.png
Binary files differ
diff --git a/ios/chrome/app/theme/default_300_percent/omnibox/physical_web_highlighted_ios.png b/ios/chrome/app/theme/default_300_percent/omnibox/physical_web_highlighted_ios.png
index 63b34e92..3d6fa53d 100644
--- a/ios/chrome/app/theme/default_300_percent/omnibox/physical_web_highlighted_ios.png
+++ b/ios/chrome/app/theme/default_300_percent/omnibox/physical_web_highlighted_ios.png
Binary files differ
diff --git a/ios/chrome/app/theme/default_300_percent/omnibox/physical_web_ios.png b/ios/chrome/app/theme/default_300_percent/omnibox/physical_web_ios.png
index 329cd4f7..2686b10e 100644
--- a/ios/chrome/app/theme/default_300_percent/omnibox/physical_web_ios.png
+++ b/ios/chrome/app/theme/default_300_percent/omnibox/physical_web_ios.png
Binary files differ
diff --git a/ios/chrome/browser/tabs/tab.h b/ios/chrome/browser/tabs/tab.h
index 96e137f5..9107f0e 100644
--- a/ios/chrome/browser/tabs/tab.h
+++ b/ios/chrome/browser/tabs/tab.h
@@ -43,8 +43,6 @@
 @protocol TabHeadersDelegate;
 @class TabModel;
 @protocol TabSnapshottingDelegate;
-@class TranslateControllerImplIOS;
-@class WebControllerSnapshotHelper;
 
 namespace infobars {
 class InfoBarManager;
diff --git a/ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.h b/ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.h
index bb6d093..1da6a5d1 100644
--- a/ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.h
+++ b/ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.h
@@ -44,7 +44,7 @@
   SecurityLevel GetSecurityLevel() const override;
   scoped_refptr<net::X509Certificate> GetCertificate() const override;
   bool FailsMalwareCheck() const override;
-  gfx::VectorIconId GetVectorIconOverride() const override;
+  const gfx::VectorIcon* GetVectorIconOverride() const override;
 
   base::scoped_nsobject<TabModel> tab_model_;
 
diff --git a/ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.mm b/ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.mm
index 5926b2a9..d236dde 100644
--- a/ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.mm
+++ b/ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.mm
@@ -107,6 +107,6 @@
          security_state::MALICIOUS_CONTENT_STATUS_NONE;
 }
 
-gfx::VectorIconId ToolbarModelDelegateIOS::GetVectorIconOverride() const {
-  return gfx::VectorIconId::VECTOR_ICON_NONE;
+const gfx::VectorIcon* ToolbarModelDelegateIOS::GetVectorIconOverride() const {
+  return nullptr;
 }
diff --git a/media/capture/video/OWNERS b/media/capture/video/OWNERS
index e6688e69..9b67500 100644
--- a/media/capture/video/OWNERS
+++ b/media/capture/video/OWNERS
@@ -2,3 +2,6 @@
 magjed@chromium.org
 mcasas@chromium.org
 tommi@chromium.org
+
+# TEAM: media-capture-and-streams@grotations.appspotmail.com
+# COMPONENT: Blink>GetUserMedia>WebCam
diff --git a/media/capture/video/android/java/src/org/chromium/media/OWNERS b/media/capture/video/android/java/src/org/chromium/media/OWNERS
index 66e61fe4..e34b150738 100644
--- a/media/capture/video/android/java/src/org/chromium/media/OWNERS
+++ b/media/capture/video/android/java/src/org/chromium/media/OWNERS
@@ -1,2 +1,5 @@
 mcasas@chromium.org
 qinmin@chromium.org
+
+# media-capture-and-streams@grotations.appspotmail.com
+# COMPONENT: Blink>GetUserMedia>WebCam
diff --git a/media/filters/decoder_stream.cc b/media/filters/decoder_stream.cc
index ba7f188e..d89b062 100644
--- a/media/filters/decoder_stream.cc
+++ b/media/filters/decoder_stream.cc
@@ -684,7 +684,7 @@
   state_ = STATE_REINITIALIZING_DECODER;
   // Decoders should not need a new CDM during reinitialization.
   traits_.InitializeDecoder(
-      decoder_.get(), stream_, nullptr,
+      decoder_.get(), stream_, cdm_context_,
       base::Bind(&DecoderStream<StreamType>::OnDecoderReinitialized,
                  weak_factory_.GetWeakPtr()),
       base::Bind(&DecoderStream<StreamType>::OnDecodeOutputReady,
diff --git a/media/filters/fake_video_decoder.cc b/media/filters/fake_video_decoder.cc
index 407fdedf..013ceca 100644
--- a/media/filters/fake_video_decoder.cc
+++ b/media/filters/fake_video_decoder.cc
@@ -21,10 +21,12 @@
       total_bytes_decoded_(0),
       fail_to_initialize_(false),
       weak_factory_(this) {
+  DVLOG(1) << __func__;
   DCHECK_GE(decoding_delay, 0);
 }
 
 FakeVideoDecoder::~FakeVideoDecoder() {
+  DVLOG(1) << __func__;
   DCHECK(thread_checker_.CalledOnValidThread());
 
   if (state_ == STATE_UNINITIALIZED)
@@ -40,15 +42,20 @@
   decoded_frames_.clear();
 }
 
+void FakeVideoDecoder::EnableEncryptedConfigSupport() {
+  supports_encrypted_config_ = true;
+}
+
 std::string FakeVideoDecoder::GetDisplayName() const {
   return "FakeVideoDecoder";
 }
 
 void FakeVideoDecoder::Initialize(const VideoDecoderConfig& config,
                                   bool low_delay,
-                                  CdmContext* /* cdm_context */,
+                                  CdmContext* cdm_context,
                                   const InitCB& init_cb,
                                   const OutputCB& output_cb) {
+  DVLOG(1) << __func__;
   DCHECK(thread_checker_.CalledOnValidThread());
   DCHECK(config.IsValidConfig());
   DCHECK(held_decode_callbacks_.empty())
@@ -67,6 +74,11 @@
     decoded_frames_.clear();
   }
 
+  if (config.is_encrypted() && (!supports_encrypted_config_ || !cdm_context)) {
+    DVLOG(1) << "Encrypted config not supported.";
+    fail_to_initialize_ = true;
+  }
+
   if (fail_to_initialize_) {
     state_ = STATE_ERROR;
     init_cb_.RunOrHold(false);
diff --git a/media/filters/fake_video_decoder.h b/media/filters/fake_video_decoder.h
index 454762f..3ac932f 100644
--- a/media/filters/fake_video_decoder.h
+++ b/media/filters/fake_video_decoder.h
@@ -39,6 +39,9 @@
                    const BytesDecodedCB& bytes_decoded_cb);
   ~FakeVideoDecoder() override;
 
+  // Enables encrypted config supported. Must be called before Initialize().
+  void EnableEncryptedConfigSupport();
+
   // VideoDecoder implementation.
   std::string GetDisplayName() const override;
   void Initialize(const VideoDecoderConfig& config,
@@ -99,6 +102,8 @@
   const int max_parallel_decoding_requests_;
   BytesDecodedCB bytes_decoded_cb_;
 
+  bool supports_encrypted_config_ = false;
+
   State state_;
 
   CallbackHolder<InitCB> init_cb_;
diff --git a/media/filters/video_frame_stream_unittest.cc b/media/filters/video_frame_stream_unittest.cc
index 8dedd93..415233d 100644
--- a/media/filters/video_frame_stream_unittest.cc
+++ b/media/filters/video_frame_stream_unittest.cc
@@ -35,13 +35,16 @@
 
 struct VideoFrameStreamTestParams {
   VideoFrameStreamTestParams(bool is_encrypted,
+                             bool has_decryptor,
                              int decoding_delay,
                              int parallel_decoding)
       : is_encrypted(is_encrypted),
+        has_decryptor(has_decryptor),
         decoding_delay(decoding_delay),
         parallel_decoding(parallel_decoding) {}
 
   bool is_encrypted;
+  bool has_decryptor;
   int decoding_delay;
   int parallel_decoding;
 };
@@ -55,25 +58,6 @@
                                               kNumBuffersInOneConfig,
                                               GetParam().is_encrypted)),
         cdm_context_(new StrictMock<MockCdmContext>()),
-        decryptor_(new NiceMock<MockDecryptor>()),
-        decoder1_(
-            new FakeVideoDecoder(GetParam().decoding_delay,
-                                 GetParam().parallel_decoding,
-                                 base::Bind(
-                                     &VideoFrameStreamTest::OnBytesDecoded,
-                                     base::Unretained(this)))),
-        decoder2_(
-            new FakeVideoDecoder(GetParam().decoding_delay,
-                                 GetParam().parallel_decoding,
-                                 base::Bind(
-                                     &VideoFrameStreamTest::OnBytesDecoded,
-                                     base::Unretained(this)))),
-        decoder3_(
-            new FakeVideoDecoder(GetParam().decoding_delay,
-                                 GetParam().parallel_decoding,
-                                 base::Bind(
-                                     &VideoFrameStreamTest::OnBytesDecoded,
-                                     base::Unretained(this)))),
         is_initialized_(false),
         num_decoded_frames_(0),
         pending_initialize_(false),
@@ -82,6 +66,27 @@
         pending_stop_(false),
         num_decoded_bytes_unreported_(0),
         has_no_key_(false) {
+    int decoding_delay = GetParam().decoding_delay;
+    int parallel_decoding = GetParam().parallel_decoding;
+    BytesDecodedCB bytes_decoded_cb = base::Bind(
+        &VideoFrameStreamTest::OnBytesDecoded, base::Unretained(this));
+
+    decoder1_ = new FakeVideoDecoder(decoding_delay, parallel_decoding,
+                                     bytes_decoded_cb);
+    decoder2_ = new FakeVideoDecoder(decoding_delay, parallel_decoding,
+                                     bytes_decoded_cb);
+    decoder3_ = new FakeVideoDecoder(decoding_delay, parallel_decoding,
+                                     bytes_decoded_cb);
+
+    // TODO(xhwang): We should test the case where only certain decoder
+    // supports encrypted streams. Currently this is hard to test becasue we use
+    // parameterized tests which need to pass in all combinations.
+    if (GetParam().is_encrypted && !GetParam().has_decryptor) {
+      decoder1_->EnableEncryptedConfigSupport();
+      decoder2_->EnableEncryptedConfigSupport();
+      decoder3_->EnableEncryptedConfigSupport();
+    }
+
     ScopedVector<VideoDecoder> decoders;
     decoders.push_back(decoder1_);
     decoders.push_back(decoder2_);
@@ -90,15 +95,19 @@
     video_frame_stream_.reset(new VideoFrameStream(
         message_loop_.task_runner(), std::move(decoders), new MediaLog()));
 
+    if (GetParam().has_decryptor) {
+      decryptor_.reset(new NiceMock<MockDecryptor>());
+
+      // Decryptor can only decrypt (not decrypt-and-decode) so that
+      // DecryptingDemuxerStream will be used.
+      EXPECT_CALL(*decryptor_, InitializeVideoDecoder(_, _))
+          .WillRepeatedly(RunCallback<1>(false));
+      EXPECT_CALL(*decryptor_, Decrypt(_, _, _))
+          .WillRepeatedly(Invoke(this, &VideoFrameStreamTest::Decrypt));
+    }
+
     EXPECT_CALL(*cdm_context_, GetDecryptor())
         .WillRepeatedly(Return(decryptor_.get()));
-
-    // Decryptor can only decrypt (not decrypt-and-decode) so that
-    // DecryptingDemuxerStream will be used.
-    EXPECT_CALL(*decryptor_, InitializeVideoDecoder(_, _))
-        .WillRepeatedly(RunCallback<1>(false));
-    EXPECT_CALL(*decryptor_, Decrypt(_, _, _))
-        .WillRepeatedly(Invoke(this, &VideoFrameStreamTest::Decrypt));
   }
 
   ~VideoFrameStreamTest() {
@@ -252,9 +261,10 @@
         break;
 
       case DECRYPTOR_NO_KEY:
-        if (GetParam().is_encrypted)
+        if (GetParam().is_encrypted && GetParam().has_decryptor) {
           EXPECT_CALL(*this, OnWaitingForDecryptionKey());
-        has_no_key_ = true;
+          has_no_key_ = true;
+        }
         ReadOneFrame();
         break;
 
@@ -385,27 +395,29 @@
 INSTANTIATE_TEST_CASE_P(
     Clear,
     VideoFrameStreamTest,
-    ::testing::Values(
-        VideoFrameStreamTestParams(false, 0, 1),
-        VideoFrameStreamTestParams(false, 3, 1),
-        VideoFrameStreamTestParams(false, 7, 1)));
+    ::testing::Values(VideoFrameStreamTestParams(false, false, 0, 1),
+                      VideoFrameStreamTestParams(false, false, 3, 1),
+                      VideoFrameStreamTestParams(false, false, 7, 1)));
 
 INSTANTIATE_TEST_CASE_P(
-    Encrypted,
+    EncryptedWithDecryptor,
     VideoFrameStreamTest,
-    ::testing::Values(
-        VideoFrameStreamTestParams(true, 7, 1)));
+    ::testing::Values(VideoFrameStreamTestParams(true, true, 7, 1)));
+
+INSTANTIATE_TEST_CASE_P(
+    EncryptedWithoutDecryptor,
+    VideoFrameStreamTest,
+    ::testing::Values(VideoFrameStreamTestParams(true, false, 7, 1)));
 
 INSTANTIATE_TEST_CASE_P(
     Clear_Parallel,
     VideoFrameStreamTest,
-    ::testing::Values(
-        VideoFrameStreamTestParams(false, 0, 3),
-        VideoFrameStreamTestParams(false, 2, 3)));
-
+    ::testing::Values(VideoFrameStreamTestParams(false, false, 0, 3),
+                      VideoFrameStreamTestParams(false, false, 2, 3)));
 
 TEST_P(VideoFrameStreamTest, Initialization) {
   Initialize();
+  EXPECT_TRUE(is_initialized_);
 }
 
 TEST_P(VideoFrameStreamTest, AllDecoderInitializationFails) {
diff --git a/media/muxers/OWNERS b/media/muxers/OWNERS
index 088dd9cf6..2198557 100644
--- a/media/muxers/OWNERS
+++ b/media/muxers/OWNERS
@@ -1,2 +1,4 @@
 mcasas@chromium.org
-miu@chromium.org
\ No newline at end of file
+miu@chromium.org
+
+# COMPONENT: Blink>MediaRecording
diff --git a/media/remoting/proto_utils_unittest.cc b/media/remoting/proto_utils_unittest.cc
index 53ab59197..c974c0f8 100644
--- a/media/remoting/proto_utils_unittest.cc
+++ b/media/remoting/proto_utils_unittest.cc
@@ -18,6 +18,7 @@
 #include "media/base/decoder_buffer.h"
 #include "media/base/demuxer_stream.h"
 #include "media/base/eme_constants.h"
+#include "media/base/test_helpers.h"
 #include "media/base/video_decoder_config.h"
 #include "media/remoting/rpc.pb.h"
 #include "testing/gmock/include/gmock/gmock.h"
@@ -29,6 +30,17 @@
 
 namespace media {
 namespace remoting {
+namespace {
+
+void VerifyCdmPromiseResultsEqual(const CdmPromiseResult& cdm1,
+                                  const CdmPromiseResult& cdm2) {
+  ASSERT_EQ(cdm1.success(), cdm2.success());
+  ASSERT_EQ(cdm1.exception(), cdm2.exception());
+  ASSERT_EQ(cdm1.system_code(), cdm2.system_code());
+  ASSERT_EQ(cdm1.error_message(), cdm2.error_message());
+}
+
+}  // namespace
 
 class ProtoUtilsTest : public testing::Test {
  protected:
@@ -149,7 +161,15 @@
   EXPECT_EQ(0, memcmp(&original, &converted, sizeof(converted)));
 }
 
-// TODO(miu): Tests for all other conversion functions.
+TEST_F(ProtoUtilsTest, VideoDecoderConfigConversionTest) {
+  const VideoDecoderConfig video_config = TestVideoConfig::Normal();
+  ASSERT_TRUE(video_config.IsValidConfig());
+  pb::VideoDecoderConfig message;
+  ConvertVideoDecoderConfigToProto(video_config, &message);
+  VideoDecoderConfig converted;
+  ASSERT_TRUE(ConvertProtoToVideoDecoderConfig(message, &converted));
+  ASSERT_TRUE(converted.Matches(video_config));
+}
 
 TEST_F(ProtoUtilsTest, CdmPromiseResultConversion) {
   CdmPromiseResult success_result = CdmPromiseResult::SuccessResult();
@@ -160,10 +180,34 @@
   CdmPromiseResult output_result;
   ASSERT_TRUE(ConvertProtoToCdmPromise(promise_message, &output_result));
 
-  ASSERT_EQ(success_result.success(), output_result.success());
-  ASSERT_EQ(success_result.exception(), output_result.exception());
-  ASSERT_EQ(success_result.system_code(), output_result.system_code());
-  ASSERT_EQ(success_result.error_message(), output_result.error_message());
+  VerifyCdmPromiseResultsEqual(success_result, output_result);
+}
+
+TEST_F(ProtoUtilsTest, CdmPromiseResultWithCdmIdSessionIdConversion) {
+  const int kCdmId = 5;
+  const std::string kSessionId = "session3";
+  CdmPromiseResult success_result = CdmPromiseResult::SuccessResult();
+
+  pb::RpcMessage rpc;
+  rpc.set_handle(1);
+  pb::CdmPromise* promise_message = rpc.mutable_cdm_promise_rpc();
+
+  ConvertCdmPromiseWithSessionIdToProto(success_result, kSessionId,
+                                        promise_message);
+  CdmPromiseResult output_result;
+  std::string converted_session_id;
+  ASSERT_TRUE(ConvertProtoToCdmPromiseWithCdmIdSessionId(
+      rpc, &output_result, nullptr, &converted_session_id));
+  VerifyCdmPromiseResultsEqual(success_result, output_result);
+  ASSERT_EQ(converted_session_id, kSessionId);
+
+  ConvertCdmPromiseWithCdmIdToProto(success_result, kCdmId, promise_message);
+  int converted_cdm_id;
+  output_result = CdmPromiseResult();
+  ASSERT_TRUE(ConvertProtoToCdmPromiseWithCdmIdSessionId(
+      rpc, &output_result, &converted_cdm_id, nullptr));
+  VerifyCdmPromiseResultsEqual(success_result, output_result);
+  ASSERT_EQ(converted_cdm_id, kCdmId);
 }
 
 TEST_F(ProtoUtilsTest, CdmKeyInformationConversion) {
diff --git a/mojo/public/tools/bindings/chromium_bindings_configuration.gni b/mojo/public/tools/bindings/chromium_bindings_configuration.gni
index 5ebd052..356dd718 100644
--- a/mojo/public/tools/bindings/chromium_bindings_configuration.gni
+++ b/mojo/public/tools/bindings/chromium_bindings_configuration.gni
@@ -28,12 +28,12 @@
   "//net/interfaces/typemaps.gni",
   "//services/service_manager/public/cpp/typemaps.gni",
   "//services/ui/gpu/interfaces/typemaps.gni",
-  "//services/ui/public/interfaces/display/typemaps.gni",
   "//services/ui/public/interfaces/ime/typemaps.gni",
   "//services/video_capture/public/interfaces/typemaps.gni",
   "//skia/public/interfaces/typemaps.gni",
   "//third_party/WebKit/public/public_typemaps.gni",
   "//ui/base/mojo/typemaps.gni",
+  "//ui/display/mojo/typemaps.gni",
   "//ui/events/devices/mojo/typemaps.gni",
   "//ui/events/mojo/typemaps.gni",
   "//ui/gfx/typemaps.gni",
diff --git a/net/BUILD.gn b/net/BUILD.gn
index 15f0453d..2df02d38 100644
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -1110,8 +1110,8 @@
       "quic/core/congestion_control/send_algorithm_interface.h",
       "quic/core/congestion_control/tcp_cubic_sender_base.cc",
       "quic/core/congestion_control/tcp_cubic_sender_base.h",
-      "quic/core/congestion_control/tcp_cubic_sender_base.h",
       "quic/core/congestion_control/tcp_cubic_sender_bytes.cc",
+      "quic/core/congestion_control/tcp_cubic_sender_bytes.h",
       "quic/core/congestion_control/tcp_cubic_sender_packets.cc",
       "quic/core/congestion_control/tcp_cubic_sender_packets.h",
       "quic/core/congestion_control/windowed_filter.h",
@@ -1210,6 +1210,7 @@
       "quic/core/quic_ack_listener_interface.h",
       "quic/core/quic_alarm.cc",
       "quic/core/quic_alarm.h",
+      "quic/core/quic_alarm_factory.h",
       "quic/core/quic_arena_scoped_ptr.h",
       "quic/core/quic_bandwidth.cc",
       "quic/core/quic_bandwidth.h",
@@ -1247,6 +1248,7 @@
       "quic/core/quic_error_codes.h",
       "quic/core/quic_flags.cc",
       "quic/core/quic_flags.h",
+      "quic/core/quic_flags_list.h",
       "quic/core/quic_flow_controller.cc",
       "quic/core/quic_flow_controller.h",
       "quic/core/quic_framer.cc",
@@ -1325,12 +1327,14 @@
       "quic/platform/api/quic_ip_address_family.h",
       "quic/platform/api/quic_logging.h",
       "quic/platform/api/quic_lru_cache.h",
+      "quic/platform/api/quic_map_util.h",
       "quic/platform/api/quic_mutex.cc",
       "quic/platform/api/quic_mutex.h",
       "quic/platform/api/quic_ptr_util.h",
       "quic/platform/api/quic_reference_counted.h",
       "quic/platform/api/quic_socket_address.cc",
       "quic/platform/api/quic_socket_address.h",
+      "quic/platform/api/quic_stack_trace.h",
       "quic/platform/api/quic_str_cat.h",
       "quic/platform/api/quic_text_utils.h",
       "quic/platform/api/quic_url_utils.cc",
@@ -1344,12 +1348,14 @@
       "quic/platform/impl/quic_ip_address_impl.h",
       "quic/platform/impl/quic_logging_impl.h",
       "quic/platform/impl/quic_lru_cache_impl.h",
+      "quic/platform/impl/quic_map_util_impl.h",
       "quic/platform/impl/quic_mutex_impl.cc",
       "quic/platform/impl/quic_mutex_impl.h",
       "quic/platform/impl/quic_ptr_util_impl.h",
       "quic/platform/impl/quic_reference_counted_impl.h",
       "quic/platform/impl/quic_socket_address_impl.cc",
       "quic/platform/impl/quic_socket_address_impl.h",
+      "quic/platform/impl/quic_stack_trace_impl.h",
       "quic/platform/impl/quic_str_cat_impl.h",
       "quic/platform/impl/quic_text_utils_impl.h",
       "quic/platform/impl/quic_url_utils_impl.cc",
@@ -1367,6 +1373,7 @@
       "quic/quartc/quartc_stream.cc",
       "quic/quartc/quartc_stream.h",
       "quic/quartc/quartc_stream_interface.h",
+      "quic/quartc/quartc_task_runner_interface.h",
       "sdch/sdch_owner.cc",
       "sdch/sdch_owner.h",
       "socket/client_socket_factory.cc",
@@ -4474,6 +4481,7 @@
     "quic/platform/api/quic_reference_counted_test.cc",
     "quic/platform/api/quic_str_cat_test.cc",
     "quic/platform/api/quic_text_utils_test.cc",
+    "quic/platform/api/quic_url_utils_test.cc",
     "quic/platform/impl/quic_chromium_clock_test.cc",
     "quic/quartc/quartc_alarm_factory_test.cc",
     "quic/quartc/quartc_session_test.cc",
diff --git a/net/quic/core/crypto/crypto_utils.cc b/net/quic/core/crypto/crypto_utils.cc
index 15f4a99f..c8f1c46 100644
--- a/net/quic/core/crypto/crypto_utils.cc
+++ b/net/quic/core/crypto/crypto_utils.cc
@@ -8,7 +8,6 @@
 
 #include "crypto/hkdf.h"
 #include "crypto/secure_hash.h"
-#include "net/base/url_util.h"
 #include "net/quic/core/crypto/crypto_handshake.h"
 #include "net/quic/core/crypto/crypto_protocol.h"
 #include "net/quic/core/crypto/quic_decrypter.h"
@@ -18,7 +17,6 @@
 #include "net/quic/core/quic_utils.h"
 #include "net/quic/platform/api/quic_bug_tracker.h"
 #include "net/quic/platform/api/quic_logging.h"
-#include "url/url_canon.h"
 
 using base::StringPiece;
 using std::string;
@@ -53,38 +51,6 @@
 }
 
 // static
-bool CryptoUtils::IsValidSNI(StringPiece sni) {
-  // TODO(rtenneti): Support RFC2396 hostname.
-  // NOTE: Microsoft does NOT enforce this spec, so if we throw away hostnames
-  // based on the above spec, we may be losing some hostnames that windows
-  // would consider valid. By far the most common hostname character NOT
-  // accepted by the above spec is '_'.
-  url::CanonHostInfo host_info;
-  string canonicalized_host(CanonicalizeHost(sni.as_string(), &host_info));
-  return !host_info.IsIPAddress() &&
-         IsCanonicalizedHostCompliant(canonicalized_host) &&
-         sni.find_last_of('.') != string::npos;
-}
-
-// static
-string CryptoUtils::NormalizeHostname(const char* hostname) {
-  url::CanonHostInfo host_info;
-  string host(CanonicalizeHost(hostname, &host_info));
-
-  // Walk backwards over the string, stopping at the first trailing dot.
-  size_t host_end = host.length();
-  while (host_end != 0 && host[host_end - 1] == '.') {
-    host_end--;
-  }
-
-  // Erase the trailing dots.
-  if (host_end != host.length()) {
-    host.erase(host_end, host.length() - host_end);
-  }
-  return host;
-}
-
-// static
 bool CryptoUtils::DeriveKeys(StringPiece premaster_secret,
                              QuicTag aead,
                              StringPiece client_nonce,
diff --git a/net/quic/core/crypto/crypto_utils.h b/net/quic/core/crypto/crypto_utils.h
index ee0825f..e956e88 100644
--- a/net/quic/core/crypto/crypto_utils.h
+++ b/net/quic/core/crypto/crypto_utils.h
@@ -77,17 +77,6 @@
                             base::StringPiece orbit,
                             std::string* nonce);
 
-  // Returns true if the sni is valid, false otherwise.
-  //  (1) disallow IP addresses;
-  //  (2) check that the hostname contains valid characters only; and
-  //  (3) contains at least one dot.
-  static bool IsValidSNI(base::StringPiece sni);
-
-  // Convert hostname to lowercase and remove the trailing '.'.
-  // Returns |hostname|. NormalizeHostname() doesn't support IP address
-  // literals. IsValidSNI() should be called before calling NormalizeHostname().
-  static std::string NormalizeHostname(const char* hostname);
-
   // DeriveKeys populates |crypters->encrypter|, |crypters->decrypter|, and
   // |subkey_secret| (optional -- may be null) given the contents of
   // |premaster_secret|, |client_nonce|, |server_nonce| and |hkdf_input|. |aead|
diff --git a/net/quic/core/crypto/crypto_utils_test.cc b/net/quic/core/crypto/crypto_utils_test.cc
index 0d5bea0..641de83b0 100644
--- a/net/quic/core/crypto/crypto_utils_test.cc
+++ b/net/quic/core/crypto/crypto_utils_test.cc
@@ -15,52 +15,6 @@
 namespace test {
 namespace {
 
-TEST(CryptoUtilsTest, IsValidSNI) {
-  // IP as SNI.
-  EXPECT_FALSE(CryptoUtils::IsValidSNI("192.168.0.1"));
-  // SNI without any dot.
-  EXPECT_FALSE(CryptoUtils::IsValidSNI("somedomain"));
-  // Invalid by RFC2396 but unfortunately domains of this form exist.
-  EXPECT_TRUE(CryptoUtils::IsValidSNI("some_domain.com"));
-  // An empty string must be invalid otherwise the QUIC client will try sending
-  // it.
-  EXPECT_FALSE(CryptoUtils::IsValidSNI(""));
-
-  // Valid SNI
-  EXPECT_TRUE(CryptoUtils::IsValidSNI("test.google.com"));
-}
-
-TEST(CryptoUtilsTest, NormalizeHostname) {
-  struct {
-    const char *input, *expected;
-  } tests[] = {
-      {
-          "www.google.com", "www.google.com",
-      },
-      {
-          "WWW.GOOGLE.COM", "www.google.com",
-      },
-      {
-          "www.google.com.", "www.google.com",
-      },
-      {
-          "www.google.COM.", "www.google.com",
-      },
-      {
-          "www.google.com..", "www.google.com",
-      },
-      {
-          "www.google.com........", "www.google.com",
-      },
-  };
-
-  for (size_t i = 0; i < arraysize(tests); ++i) {
-    char buf[256];
-    snprintf(buf, sizeof(buf), "%s", tests[i].input);
-    EXPECT_EQ(string(tests[i].expected), CryptoUtils::NormalizeHostname(buf));
-  }
-}
-
 TEST(CryptoUtilsTest, TestExportKeyingMaterial) {
   const struct TestVector {
     // Input (strings of hexadecimal digits):
diff --git a/net/quic/core/crypto/quic_crypto_client_config.cc b/net/quic/core/crypto/quic_crypto_client_config.cc
index adef0d78..cc7232e 100644
--- a/net/quic/core/crypto/quic_crypto_client_config.cc
+++ b/net/quic/core/crypto/quic_crypto_client_config.cc
@@ -26,6 +26,7 @@
 #include "net/quic/platform/api/quic_map_util.h"
 #include "net/quic/platform/api/quic_ptr_util.h"
 #include "net/quic/platform/api/quic_text_utils.h"
+#include "net/quic/platform/api/quic_url_utils.h"
 
 using base::StringPiece;
 using std::string;
@@ -427,7 +428,7 @@
 
   // Server name indication. We only send SNI if it's a valid domain name, as
   // per the spec.
-  if (CryptoUtils::IsValidSNI(server_id.host())) {
+  if (QuicUrlUtils::IsValidSNI(server_id.host())) {
     out->SetStringPiece(kSNI, server_id.host());
   }
   out->SetValue(kVER, QuicVersionToQuicTag(preferred_version));
diff --git a/net/quic/core/crypto/quic_crypto_server_config.cc b/net/quic/core/crypto/quic_crypto_server_config.cc
index 171e4b5..655c145 100644
--- a/net/quic/core/crypto/quic_crypto_server_config.cc
+++ b/net/quic/core/crypto/quic_crypto_server_config.cc
@@ -39,6 +39,7 @@
 #include "net/quic/platform/api/quic_logging.h"
 #include "net/quic/platform/api/quic_reference_counted.h"
 #include "net/quic/platform/api/quic_text_utils.h"
+#include "net/quic/platform/api/quic_url_utils.h"
 
 using base::StringPiece;
 using crypto::SecureHash;
@@ -854,7 +855,7 @@
     std::unique_ptr<char[]> sni_tmp(new char[info.sni.length() + 1]);
     memcpy(sni_tmp.get(), info.sni.data(), info.sni.length());
     sni_tmp[info.sni.length()] = 0;
-    params->sni = CryptoUtils::NormalizeHostname(sni_tmp.get());
+    params->sni = QuicUrlUtils::NormalizeHostname(sni_tmp.get());
   }
 
   string hkdf_suffix;
@@ -1208,7 +1209,7 @@
   }
 
   if (client_hello.GetStringPiece(kSNI, &info->sni) &&
-      !CryptoUtils::IsValidSNI(info->sni)) {
+      !QuicUrlUtils::IsValidSNI(info->sni)) {
     helper.ValidationComplete(QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER,
                               "Invalid SNI name", nullptr);
     return;
diff --git a/net/quic/platform/api/quic_url_utils.cc b/net/quic/platform/api/quic_url_utils.cc
index 4b2c33b..73b8fcd 100644
--- a/net/quic/platform/api/quic_url_utils.cc
+++ b/net/quic/platform/api/quic_url_utils.cc
@@ -19,4 +19,14 @@
   return QuicUrlUtilsImpl::IsValidUrl(url);
 }
 
+// static
+bool QuicUrlUtils::IsValidSNI(StringPiece sni) {
+  return QuicUrlUtilsImpl::IsValidSNI(sni);
+}
+
+// static
+char* QuicUrlUtils::NormalizeHostname(char* hostname) {
+  return QuicUrlUtilsImpl::NormalizeHostname(hostname);
+}
+
 }  // namespace net
diff --git a/net/quic/platform/api/quic_url_utils.h b/net/quic/platform/api/quic_url_utils.h
index 022e041..53564f10e 100644
--- a/net/quic/platform/api/quic_url_utils.h
+++ b/net/quic/platform/api/quic_url_utils.h
@@ -21,6 +21,16 @@
   // (e.g. greater than 65535).
   static bool IsValidUrl(base::StringPiece url);
 
+  // Returns true if the sni is valid, false otherwise.
+  //  (1) disallow IP addresses;
+  //  (2) check that the hostname contains valid characters only; and
+  //  (3) contains at least one dot.
+  static bool IsValidSNI(base::StringPiece sni);
+
+  // Convert hostname to lowercase and remove the trailing '.'.
+  // WARNING: mutates |hostname| in place and returns |hostname|.
+  static char* NormalizeHostname(char* hostname);
+
  private:
   DISALLOW_COPY_AND_ASSIGN(QuicUrlUtils);
 };
diff --git a/net/quic/platform/api/quic_url_utils_test.cc b/net/quic/platform/api/quic_url_utils_test.cc
new file mode 100644
index 0000000..f06e184
--- /dev/null
+++ b/net/quic/platform/api/quic_url_utils_test.cc
@@ -0,0 +1,63 @@
+// Copyright (c) 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 "net/quic/platform/api/quic_url_utils.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+using std::string;
+
+namespace net {
+namespace test {
+namespace {
+
+TEST(QuicUrlUtilsTest, IsValidSNI) {
+  // IP as SNI.
+  EXPECT_FALSE(QuicUrlUtils::IsValidSNI("192.168.0.1"));
+  // SNI without any dot.
+  EXPECT_FALSE(QuicUrlUtils::IsValidSNI("somedomain"));
+  // Invalid by RFC2396 but unfortunately domains of this form exist.
+  EXPECT_TRUE(QuicUrlUtils::IsValidSNI("some_domain.com"));
+  // An empty string must be invalid otherwise the QUIC client will try sending
+  // it.
+  EXPECT_FALSE(QuicUrlUtils::IsValidSNI(""));
+
+  // Valid SNI
+  EXPECT_TRUE(QuicUrlUtils::IsValidSNI("test.google.com"));
+}
+
+TEST(QuicUrlUtilsTest, NormalizeHostname) {
+  struct {
+    const char *input, *expected;
+  } tests[] = {
+      {
+          "www.google.com", "www.google.com",
+      },
+      {
+          "WWW.GOOGLE.COM", "www.google.com",
+      },
+      {
+          "www.google.com.", "www.google.com",
+      },
+      {
+          "www.google.COM.", "www.google.com",
+      },
+      {
+          "www.google.com..", "www.google.com",
+      },
+      {
+          "www.google.com........", "www.google.com",
+      },
+  };
+
+  for (size_t i = 0; i < arraysize(tests); ++i) {
+    char buf[256];
+    snprintf(buf, sizeof(buf), "%s", tests[i].input);
+    EXPECT_EQ(string(tests[i].expected), QuicUrlUtils::NormalizeHostname(buf));
+  }
+}
+
+}  // namespace
+}  // namespace test
+}  // namespace net
diff --git a/net/quic/platform/impl/quic_url_utils_impl.cc b/net/quic/platform/impl/quic_url_utils_impl.cc
index 1ef757b1..f9c7600 100644
--- a/net/quic/platform/impl/quic_url_utils_impl.cc
+++ b/net/quic/platform/impl/quic_url_utils_impl.cc
@@ -4,7 +4,9 @@
 
 #include "net/quic/platform/impl/quic_url_utils_impl.h"
 
+#include "net/base/url_util.h"
 #include "url/gurl.h"
+#include "url/url_canon.h"
 
 using base::StringPiece;
 using std::string;
@@ -21,4 +23,40 @@
   return GURL(url).is_valid();
 }
 
+// static
+bool QuicUrlUtilsImpl::IsValidSNI(StringPiece sni) {
+  // TODO(rtenneti): Support RFC2396 hostname.
+  // NOTE: Microsoft does NOT enforce this spec, so if we throw away hostnames
+  // based on the above spec, we may be losing some hostnames that windows
+  // would consider valid. By far the most common hostname character NOT
+  // accepted by the above spec is '_'.
+  url::CanonHostInfo host_info;
+  string canonicalized_host(CanonicalizeHost(sni.as_string(), &host_info));
+  return !host_info.IsIPAddress() &&
+         IsCanonicalizedHostCompliant(canonicalized_host) &&
+         sni.find_last_of('.') != string::npos;
+}
+
+// static
+char* QuicUrlUtilsImpl::NormalizeHostname(char* hostname) {
+  url::CanonHostInfo host_info;
+  string host(CanonicalizeHost(hostname, &host_info));
+
+  // Walk backwards over the string, stopping at the first trailing dot.
+  size_t host_end = host.length();
+  while (host_end != 0 && host[host_end - 1] == '.') {
+    host_end--;
+  }
+
+  // Erase the trailing dots.
+  if (host_end != host.length()) {
+    host.erase(host_end, host.length() - host_end);
+  }
+
+  memcpy(hostname, host.c_str(), host.length());
+  hostname[host.length()] = '\0';
+
+  return hostname;
+}
+
 }  // namespace net
diff --git a/net/quic/platform/impl/quic_url_utils_impl.h b/net/quic/platform/impl/quic_url_utils_impl.h
index bf2e198..070f516 100644
--- a/net/quic/platform/impl/quic_url_utils_impl.h
+++ b/net/quic/platform/impl/quic_url_utils_impl.h
@@ -21,6 +21,16 @@
   // (e.g. greater than 65535).
   static bool IsValidUrl(base::StringPiece url);
 
+  // Returns true if the sni is valid, false otherwise.
+  //  (1) disallow IP addresses;
+  //  (2) check that the hostname contains valid characters only; and
+  //  (3) contains at least one dot.
+  static bool IsValidSNI(base::StringPiece sni);
+
+  // Convert hostname to lowercase and remove the trailing '.'.
+  // WARNING: mutates |hostname| in place and returns |hostname|.
+  static char* NormalizeHostname(char* hostname);
+
  private:
   DISALLOW_COPY_AND_ASSIGN(QuicUrlUtilsImpl);
 };
diff --git a/services/ui/public/interfaces/BUILD.gn b/services/ui/public/interfaces/BUILD.gn
index 0677d29..6a375682 100644
--- a/services/ui/public/interfaces/BUILD.gn
+++ b/services/ui/public/interfaces/BUILD.gn
@@ -36,6 +36,7 @@
     "//gpu/ipc/common:interfaces",
     "//services/ui/public/interfaces/display",
     "//services/ui/public/interfaces/ime",
+    "//ui/display/mojo:interfaces",
     "//ui/events/mojo:interfaces",
     "//ui/gfx/geometry/mojo",
     "//ui/gfx/mojo",
@@ -53,7 +54,6 @@
   testonly = true
 
   sources = [
-    "display/display_struct_traits_unittest.cc",
     "ime/ime_struct_traits_unittest.cc",
   ]
 
@@ -61,7 +61,6 @@
     "//base",
     "//base/test:test_support",
     "//mojo/edk/test:run_all_unittests",
-    "//services/ui/public/interfaces/display:test_interfaces",
     "//services/ui/public/interfaces/ime:test_interfaces",
     "//testing/gtest",
     "//ui/display/types",
diff --git a/services/ui/public/interfaces/display/BUILD.gn b/services/ui/public/interfaces/display/BUILD.gn
index 02e9cc0a..1d81ecf 100644
--- a/services/ui/public/interfaces/display/BUILD.gn
+++ b/services/ui/public/interfaces/display/BUILD.gn
@@ -6,7 +6,6 @@
 
 mojom("display") {
   sources = [
-    "display.mojom",
     "display_controller.mojom",
     "test_display_controller.mojom",
   ]
@@ -15,13 +14,3 @@
     "//ui/gfx/geometry/mojo",
   ]
 }
-
-mojom("test_interfaces") {
-  sources = [
-    "display_struct_traits_test.mojom",
-  ]
-
-  public_deps = [
-    ":display",
-  ]
-}
diff --git a/services/ui/public/interfaces/window_manager.mojom b/services/ui/public/interfaces/window_manager.mojom
index 14615fc..14ad1c0 100644
--- a/services/ui/public/interfaces/window_manager.mojom
+++ b/services/ui/public/interfaces/window_manager.mojom
@@ -5,10 +5,10 @@
 module ui.mojom;
 
 import "services/ui/public/interfaces/cursor.mojom";
-import "services/ui/public/interfaces/display/display.mojom";
 import "services/ui/public/interfaces/event_matcher.mojom";
 import "services/ui/public/interfaces/window_manager_constants.mojom";
 import "services/ui/public/interfaces/window_tree_constants.mojom";
+import "ui/display/mojo/display.mojom";
 import "ui/events/mojo/event.mojom";
 import "ui/gfx/geometry/mojo/geometry.mojom";
 
@@ -85,6 +85,11 @@
   // used list of windows. Maps to aura::client::kExcludeFromMruKey. Type: bool.
   const string kExcludeFromMru_Property = "prop:exclude_from_mru";
 
+  // If true, when a window is in in fullscreen mode, the user cannot reveal
+  // the top portion of the window through a touch / mouse gesture.
+  // Type: bool.
+  const string kImmersiveFullscreen_Property = "prop:immersive-fullscreen";
+
   // Internal window name. Useful for debugging. Maps to aura::client::kNameKey.
   // Type: mojom::String
   const string kName_Property = "prop:name";
diff --git a/services/ui/public/interfaces/window_manager_constants.mojom b/services/ui/public/interfaces/window_manager_constants.mojom
index 0742fde..f2a2b12 100644
--- a/services/ui/public/interfaces/window_manager_constants.mojom
+++ b/services/ui/public/interfaces/window_manager_constants.mojom
@@ -4,7 +4,7 @@
 
 module ui.mojom;
 
-import "services/ui/public/interfaces/display/display.mojom";
+import "ui/display/mojo/display.mojom";
 import "ui/gfx/geometry/mojo/geometry.mojom";
 
 enum WindowManagerErrorCode {
diff --git a/services/video_capture/OWNERS b/services/video_capture/OWNERS
index 6052c2a..b262bdb5 100644
--- a/services/video_capture/OWNERS
+++ b/services/video_capture/OWNERS
@@ -1,3 +1,6 @@
 chfremer@chromium.org
 emircan@chromium.org
 mcasas@chromium.org
+
+# TEAM: media-capture-and-streams@grotations.appspotmail.com
+# COMPONENT: Blink>GetUserMedia
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json
index 335180d..5fd4c96 100644
--- a/testing/buildbot/chromium.fyi.json
+++ b/testing/buildbot/chromium.fyi.json
@@ -10572,7 +10572,7 @@
         ],
         "swarming": {
           "can_use_on_swarming_builders": true,
-          "shards": 2
+          "shards": 4
         }
       }
     ],
@@ -11141,7 +11141,7 @@
         ],
         "swarming": {
           "can_use_on_swarming_builders": true,
-          "shards": 2
+          "shards": 4
         }
       }
     ],
diff --git a/testing/buildbot/chromium.linux.json b/testing/buildbot/chromium.linux.json
index 5cd3f21..6c88b95 100644
--- a/testing/buildbot/chromium.linux.json
+++ b/testing/buildbot/chromium.linux.json
@@ -3265,7 +3265,7 @@
         ],
         "swarming": {
           "can_use_on_swarming_builders": true,
-          "shards": 2
+          "shards": 4
         }
       }
     ],
@@ -3830,7 +3830,7 @@
         ],
         "swarming": {
           "can_use_on_swarming_builders": true,
-          "shards": 2
+          "shards": 4
         }
       }
     ],
@@ -4201,7 +4201,7 @@
         ],
         "swarming": {
           "can_use_on_swarming_builders": true,
-          "shards": 2
+          "shards": 4
         }
       }
     ]
diff --git a/third_party/WebKit/LayoutTests/SlowTests b/third_party/WebKit/LayoutTests/SlowTests
index db387aed..c0332b5 100644
--- a/third_party/WebKit/LayoutTests/SlowTests
+++ b/third_party/WebKit/LayoutTests/SlowTests
@@ -207,61 +207,6 @@
 crbug.com/453312 html5lib/generated/run-webkit01-data.html [ Slow ]
 crbug.com/453312 html5lib/webkit-resumer.html [ Slow ]
 
-crbug.com/577381 external/wpt/encoding/api-invalid-label.html [ Slow ]
-crbug.com/577381 external/wpt/html/syntax/parsing/html5lib_tests10.html [ Slow ]
-crbug.com/577381 external/wpt/html/syntax/parsing/html5lib_tests21.html [ Slow ]
-crbug.com/577381 external/wpt/html/syntax/parsing/html5lib_webkit01.html [ Slow ]
-crbug.com/577381 external/wpt/html/syntax/parsing/html5lib_domjs-unsafe.html [ Slow ]
-
-crbug.com/490511 external/wpt/html/syntax/parsing/html5lib_entities01.html [ Slow ]
-crbug.com/490511 external/wpt/html/syntax/parsing/html5lib_template.html [ Slow ]
-crbug.com/490511 external/wpt/html/syntax/parsing/html5lib_tests1.html [ Slow ]
-crbug.com/490511 external/wpt/html/syntax/parsing/html5lib_tests16.html [ Slow ]
-crbug.com/490511 external/wpt/html/syntax/parsing/html5lib_tests19.html [ Slow ]
-crbug.com/490511 external/wpt/html/syntax/parsing/html5lib_tests2.html [ Slow ]
-crbug.com/490511 external/wpt/html/syntax/parsing/html5lib_tests20.html [ Slow ]
-
-crbug.com/490939 external/wpt/dom/ranges/Range-cloneContents.html [ Slow ]
-crbug.com/490939 external/wpt/dom/ranges/Range-compareBoundaryPoints.html [ Slow ]
-crbug.com/490939 external/wpt/dom/ranges/Range-comparePoint.html [ Slow ]
-crbug.com/490939 external/wpt/dom/ranges/Range-deleteContents.html [ Slow ]
-crbug.com/490939 external/wpt/dom/ranges/Range-extractContents.html [ Slow ]
-crbug.com/490939 external/wpt/dom/ranges/Range-insertNode.html [ Slow ]
-crbug.com/490939 external/wpt/dom/ranges/Range-isPointInRange.html [ Slow ]
-crbug.com/490939 external/wpt/dom/ranges/Range-mutations-dataChange.html [ Slow ]
-crbug.com/490939 external/wpt/dom/ranges/Range-set.html [ Slow ]
-crbug.com/490939 external/wpt/dom/ranges/Range-surroundContents.html [ Slow ]
-crbug.com/490939 external/wpt/html/dom/reflection-embedded.html [ Slow ]
-crbug.com/490939 external/wpt/html/dom/reflection-forms.html [ Slow ]
-crbug.com/490939 external/wpt/html/dom/reflection-grouping.html [ Slow ]
-crbug.com/490939 external/wpt/html/dom/reflection-metadata.html [ Slow ]
-crbug.com/490939 external/wpt/html/dom/reflection-obsolete.html [ Slow ]
-crbug.com/490939 external/wpt/html/dom/reflection-sections.html [ Slow ]
-crbug.com/490939 external/wpt/html/dom/reflection-tabular.html [ Slow ]
-crbug.com/490939 external/wpt/html/dom/reflection-text.html [ Slow ]
-crbug.com/490939 external/wpt/selection/addRange-00.html [ Slow ]
-crbug.com/490939 external/wpt/selection/addRange-04.html [ Slow ]
-crbug.com/490939 external/wpt/selection/addRange-08.html [ Slow ]
-crbug.com/490939 external/wpt/selection/addRange-12.html [ Slow ]
-crbug.com/490939 external/wpt/selection/addRange-16.html [ Slow ]
-crbug.com/490939 external/wpt/selection/addRange-20.html [ Slow ]
-crbug.com/490939 external/wpt/selection/addRange-24.html [ Slow ]
-crbug.com/490939 external/wpt/selection/addRange-28.html [ Slow ]
-crbug.com/490939 external/wpt/selection/addRange-32.html [ Slow ]
-crbug.com/490939 external/wpt/selection/addRange-36.html [ Slow ]
-crbug.com/490939 external/wpt/selection/addRange-40.html [ Slow ]
-crbug.com/490939 external/wpt/selection/addRange-44.html [ Slow ]
-crbug.com/490939 external/wpt/selection/addRange-48.html [ Slow ]
-crbug.com/490939 external/wpt/selection/addRange-52.html [ Slow ]
-crbug.com/490939 external/wpt/selection/addRange-56.html [ Slow ]
-crbug.com/490939 external/wpt/selection/collapse-00.html [ Slow ]
-crbug.com/490939 external/wpt/selection/collapse-30.html [ Slow ]
-crbug.com/490939 external/wpt/selection/extend-00.html [ Slow ]
-crbug.com/490939 external/wpt/selection/extend-20.html [ Slow ]
-crbug.com/490939 external/wpt/selection/extend-40.html [ Slow ]
-crbug.com/490939 external/wpt/selection/selectAllChildren.html [ Slow ]
-crbug.com/490939 external/wpt/svg/interfaces.html [ Slow ]
-
 # FIXME: These tests might still be buggy and time out. They were marked as Slow on 9/20/2013.
 # Double-check the data after they've been running another week or so.
 webkit.org/b/58193 [ Win7 ] http/tests/local/fileapi/send-sliced-dragged-file.html [ Slow ]
@@ -303,8 +248,6 @@
 crbug.com/492664 external/csswg-test/css-writing-modes-3/text-orientation-script-001o.html [ Slow ]
 
 crbug.com/336481 inspector/jump-to-previous-editing-location.html [ Slow ]
-crbug.com/490511 external/wpt/html/rendering/replaced-elements/svg-embedded-sizing/ [ Slow ]
-crbug.com/490511 external/wpt/html/semantics/forms/textfieldselection/selection.html [ Slow ]
 crbug.com/346259 http/tests/websocket/no-crash-on-cookie-flood.html [ Slow ]
 crbug.com/346259 virtual/mojo-loading/http/tests/websocket/no-crash-on-cookie-flood.html [ Slow ]
 
@@ -356,8 +299,6 @@
 crbug.com/24182 [ Debug ] animations/interpolation/transform-interpolation.html [ Slow ]
 crbug.com/24182 [ Debug ] animations/interpolation/webkit-transform-interpolation.html [ Slow ]
 
-crbug.com/521857 [ Win Debug ] external/wpt/IndexedDB/idbdatabase_createObjectStore10-1000ends.htm [ Slow ]
-
 crbug.com/528419 [ Linux ] inspector/elements/shadow/shadow-host-display-modes.html [ Slow ]
 crbug.com/528419 inspector/elements/styles-2/pseudo-elements.html [ Slow ]
 
@@ -378,8 +319,6 @@
 
 crbug.com/594189 virtual/spv2/fast/overflow/lots-of-sibling-inline-boxes.html [ Slow ]
 
-crbug.com/611442 external/wpt/quirks-mode/hashless-hex-color.html [ Slow ]
-
 crbug.com/614910 virtual/gpu-rasterization/images/pixel-crack-image-background-webkit-transform-scale.html [ Slow ]
 crbug.com/614910 virtual/gpu-rasterization/images/color-profile-filter.html [ Slow ]
 
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations
index 50f44c7..aa796a76 100644
--- a/third_party/WebKit/LayoutTests/TestExpectations
+++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -151,7 +151,6 @@
 crbug.com/674468 [ Trusty ] compositing/reflections/nested-reflection-transition.html [ Pass Failure ]
 
 # ====== Paint team owned tests to here ======
-
 crbug.com/681369 editing/selection/select-delete-in-event-handler.html [ NeedsRebaseline ]
 
 
@@ -1536,7 +1535,7 @@
 crbug.com/479533 accessibility/show-context-menu-shadowdom.html [ Skip ]
 crbug.com/483653 accessibility/scroll-containers.html [ Skip ]
 
-crbug.com/491764 http/tests/inspector/service-workers/user-agent-override.html [ Pass Timeout ]
+crbug.com/491764 http/tests/inspector/service-workers/user-agent-override.html [ Pass Failure ]
 crbug.com/491764 virtual/mojo-loading/http/tests/inspector/service-workers/user-agent-override.html [ Pass Timeout ]
 
 # expected.txt has weird chars that rietveld doesn't handle; will land it manually.
diff --git a/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/idbcursor-continuePrimaryKey.htm b/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/idbcursor-continuePrimaryKey.htm
new file mode 100644
index 0000000..773141c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/idbcursor-continuePrimaryKey.htm
@@ -0,0 +1,134 @@
+<!doctype html>
+<meta charset="utf8">
+<title>IndexedDB: IDBCursor method continuePrimaryKey()</title>
+<link rel="help"
+      href="http://w3c.github.io/IndexedDB/#dom-idbcursor-continueprimarykey">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support.js"></script>
+
+<script>
+'use strict';
+
+indexeddb_test(
+    (t, db, txn) => {
+      const store = db.createObjectStore('store');
+      const index = store.createIndex('index', 'indexKey', {multiEntry: true});
+
+      store.put({indexKey: ['a', 'b']}, 1);
+      store.put({indexKey: ['a', 'b']}, 2);
+      store.put({indexKey: ['a', 'b']}, 3);
+      store.put({indexKey: ['b']}, 4);
+
+      const expectedIndexEntries = [
+        {key: "a", primaryKey: 1},
+        {key: "a", primaryKey: 2},
+        {key: "a", primaryKey: 3},
+        {key: "b", primaryKey: 1},
+        {key: "b", primaryKey: 2},
+        {key: "b", primaryKey: 3},
+        {key: "b", primaryKey: 4},
+      ];
+
+      const request = index.openCursor();
+      request.onerror = t.unreached_func('IDBIndex.openCursor should not fail');
+      request.onsuccess = t.step_func(() => {
+        const cursor = request.result;
+        const expectedEntry = expectedIndexEntries.shift();
+        if (expectedEntry) {
+          assert_equals(cursor.key, expectedEntry.key,
+              'The index entry keys should reflect the object store contents');
+          assert_equals(cursor.primaryKey, expectedEntry.primaryKey,
+              'The index entry primary keys should reflect the object store ' +
+              'contents');
+          cursor.continue();
+        } else {
+          assert_equals(cursor, null,
+              'The index should not have entries that do not reflect the ' +
+              'object store contents');
+        }
+      });
+    },
+    (t, db) => {
+      const testCases = [
+        // Continuing index key
+        { call: cursor => { cursor.continue(); },
+          result: { key: "a", primaryKey: 2 } },
+        { call: cursor => { cursor.continue('a'); },
+          exception: 'DataError' },
+        { call: cursor => { cursor.continue('b'); },
+          result: { key: "b", primaryKey: 1 } },
+        { call: cursor => { cursor.continue('c'); }, result: null },
+
+        // Called w/ index key and primary key:
+        { call: cursor => { cursor.continuePrimaryKey('a', 3); },
+          result: { key: 'a', primaryKey: 3 } },
+        { call: cursor => { cursor.continuePrimaryKey('a', 4); },
+          result: { key: 'b', primaryKey: 1 } },
+        { call: cursor => { cursor.continuePrimaryKey('b', 1); },
+          result: {key: 'b', primaryKey: 1} },
+        { call: cursor => { cursor.continuePrimaryKey('b', 4); },
+          result: {key: 'b', primaryKey: 4} },
+        { call: cursor => { cursor.continuePrimaryKey('b', 5); },
+          result: null },
+        { call: cursor => { cursor.continuePrimaryKey('c', 1); },
+          result: null },
+
+        // Called w/ primary key but w/o index key
+        { call: cursor => { cursor.continuePrimaryKey(null, 1); },
+          exception: 'DataError' },
+        { call: cursor => { cursor.continuePrimaryKey(null, 2); },
+          exception: 'DataError' },
+        { call: cursor => { cursor.continuePrimaryKey(null, 3); },
+          exception: 'DataError' },
+        { call: cursor => { cursor.continuePrimaryKey(null, 4); },
+          exception: 'DataError' },
+        { call: cursor => { cursor.continuePrimaryKey(null, 5); },
+          exception: 'DataError' },
+
+        // Called w/ index key but w/o primary key
+        { call: cursor => { cursor.continuePrimaryKey('a', null); },
+          exception: 'DataError' },
+      ];
+
+      const verifyContinueCalls = () => {
+        if (!testCases.length) {
+          t.done();
+          return;
+        }
+
+        const testCase = testCases.shift();
+
+        const txn = db.transaction('store');
+        txn.oncomplete = t.step_func(verifyContinueCalls);
+
+        const request = txn.objectStore('store').index('index').openCursor();
+        let calledContinue = false;
+        request.onerror =
+            t.unreached_func('IDBIndex.openCursor should not fail');
+        request.onsuccess = t.step_func(() => {
+          const cursor = request.result;
+          if (calledContinue) {
+            if (testCase.result) {
+              assert_equals(cursor.key, testCase.result.key,
+                  `${testCase.call.toString()} - result key`);
+              assert_equals(cursor.primaryKey, testCase.result.primaryKey,
+                  `${testCase.call.toString()} - result primary key`);
+            } else {
+              assert_equals(cursor, null);
+            }
+          } else {
+            calledContinue = true;
+            if('exception' in testCase) {
+              assert_throws(
+                  testCase.exception, () => { testCase.call(cursor); },
+                  testCase.call.toString());
+            } else {
+              testCase.call(cursor);
+            }
+          }
+        });
+      };
+      verifyContinueCalls();
+    });
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/MANIFEST.json b/third_party/WebKit/LayoutTests/external/wpt/MANIFEST.json
index cb71256..c01ee93 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/MANIFEST.json
+++ b/third_party/WebKit/LayoutTests/external/wpt/MANIFEST.json
@@ -17853,6 +17853,12 @@
      {}
     ]
    ],
+   "IndexedDB/idbcursor-continuePrimaryKey.htm": [
+    [
+     "/IndexedDB/idbcursor-continuePrimaryKey.htm",
+     {}
+    ]
+   ],
    "IndexedDB/idbcursor-continuePrimaryKey-exception-order.htm": [
     [
      "/IndexedDB/idbcursor-continuePrimaryKey-exception-order.htm",
diff --git a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-misc/timeline-aggregated-details-expected.txt b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-misc/timeline-aggregated-details-expected.txt
index d74f19f..9d0e3d08a 100644
--- a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-misc/timeline-aggregated-details-expected.txt
+++ b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-misc/timeline-aggregated-details-expected.txt
@@ -504,7 +504,7 @@
         l: 0.100  0.100
           f: 0.100  0.100
 
-Events
+EventLog
   Function Call: 8.875  30.000
     a: 0.000  1.000
       b: 0.000  1.000
diff --git a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-misc/timeline-aggregated-details.html b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-misc/timeline-aggregated-details.html
index 7621debd..786aa8f 100644
--- a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-misc/timeline-aggregated-details.html
+++ b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-misc/timeline-aggregated-details.html
@@ -600,18 +600,18 @@
     var groupByEnum = Timeline.AggregatedTimelineTreeView.GroupBy;
     for (var grouping in groupByEnum) {
         var groupingValue = groupByEnum[grouping];
-        testEventTree(Timeline.TimelineDetailsView.Tab.CallTree, groupingValue);
-        testEventTree(Timeline.TimelineDetailsView.Tab.BottomUp, groupingValue);
+        testEventTree(Timeline.TimelinePanel.ViewMode.CallTree, groupingValue);
+        testEventTree(Timeline.TimelinePanel.ViewMode.BottomUp, groupingValue);
     }
 
-    testEventTree(Timeline.TimelineDetailsView.Tab.Events);
+    testEventTree(Timeline.TimelinePanel.ViewMode.EventLog);
     InspectorTest.completeTest();
 
     function testEventTree(type, grouping)
     {
         InspectorTest.addResult("");
-        timeline._detailsView._tabbedPane.selectTab(type, true);
-        var callTree = timeline._detailsView._rangeDetailViews.get(type);
+        timeline._tabbedPane.selectTab(type, true);
+        var callTree = timeline._currentViews[0]._treeView;
         if (grouping) {
             InspectorTest.addResult(type + "  Group by: " + grouping);
             callTree._groupByCombobox.select(callTree._groupByCombobox.options().find(x => x.value === grouping));
diff --git a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/paint-profiler-update.html b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/paint-profiler-update.html
index 0d446eea..8e47d9a5 100644
--- a/third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/paint-profiler-update.html
+++ b/third_party/WebKit/LayoutTests/inspector/tracing/timeline-paint/paint-profiler-update.html
@@ -46,14 +46,16 @@
         if (paintEvents.length < 2)
              throw new Error("FAIL: Expect at least two paint events");
 
-        InspectorTest.addSniffer(panel._detailsView, "_appendDetailsTabsForTraceEventAndShowDetails", onRecordDetailsReady, false);
-        panel.select(Timeline.TimelineSelection.fromTraceEvent(paintEvents[0]), Timeline.TimelineDetailsView.Tab.PaintProfiler);
+        InspectorTest.addSniffer(panel._flameChart._detailsView, "_appendDetailsTabsForTraceEventAndShowDetails", onRecordDetailsReady, false);
+        panel.select(Timeline.TimelineSelection.fromTraceEvent(paintEvents[0]));
     }
 
     function onRecordDetailsReady()
     {
         var updateCount = 0;
-        var paintProfilerView = panel._detailsView._lazyPaintProfilerView._paintProfilerView;
+
+        panel._flameChart._detailsView._tabbedPane.selectTab(Timeline.TimelineDetailsView.Tab.PaintProfiler, true);
+        var paintProfilerView = panel._flameChart._detailsView._lazyPaintProfilerView._paintProfilerView;
         InspectorTest.addSniffer(paintProfilerView, "_update", onPaintProfilerUpdate, true);
 
         function onPaintProfilerUpdate()
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/text/combining-character-queries-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/text/combining-character-queries-expected.png
index 01fbb5f3..c6244169 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/text/combining-character-queries-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/text/combining-character-queries-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/text/combining-character-queries-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/svg/text/combining-character-queries-expected.txt
index e4d7e7a..9624b4b 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/svg/text/combining-character-queries-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/linux/svg/text/combining-character-queries-expected.txt
@@ -185,38 +185,6 @@
           LayoutSVGText {text} at (358,130) size 4x10 contains 1 chunk(s)
             LayoutSVGInlineText {#text} at (358,130) size 4x10
               chunk 1 (middle anchor) text run 1 at (358.00,138.00) startOffset 0 endOffset 1 width 4.00: "8"
-          LayoutSVGRect {rect} at (50,161) size 11x49 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=50.00] [y=161.00] [width=11.00] [height=49.00]
-          LayoutSVGText {text} at (53.50,207) size 4x10 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (53.50,207) size 4x10
-              chunk 1 (middle anchor) text run 1 at (53.50,215.00) startOffset 0 endOffset 1 width 4.00: "0"
-          LayoutSVGRect {rect} at (61,161) size 4.50x49 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=61.00] [y=161.00] [width=4.50] [height=49.00]
-          LayoutSVGText {text} at (61.25,207) size 4x10 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (61.25,207) size 4x10
-              chunk 1 (middle anchor) text run 1 at (61.25,215.00) startOffset 0 endOffset 1 width 4.00: "1"
-          LayoutSVGRect {rect} at (65.50,161) size 4.50x49 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=65.50] [y=161.00] [width=4.50] [height=49.00]
-          LayoutSVGText {text} at (65.75,207) size 4x10 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (65.75,207) size 4x10
-              chunk 1 (middle anchor) text run 1 at (65.75,215.00) startOffset 0 endOffset 1 width 4.00: "2"
-          LayoutSVGRect {rect} at (70,161) size 10x49 [fill={[type=SOLID] [color=#008000] [opacity=0.30]}] [x=70.00] [y=161.00] [width=10.00] [height=49.00]
-          LayoutSVGText {text} at (73,207) size 4x10 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (73,207) size 4x10
-              chunk 1 (middle anchor) text run 1 at (73.00,215.00) startOffset 0 endOffset 1 width 4.00: "3"
-          LayoutSVGRect {rect} at (80,161) size 18x49 [fill={[type=SOLID] [color=#0000FF] [opacity=0.30]}] [x=80.00] [y=161.00] [width=18.00] [height=49.00]
-          LayoutSVGText {text} at (87,207) size 4x10 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (87,207) size 4x10
-              chunk 1 (middle anchor) text run 1 at (87.00,215.00) startOffset 0 endOffset 1 width 4.00: "4"
-          LayoutSVGRect {rect} at (98,161) size 3.33x49 [fill={[type=SOLID] [color=#4B0082] [opacity=0.30]}] [x=98.00] [y=161.00] [width=3.33] [height=49.00]
-          LayoutSVGText {text} at (97.66,207) size 4x10 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (97.66,207) size 4x10
-              chunk 1 (middle anchor) text run 1 at (97.67,215.00) startOffset 0 endOffset 1 width 4.00: "5"
-          LayoutSVGRect {rect} at (101.33,161) size 3.33x49 [fill={[type=SOLID] [color=#EE82EE] [opacity=0.30]}] [x=101.33] [y=161.00] [width=3.33] [height=49.00]
-          LayoutSVGText {text} at (100.98,207) size 4x10 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (100.98,207) size 4x10
-              chunk 1 (middle anchor) text run 1 at (101.00,215.00) startOffset 0 endOffset 1 width 4.00: "6"
-          LayoutSVGRect {rect} at (104.67,161) size 3.33x49 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=104.67] [y=161.00] [width=3.33] [height=49.00]
-          LayoutSVGText {text} at (104.33,207) size 4x10 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (104.33,207) size 4x10
-              chunk 1 (middle anchor) text run 1 at (104.33,215.00) startOffset 0 endOffset 1 width 4.00: "7"
           LayoutSVGRect {rect} at (200,168) size 11x40 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=200.00] [y=168.00] [width=11.00] [height=40.00]
           LayoutSVGText {text} at (203.50,205) size 4x10 contains 1 chunk(s)
             LayoutSVGInlineText {#text} at (203.50,205) size 4x10
@@ -498,9 +466,6 @@
             chunk 1 text run 1 at (382.00,125.00) startOffset 0 endOffset 1 width 0.00 RTL: "\x{200F}"
             chunk 1 text run 1 at (382.00,125.00) startOffset 0 endOffset 1 width 18.00: "a"
             chunk 1 text run 1 at (400.00,125.00) startOffset 0 endOffset 1 width 0.00 RTL: "\x{200F}"
-        LayoutSVGText {text} at (50,144.81) size 73x65.19 contains 1 chunk(s)
-          LayoutSVGInlineText {#text} at (50,144.81) size 73x65.19
-            chunk 1 text run 1 at (50.00,200.00) startOffset 0 endOffset 8 width 58.00: "fi\x{30C} fi\x{30C}\x{30C}"
         LayoutSVGText {text} at (200,168) size 81.05x40 contains 1 chunk(s)
           LayoutSVGInlineText {#text} at (200,168) size 81.05x40
             chunk 1 text run 1 at (200.00,200.00) startOffset 0 endOffset 9 width 59.37: "fi\x{30C} ffi\x{30C}\x{30C}"
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/svg/text/combining-character-queries-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/svg/text/combining-character-queries-expected.png
index 7da67ea7..c1e5a7e 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/svg/text/combining-character-queries-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/svg/text/combining-character-queries-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/svg/text/combining-character-queries-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/svg/text/combining-character-queries-expected.txt
index 758467e4..13d3818 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/svg/text/combining-character-queries-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/svg/text/combining-character-queries-expected.txt
@@ -185,38 +185,6 @@
           LayoutSVGText {text} at (355.63,131) size 4x9 contains 1 chunk(s)
             LayoutSVGInlineText {#text} at (355.63,131) size 4x9
               chunk 1 (middle anchor) text run 1 at (355.63,138.00) startOffset 0 endOffset 1 width 4.00: "8"
-          LayoutSVGRect {rect} at (50,161) size 5.97x55 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=50.00] [y=161.00] [width=5.97] [height=55.00]
-          LayoutSVGText {text} at (50.98,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (50.98,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (50.99,221.00) startOffset 0 endOffset 1 width 4.00: "0"
-          LayoutSVGRect {rect} at (55.97,161) size 16.27x55 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=55.97] [y=161.00] [width=16.27] [height=55.00]
-          LayoutSVGText {text} at (62.09,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (62.09,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (62.11,221.00) startOffset 0 endOffset 1 width 4.00: "1"
-          LayoutSVGRect {rect} at (72.24,161) size 16.27x55 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=72.24] [y=161.00] [width=16.27] [height=55.00]
-          LayoutSVGText {text} at (78.36,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (78.36,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (78.37,221.00) startOffset 0 endOffset 1 width 4.00: "2"
-          LayoutSVGRect {rect} at (88.50,161) size 9.72x55 [fill={[type=SOLID] [color=#008000] [opacity=0.30]}] [x=88.50] [y=161.00] [width=9.72] [height=55.00]
-          LayoutSVGText {text} at (91.36,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (91.36,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (91.37,221.00) startOffset 0 endOffset 1 width 4.00: "3"
-          LayoutSVGRect {rect} at (98.23,161) size 5.97x55 [fill={[type=SOLID] [color=#0000FF] [opacity=0.30]}] [x=98.23] [y=161.00] [width=5.97] [height=55.00]
-          LayoutSVGText {text} at (99.20,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (99.20,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (99.21,221.00) startOffset 0 endOffset 1 width 4.00: "4"
-          LayoutSVGRect {rect} at (104.20,161) size 10.84x55 [fill={[type=SOLID] [color=#4B0082] [opacity=0.30]}] [x=104.20] [y=161.00] [width=10.84] [height=55.00]
-          LayoutSVGText {text} at (107.61,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (107.61,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (107.62,221.00) startOffset 0 endOffset 1 width 4.00: "5"
-          LayoutSVGRect {rect} at (115.04,161) size 10.84x55 [fill={[type=SOLID] [color=#EE82EE] [opacity=0.30]}] [x=115.04] [y=161.00] [width=10.84] [height=55.00]
-          LayoutSVGText {text} at (118.45,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (118.45,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (118.47,221.00) startOffset 0 endOffset 1 width 4.00: "6"
-          LayoutSVGRect {rect} at (125.89,161) size 10.84x55 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=125.89] [y=161.00] [width=10.84] [height=55.00]
-          LayoutSVGText {text} at (129.30,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (129.30,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (129.31,221.00) startOffset 0 endOffset 1 width 4.00: "7"
           LayoutSVGRect {rect} at (200,169) size 11.66x40 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=200.00] [y=169.00] [width=11.66] [height=40.00]
           LayoutSVGText {text} at (203.81,207) size 4x9 contains 1 chunk(s)
             LayoutSVGInlineText {#text} at (203.81,207) size 4x9
@@ -498,9 +466,6 @@
             chunk 1 text run 1 at (380.53,125.00) startOffset 0 endOffset 1 width 0.00 RTL: "\x{200F}"
             chunk 1 text run 1 at (380.53,125.00) startOffset 0 endOffset 1 width 19.47: "a"
             chunk 1 text run 1 at (400.00,125.00) startOffset 0 endOffset 1 width 0.00 RTL: "\x{200F}"
-        LayoutSVGText {text} at (42.19,160.08) size 70.64x55.91 contains 1 chunk(s)
-          LayoutSVGInlineText {#text} at (42.19,160.08) size 70.64x55.91
-            chunk 1 text run 1 at (50.00,200.00) startOffset 0 endOffset 8 width 62.84: "fi\x{30C} fi\x{30C}\x{30C}"
         LayoutSVGText {text} at (200,169) size 63.75x40 contains 1 chunk(s)
           LayoutSVGInlineText {#text} at (200,169) size 63.75x40
             chunk 1 text run 1 at (200.00,200.00) startOffset 0 endOffset 9 width 63.20: "fi\x{30C} ffi\x{30C}\x{30C}"
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/svg/text/combining-character-queries-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/svg/text/combining-character-queries-expected.png
index 58f240a..4eb1912 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/svg/text/combining-character-queries-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/svg/text/combining-character-queries-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/svg/text/combining-character-queries-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/svg/text/combining-character-queries-expected.txt
index 7105aacb..eee0dd1 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/svg/text/combining-character-queries-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/svg/text/combining-character-queries-expected.txt
@@ -185,38 +185,6 @@
           LayoutSVGText {text} at (356.14,131) size 4x9 contains 1 chunk(s)
             LayoutSVGInlineText {#text} at (356.14,131) size 4x9
               chunk 1 (middle anchor) text run 1 at (356.15,138.00) startOffset 0 endOffset 1 width 4.00: "8"
-          LayoutSVGRect {rect} at (50,161) size 5.97x55 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=50.00] [y=161.00] [width=5.97] [height=55.00]
-          LayoutSVGText {text} at (50.98,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (50.98,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (50.99,221.00) startOffset 0 endOffset 1 width 4.00: "0"
-          LayoutSVGRect {rect} at (55.97,161) size 12.36x55 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=55.97] [y=161.00] [width=12.36] [height=55.00]
-          LayoutSVGText {text} at (60.14,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (60.14,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (60.15,221.00) startOffset 0 endOffset 1 width 4.00: "1"
-          LayoutSVGRect {rect} at (68.33,161) size 12.36x55 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=68.33] [y=161.00] [width=12.36] [height=55.00]
-          LayoutSVGText {text} at (72.50,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (72.50,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (72.51,221.00) startOffset 0 endOffset 1 width 4.00: "2"
-          LayoutSVGRect {rect} at (80.69,161) size 9.72x55 [fill={[type=SOLID] [color=#008000] [opacity=0.30]}] [x=80.69] [y=161.00] [width=9.72] [height=55.00]
-          LayoutSVGText {text} at (83.55,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (83.55,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (83.56,221.00) startOffset 0 endOffset 1 width 4.00: "3"
-          LayoutSVGRect {rect} at (90.42,161) size 5.97x55 [fill={[type=SOLID] [color=#0000FF] [opacity=0.30]}] [x=90.42] [y=161.00] [width=5.97] [height=55.00]
-          LayoutSVGText {text} at (91.39,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (91.39,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (91.40,221.00) startOffset 0 endOffset 1 width 4.00: "4"
-          LayoutSVGRect {rect} at (96.39,161) size 8.24x55 [fill={[type=SOLID] [color=#4B0082] [opacity=0.30]}] [x=96.39] [y=161.00] [width=8.24] [height=55.00]
-          LayoutSVGText {text} at (98.50,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (98.50,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (98.51,221.00) startOffset 0 endOffset 1 width 4.00: "5"
-          LayoutSVGRect {rect} at (104.63,161) size 8.24x55 [fill={[type=SOLID] [color=#EE82EE] [opacity=0.30]}] [x=104.63] [y=161.00] [width=8.24] [height=55.00]
-          LayoutSVGText {text} at (106.75,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (106.75,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (106.75,221.00) startOffset 0 endOffset 1 width 4.00: "6"
-          LayoutSVGRect {rect} at (112.87,161) size 8.24x55 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=112.87] [y=161.00] [width=8.24] [height=55.00]
-          LayoutSVGText {text} at (114.98,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (114.98,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (114.99,221.00) startOffset 0 endOffset 1 width 4.00: "7"
           LayoutSVGRect {rect} at (200,169) size 11.66x40 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=200.00] [y=169.00] [width=11.66] [height=40.00]
           LayoutSVGText {text} at (203.81,207) size 4x9 contains 1 chunk(s)
             LayoutSVGInlineText {#text} at (203.81,207) size 4x9
@@ -498,9 +466,6 @@
             chunk 1 text run 1 at (380.53,125.00) startOffset 0 endOffset 1 width 0.00 RTL: "\x{200F}"
             chunk 1 text run 1 at (380.53,125.00) startOffset 0 endOffset 1 width 19.47: "a"
             chunk 1 text run 1 at (400.00,125.00) startOffset 0 endOffset 1 width 0.00 RTL: "\x{200F}"
-        LayoutSVGText {text} at (42.19,160.08) size 61.73x55.91 contains 1 chunk(s)
-          LayoutSVGInlineText {#text} at (42.19,160.08) size 61.73x55.91
-            chunk 1 text run 1 at (50.00,200.00) startOffset 0 endOffset 8 width 47.22: "fi\x{30C} fi\x{30C}\x{30C}"
         LayoutSVGText {text} at (200,169) size 63.75x40 contains 1 chunk(s)
           LayoutSVGInlineText {#text} at (200,169) size 63.75x40
             chunk 1 text run 1 at (200.00,200.00) startOffset 0 endOffset 9 width 63.20: "fi\x{30C} ffi\x{30C}\x{30C}"
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/svg/text/combining-character-queries-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/svg/text/combining-character-queries-expected.png
deleted file mode 100644
index 1da037c..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-retina/svg/text/combining-character-queries-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/svg/text/combining-character-queries-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-retina/svg/text/combining-character-queries-expected.txt
deleted file mode 100644
index 1171824..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac-retina/svg/text/combining-character-queries-expected.txt
+++ /dev/null
@@ -1,542 +0,0 @@
-layer at (0,0) size 800x600
-  LayoutView at (0,0) size 800x600
-layer at (0,0) size 800x520
-  LayoutBlockFlow {HTML} at (0,0) size 800x520
-    LayoutBlockFlow {BODY} at (8,8) size 784x504
-      LayoutSVGRoot {svg} at (0,0) size 600x500
-        LayoutSVGContainer {g} at (48.72,11) size 383.82x362
-          LayoutSVGRect {rect} at (50,11) size 17.96x55 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=50.00] [y=11.00] [width=17.96] [height=55.00]
-          LayoutSVGText {text} at (56.97,64) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (56.97,64) size 4x9
-              chunk 1 (middle anchor) text run 1 at (56.98,71.00) startOffset 0 endOffset 1 width 4.00: "0"
-          LayoutSVGRect {rect} at (67.96,11) size 8.49x55 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=67.96] [y=11.00] [width=8.49] [height=55.00]
-          LayoutSVGText {text} at (70.20,64) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (70.20,64) size 4x9
-              chunk 1 (middle anchor) text run 1 at (70.20,71.00) startOffset 0 endOffset 1 width 4.00: "1"
-          LayoutSVGRect {rect} at (76.45,11) size 8.49x55 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=76.45] [y=11.00] [width=8.49] [height=55.00]
-          LayoutSVGText {text} at (78.69,64) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (78.69,64) size 4x9
-              chunk 1 (middle anchor) text run 1 at (78.69,71.00) startOffset 0 endOffset 1 width 4.00: "2"
-          LayoutSVGRect {rect} at (84.93,11) size 4.47x55 [fill={[type=SOLID] [color=#008000] [opacity=0.30]}] [x=84.93] [y=11.00] [width=4.47] [height=55.00]
-          LayoutSVGText {text} at (85.16,64) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (85.16,64) size 4x9
-              chunk 1 (middle anchor) text run 1 at (85.16,71.00) startOffset 0 endOffset 1 width 4.00: "3"
-          LayoutSVGRect {rect} at (89.40,11) size 4.47x55 [fill={[type=SOLID] [color=#0000FF] [opacity=0.30]}] [x=89.40] [y=11.00] [width=4.47] [height=55.00]
-          LayoutSVGText {text} at (89.63,64) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (89.63,64) size 4x9
-              chunk 1 (middle anchor) text run 1 at (89.63,71.00) startOffset 0 endOffset 1 width 4.00: "4"
-          LayoutSVGRect {rect} at (93.86,11) size 4.47x55 [fill={[type=SOLID] [color=#4B0082] [opacity=0.30]}] [x=93.86] [y=11.00] [width=4.47] [height=55.00]
-          LayoutSVGText {text} at (94.09,64) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (94.09,64) size 4x9
-              chunk 1 (middle anchor) text run 1 at (94.10,71.00) startOffset 0 endOffset 1 width 4.00: "5"
-          LayoutSVGRect {rect} at (200,19) size 15.53x40 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=200.00] [y=19.00] [width=15.53] [height=40.00]
-          LayoutSVGText {text} at (205.77,57) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (205.77,57) size 4x9
-              chunk 1 (middle anchor) text run 1 at (205.77,64.00) startOffset 0 endOffset 1 width 4.00: "0"
-          LayoutSVGRect {rect} at (215.53,19) size 8.75x40 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=215.53] [y=19.00] [width=8.75] [height=40.00]
-          LayoutSVGText {text} at (217.91,57) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (217.91,57) size 4x9
-              chunk 1 (middle anchor) text run 1 at (217.91,64.00) startOffset 0 endOffset 1 width 4.00: "1"
-          LayoutSVGRect {rect} at (224.28,19) size 8.75x40 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=224.28] [y=19.00] [width=8.75] [height=40.00]
-          LayoutSVGText {text} at (226.66,57) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (226.66,57) size 4x9
-              chunk 1 (middle anchor) text run 1 at (226.66,64.00) startOffset 0 endOffset 1 width 4.00: "2"
-          LayoutSVGRect {rect} at (233.03,19) size 5.18x40 [fill={[type=SOLID] [color=#008000] [opacity=0.30]}] [x=233.03] [y=19.00] [width=5.18] [height=40.00]
-          LayoutSVGText {text} at (233.61,57) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (233.61,57) size 4x9
-              chunk 1 (middle anchor) text run 1 at (233.62,64.00) startOffset 0 endOffset 1 width 4.00: "3"
-          LayoutSVGRect {rect} at (238.21,19) size 5.18x40 [fill={[type=SOLID] [color=#0000FF] [opacity=0.30]}] [x=238.21] [y=19.00] [width=5.18] [height=40.00]
-          LayoutSVGText {text} at (238.80,57) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (238.80,57) size 4x9
-              chunk 1 (middle anchor) text run 1 at (238.80,64.00) startOffset 0 endOffset 1 width 4.00: "4"
-          LayoutSVGRect {rect} at (243.39,19) size 5.18x40 [fill={[type=SOLID] [color=#4B0082] [opacity=0.30]}] [x=243.39] [y=19.00] [width=5.18] [height=40.00]
-          LayoutSVGText {text} at (243.97,57) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (243.97,57) size 4x9
-              chunk 1 (middle anchor) text run 1 at (243.98,64.00) startOffset 0 endOffset 1 width 4.00: "5"
-          LayoutSVGRect {rect} at (350,18) size 19.47x40 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=350.00] [y=18.00] [width=19.47] [height=40.00]
-          LayoutSVGText {text} at (357.72,56) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (357.72,56) size 4x9
-              chunk 1 (middle anchor) text run 1 at (357.73,63.00) startOffset 0 endOffset 1 width 4.00: "0"
-          LayoutSVGRect {rect} at (369.47,18) size 9.73x40 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=369.47] [y=18.00] [width=9.73] [height=40.00]
-          LayoutSVGText {text} at (372.33,56) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (372.33,56) size 4x9
-              chunk 1 (middle anchor) text run 1 at (372.33,63.00) startOffset 0 endOffset 1 width 4.00: "1"
-          LayoutSVGRect {rect} at (379.20,18) size 9.73x40 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=379.20] [y=18.00] [width=9.73] [height=40.00]
-          LayoutSVGText {text} at (382.06,56) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (382.06,56) size 4x9
-              chunk 1 (middle anchor) text run 1 at (382.06,63.00) startOffset 0 endOffset 1 width 4.00: "2"
-          LayoutSVGRect {rect} at (388.93,18) size 6.19x40 [fill={[type=SOLID] [color=#008000] [opacity=0.30]}] [x=388.93] [y=18.00] [width=6.19] [height=40.00]
-          LayoutSVGText {text} at (390.02,56) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (390.02,56) size 4x9
-              chunk 1 (middle anchor) text run 1 at (390.03,63.00) startOffset 0 endOffset 1 width 4.00: "3"
-          LayoutSVGRect {rect} at (395.12,18) size 6.19x40 [fill={[type=SOLID] [color=#0000FF] [opacity=0.30]}] [x=395.12] [y=18.00] [width=6.19] [height=40.00]
-          LayoutSVGText {text} at (396.22,56) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (396.22,56) size 4x9
-              chunk 1 (middle anchor) text run 1 at (396.22,63.00) startOffset 0 endOffset 1 width 4.00: "4"
-          LayoutSVGRect {rect} at (401.32,18) size 6.19x40 [fill={[type=SOLID] [color=#4B0082] [opacity=0.30]}] [x=401.32] [y=18.00] [width=6.19] [height=40.00]
-          LayoutSVGText {text} at (402.41,56) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (402.41,56) size 4x9
-              chunk 1 (middle anchor) text run 1 at (402.41,63.00) startOffset 0 endOffset 1 width 4.00: "5"
-          LayoutSVGRect {rect} at (100,86) size 0x55 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=100.00] [y=86.00] [width=0.00] [height=55.00]
-          LayoutSVGText {text} at (97.98,139) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (97.98,139) size 4x9
-              chunk 1 (middle anchor) text run 1 at (98.00,146.00) startOffset 0 endOffset 1 width 4.00: "0"
-          LayoutSVGRect {rect} at (82.04,86) size 17.96x55 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=82.04] [y=86.00] [width=17.96] [height=55.00]
-          LayoutSVGText {text} at (89.02,139) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (89.02,139) size 4x9
-              chunk 1 (middle anchor) text run 1 at (89.02,146.00) startOffset 0 endOffset 1 width 4.00: "1"
-          LayoutSVGRect {rect} at (82.04,86) size 0x55 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=82.04] [y=86.00] [width=0.00] [height=55.00]
-          LayoutSVGText {text} at (80.03,139) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (80.03,139) size 4x9
-              chunk 1 (middle anchor) text run 1 at (80.04,146.00) startOffset 0 endOffset 1 width 4.00: "2"
-          LayoutSVGRect {rect} at (65.07,86) size 8.49x55 [fill={[type=SOLID] [color=#008000] [opacity=0.30]}] [x=65.07] [y=86.00] [width=8.49] [height=55.00]
-          LayoutSVGText {text} at (67.30,139) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (67.30,139) size 4x9
-              chunk 1 (middle anchor) text run 1 at (67.31,146.00) startOffset 0 endOffset 1 width 4.00: "3"
-          LayoutSVGRect {rect} at (73.55,86) size 8.49x55 [fill={[type=SOLID] [color=#0000FF] [opacity=0.30]}] [x=73.55] [y=86.00] [width=8.49] [height=55.00]
-          LayoutSVGText {text} at (75.78,139) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (75.78,139) size 4x9
-              chunk 1 (middle anchor) text run 1 at (75.80,146.00) startOffset 0 endOffset 1 width 4.00: "4"
-          LayoutSVGRect {rect} at (65.07,86) size 0x55 [fill={[type=SOLID] [color=#4B0082] [opacity=0.30]}] [x=65.07] [y=86.00] [width=0.00] [height=55.00]
-          LayoutSVGText {text} at (63.06,139) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (63.06,139) size 4x9
-              chunk 1 (middle anchor) text run 1 at (63.07,146.00) startOffset 0 endOffset 1 width 4.00: "5"
-          LayoutSVGRect {rect} at (51.67,86) size 4.47x55 [fill={[type=SOLID] [color=#EE82EE] [opacity=0.30]}] [x=51.67] [y=86.00] [width=4.47] [height=55.00]
-          LayoutSVGText {text} at (51.89,139) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (51.89,139) size 4x9
-              chunk 1 (middle anchor) text run 1 at (51.90,146.00) startOffset 0 endOffset 1 width 4.00: "6"
-          LayoutSVGRect {rect} at (56.14,86) size 4.47x55 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=56.14] [y=86.00] [width=4.47] [height=55.00]
-          LayoutSVGText {text} at (56.36,139) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (56.36,139) size 4x9
-              chunk 1 (middle anchor) text run 1 at (56.37,146.00) startOffset 0 endOffset 1 width 4.00: "7"
-          LayoutSVGRect {rect} at (60.60,86) size 4.47x55 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=60.60] [y=86.00] [width=4.47] [height=55.00]
-          LayoutSVGText {text} at (60.83,139) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (60.83,139) size 4x9
-              chunk 1 (middle anchor) text run 1 at (60.84,146.00) startOffset 0 endOffset 1 width 4.00: "8"
-          LayoutSVGRect {rect} at (250,94) size 0x40 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=250.00] [y=94.00] [width=0.00] [height=40.00]
-          LayoutSVGText {text} at (248,132) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (248,132) size 4x9
-              chunk 1 (middle anchor) text run 1 at (248.00,139.00) startOffset 0 endOffset 1 width 4.00: "0"
-          LayoutSVGRect {rect} at (234.47,94) size 15.53x40 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=234.47] [y=94.00] [width=15.53] [height=40.00]
-          LayoutSVGText {text} at (240.22,132) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (240.22,132) size 4x9
-              chunk 1 (middle anchor) text run 1 at (240.23,139.00) startOffset 0 endOffset 1 width 4.00: "1"
-          LayoutSVGRect {rect} at (234.47,94) size 0x40 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=234.47] [y=94.00] [width=0.00] [height=40.00]
-          LayoutSVGText {text} at (232.45,132) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (232.45,132) size 4x9
-              chunk 1 (middle anchor) text run 1 at (232.47,139.00) startOffset 0 endOffset 1 width 4.00: "2"
-          LayoutSVGRect {rect} at (216.97,94) size 8.75x40 [fill={[type=SOLID] [color=#008000] [opacity=0.30]}] [x=216.97] [y=94.00] [width=8.75] [height=40.00]
-          LayoutSVGText {text} at (219.33,132) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (219.33,132) size 4x9
-              chunk 1 (middle anchor) text run 1 at (219.34,139.00) startOffset 0 endOffset 1 width 4.00: "3"
-          LayoutSVGRect {rect} at (225.72,94) size 8.75x40 [fill={[type=SOLID] [color=#0000FF] [opacity=0.30]}] [x=225.72] [y=94.00] [width=8.75] [height=40.00]
-          LayoutSVGText {text} at (228.08,132) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (228.08,132) size 4x9
-              chunk 1 (middle anchor) text run 1 at (228.09,139.00) startOffset 0 endOffset 1 width 4.00: "4"
-          LayoutSVGRect {rect} at (216.97,94) size 0x40 [fill={[type=SOLID] [color=#4B0082] [opacity=0.30]}] [x=216.97] [y=94.00] [width=0.00] [height=40.00]
-          LayoutSVGText {text} at (214.95,132) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (214.95,132) size 4x9
-              chunk 1 (middle anchor) text run 1 at (214.97,139.00) startOffset 0 endOffset 1 width 4.00: "5"
-          LayoutSVGRect {rect} at (201.43,94) size 5.18x40 [fill={[type=SOLID] [color=#EE82EE] [opacity=0.30]}] [x=201.43] [y=94.00] [width=5.18] [height=40.00]
-          LayoutSVGText {text} at (202.02,132) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (202.02,132) size 4x9
-              chunk 1 (middle anchor) text run 1 at (202.02,139.00) startOffset 0 endOffset 1 width 4.00: "6"
-          LayoutSVGRect {rect} at (206.61,94) size 5.18x40 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=206.61] [y=94.00] [width=5.18] [height=40.00]
-          LayoutSVGText {text} at (207.19,132) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (207.19,132) size 4x9
-              chunk 1 (middle anchor) text run 1 at (207.20,139.00) startOffset 0 endOffset 1 width 4.00: "7"
-          LayoutSVGRect {rect} at (211.79,94) size 5.18x40 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=211.79] [y=94.00] [width=5.18] [height=40.00]
-          LayoutSVGText {text} at (212.38,132) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (212.38,132) size 4x9
-              chunk 1 (middle anchor) text run 1 at (212.38,139.00) startOffset 0 endOffset 1 width 4.00: "8"
-          LayoutSVGRect {rect} at (400,93) size 0x40 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=400.00] [y=93.00] [width=0.00] [height=40.00]
-          LayoutSVGText {text} at (398,131) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (398,131) size 4x9
-              chunk 1 (middle anchor) text run 1 at (398.00,138.00) startOffset 0 endOffset 1 width 4.00: "0"
-          LayoutSVGRect {rect} at (380.53,93) size 19.47x40 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=380.53] [y=93.00] [width=19.47] [height=40.00]
-          LayoutSVGText {text} at (388.27,131) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (388.27,131) size 4x9
-              chunk 1 (middle anchor) text run 1 at (388.27,138.00) startOffset 0 endOffset 1 width 4.00: "1"
-          LayoutSVGRect {rect} at (380.53,93) size 0x40 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=380.53] [y=93.00] [width=0.00] [height=40.00]
-          LayoutSVGText {text} at (378.53,131) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (378.53,131) size 4x9
-              chunk 1 (middle anchor) text run 1 at (378.53,138.00) startOffset 0 endOffset 1 width 4.00: "2"
-          LayoutSVGRect {rect} at (360.73,93) size 9.90x40 [fill={[type=SOLID] [color=#008000] [opacity=0.30]}] [x=360.73] [y=93.00] [width=9.90] [height=40.00]
-          LayoutSVGText {text} at (363.67,131) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (363.67,131) size 4x9
-              chunk 1 (middle anchor) text run 1 at (363.68,138.00) startOffset 0 endOffset 1 width 4.00: "3"
-          LayoutSVGRect {rect} at (370.63,93) size 9.90x40 [fill={[type=SOLID] [color=#0000FF] [opacity=0.30]}] [x=370.63] [y=93.00] [width=9.90] [height=40.00]
-          LayoutSVGText {text} at (373.58,131) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (373.58,131) size 4x9
-              chunk 1 (middle anchor) text run 1 at (373.58,138.00) startOffset 0 endOffset 1 width 4.00: "4"
-          LayoutSVGRect {rect} at (360.73,93) size 0x40 [fill={[type=SOLID] [color=#4B0082] [opacity=0.30]}] [x=360.73] [y=93.00] [width=0.00] [height=40.00]
-          LayoutSVGText {text} at (358.72,131) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (358.72,131) size 4x9
-              chunk 1 (middle anchor) text run 1 at (358.73,138.00) startOffset 0 endOffset 1 width 4.00: "5"
-          LayoutSVGRect {rect} at (342.15,93) size 6.19x40 [fill={[type=SOLID] [color=#EE82EE] [opacity=0.30]}] [x=342.15] [y=93.00] [width=6.19] [height=40.00]
-          LayoutSVGText {text} at (343.23,131) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (343.23,131) size 4x9
-              chunk 1 (middle anchor) text run 1 at (343.25,138.00) startOffset 0 endOffset 1 width 4.00: "6"
-          LayoutSVGRect {rect} at (348.34,93) size 6.19x40 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=348.34] [y=93.00] [width=6.19] [height=40.00]
-          LayoutSVGText {text} at (349.44,131) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (349.44,131) size 4x9
-              chunk 1 (middle anchor) text run 1 at (349.44,138.00) startOffset 0 endOffset 1 width 4.00: "7"
-          LayoutSVGRect {rect} at (354.54,93) size 6.19x40 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=354.54] [y=93.00] [width=6.19] [height=40.00]
-          LayoutSVGText {text} at (355.63,131) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (355.63,131) size 4x9
-              chunk 1 (middle anchor) text run 1 at (355.63,138.00) startOffset 0 endOffset 1 width 4.00: "8"
-          LayoutSVGRect {rect} at (50,161) size 5.97x55 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=50.00] [y=161.00] [width=5.97] [height=55.00]
-          LayoutSVGText {text} at (50.98,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (50.98,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (50.99,221.00) startOffset 0 endOffset 1 width 4.00: "0"
-          LayoutSVGRect {rect} at (55.97,161) size 16.27x55 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=55.97] [y=161.00] [width=16.27] [height=55.00]
-          LayoutSVGText {text} at (62.09,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (62.09,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (62.11,221.00) startOffset 0 endOffset 1 width 4.00: "1"
-          LayoutSVGRect {rect} at (72.24,161) size 16.27x55 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=72.24] [y=161.00] [width=16.27] [height=55.00]
-          LayoutSVGText {text} at (78.36,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (78.36,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (78.37,221.00) startOffset 0 endOffset 1 width 4.00: "2"
-          LayoutSVGRect {rect} at (88.50,161) size 9.72x55 [fill={[type=SOLID] [color=#008000] [opacity=0.30]}] [x=88.50] [y=161.00] [width=9.72] [height=55.00]
-          LayoutSVGText {text} at (91.36,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (91.36,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (91.37,221.00) startOffset 0 endOffset 1 width 4.00: "3"
-          LayoutSVGRect {rect} at (98.23,161) size 5.97x55 [fill={[type=SOLID] [color=#0000FF] [opacity=0.30]}] [x=98.23] [y=161.00] [width=5.97] [height=55.00]
-          LayoutSVGText {text} at (99.20,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (99.20,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (99.21,221.00) startOffset 0 endOffset 1 width 4.00: "4"
-          LayoutSVGRect {rect} at (104.20,161) size 16.05x55 [fill={[type=SOLID] [color=#4B0082] [opacity=0.30]}] [x=104.20] [y=161.00] [width=16.05] [height=55.00]
-          LayoutSVGText {text} at (110.22,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (110.22,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (110.23,221.00) startOffset 0 endOffset 1 width 4.00: "5"
-          LayoutSVGRect {rect} at (120.25,161) size 16.05x55 [fill={[type=SOLID] [color=#EE82EE] [opacity=0.30]}] [x=120.25] [y=161.00] [width=16.05] [height=55.00]
-          LayoutSVGText {text} at (126.27,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (126.27,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (126.28,221.00) startOffset 0 endOffset 1 width 4.00: "6"
-          LayoutSVGRect {rect} at (136.30,161) size 16.05x55 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=136.30] [y=161.00] [width=16.05] [height=55.00]
-          LayoutSVGText {text} at (142.31,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (142.31,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (142.33,221.00) startOffset 0 endOffset 1 width 4.00: "7"
-          LayoutSVGRect {rect} at (200,169) size 11.66x40 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=200.00] [y=169.00] [width=11.66] [height=40.00]
-          LayoutSVGText {text} at (203.81,207) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (203.81,207) size 4x9
-              chunk 1 (middle anchor) text run 1 at (203.83,214.00) startOffset 0 endOffset 1 width 4.00: "0"
-          LayoutSVGRect {rect} at (211.66,169) size 4.86x40 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=211.66] [y=169.00] [width=4.86] [height=40.00]
-          LayoutSVGText {text} at (212.08,207) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (212.08,207) size 4x9
-              chunk 1 (middle anchor) text run 1 at (212.09,214.00) startOffset 0 endOffset 1 width 4.00: "1"
-          LayoutSVGRect {rect} at (216.52,169) size 4.86x40 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=216.52] [y=169.00] [width=4.86] [height=40.00]
-          LayoutSVGText {text} at (216.94,207) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (216.94,207) size 4x9
-              chunk 1 (middle anchor) text run 1 at (216.95,214.00) startOffset 0 endOffset 1 width 4.00: "2"
-          LayoutSVGRect {rect} at (221.38,169) size 8.75x40 [fill={[type=SOLID] [color=#008000] [opacity=0.30]}] [x=221.38] [y=169.00] [width=8.75] [height=40.00]
-          LayoutSVGText {text} at (223.75,207) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (223.75,207) size 4x9
-              chunk 1 (middle anchor) text run 1 at (223.75,214.00) startOffset 0 endOffset 1 width 4.00: "3"
-          LayoutSVGRect {rect} at (230.13,169) size 11.04x40 [fill={[type=SOLID] [color=#0000FF] [opacity=0.30]}] [x=230.13] [y=169.00] [width=11.04] [height=40.00]
-          LayoutSVGText {text} at (233.64,207) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (233.64,207) size 4x9
-              chunk 1 (middle anchor) text run 1 at (233.65,214.00) startOffset 0 endOffset 1 width 4.00: "4"
-          LayoutSVGRect {rect} at (241.17,169) size 12.30x40 [fill={[type=SOLID] [color=#4B0082] [opacity=0.30]}] [x=241.17] [y=169.00] [width=12.30] [height=40.00]
-          LayoutSVGText {text} at (245.31,207) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (245.31,207) size 4x9
-              chunk 1 (middle anchor) text run 1 at (245.32,214.00) startOffset 0 endOffset 1 width 4.00: "5"
-          LayoutSVGRect {rect} at (253.47,169) size 3.24x40 [fill={[type=SOLID] [color=#EE82EE] [opacity=0.30]}] [x=253.47] [y=169.00] [width=3.24] [height=40.00]
-          LayoutSVGText {text} at (253.09,207) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (253.09,207) size 4x9
-              chunk 1 (middle anchor) text run 1 at (253.09,214.00) startOffset 0 endOffset 1 width 4.00: "6"
-          LayoutSVGRect {rect} at (256.72,169) size 3.24x40 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=256.72] [y=169.00] [width=3.24] [height=40.00]
-          LayoutSVGText {text} at (256.33,207) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (256.33,207) size 4x9
-              chunk 1 (middle anchor) text run 1 at (256.34,214.00) startOffset 0 endOffset 1 width 4.00: "7"
-          LayoutSVGRect {rect} at (259.96,169) size 3.24x40 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=259.96] [y=169.00] [width=3.24] [height=40.00]
-          LayoutSVGText {text} at (259.56,207) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (259.56,207) size 4x9
-              chunk 1 (middle anchor) text run 1 at (259.58,214.00) startOffset 0 endOffset 1 width 4.00: "8"
-          LayoutSVGRect {rect} at (350,168) size 9.72x40 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=350.00] [y=168.00] [width=9.72] [height=40.00]
-          LayoutSVGText {text} at (352.86,206) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (352.86,206) size 4x9
-              chunk 1 (middle anchor) text run 1 at (352.86,213.00) startOffset 0 endOffset 1 width 4.00: "0"
-          LayoutSVGRect {rect} at (359.72,168) size 4.86x40 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=359.72] [y=168.00] [width=4.86] [height=40.00]
-          LayoutSVGText {text} at (360.14,206) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (360.14,206) size 4x9
-              chunk 1 (middle anchor) text run 1 at (360.16,213.00) startOffset 0 endOffset 1 width 4.00: "1"
-          LayoutSVGRect {rect} at (364.59,168) size 4.86x40 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=364.59] [y=168.00] [width=4.86] [height=40.00]
-          LayoutSVGText {text} at (365.02,206) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (365.02,206) size 4x9
-              chunk 1 (middle anchor) text run 1 at (365.02,213.00) startOffset 0 endOffset 1 width 4.00: "2"
-          LayoutSVGRect {rect} at (369.45,168) size 9.72x40 [fill={[type=SOLID] [color=#008000] [opacity=0.30]}] [x=369.45] [y=168.00] [width=9.72] [height=40.00]
-          LayoutSVGText {text} at (372.30,206) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (372.30,206) size 4x9
-              chunk 1 (middle anchor) text run 1 at (372.31,213.00) startOffset 0 endOffset 1 width 4.00: "3"
-          LayoutSVGRect {rect} at (379.17,168) size 9.11x40 [fill={[type=SOLID] [color=#0000FF] [opacity=0.30]}] [x=379.17] [y=168.00] [width=9.11] [height=40.00]
-          LayoutSVGText {text} at (381.72,206) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (381.72,206) size 4x9
-              chunk 1 (middle anchor) text run 1 at (381.73,213.00) startOffset 0 endOffset 1 width 4.00: "4"
-          LayoutSVGRect {rect} at (388.28,168) size 9.74x40 [fill={[type=SOLID] [color=#4B0082] [opacity=0.30]}] [x=388.28] [y=168.00] [width=9.74] [height=40.00]
-          LayoutSVGText {text} at (391.14,206) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (391.14,206) size 4x9
-              chunk 1 (middle anchor) text run 1 at (391.15,213.00) startOffset 0 endOffset 1 width 4.00: "5"
-          LayoutSVGRect {rect} at (398.02,168) size 4.94x40 [fill={[type=SOLID] [color=#EE82EE] [opacity=0.30]}] [x=398.02] [y=168.00] [width=4.94] [height=40.00]
-          LayoutSVGText {text} at (398.48,206) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (398.48,206) size 4x9
-              chunk 1 (middle anchor) text run 1 at (398.49,213.00) startOffset 0 endOffset 1 width 4.00: "6"
-          LayoutSVGRect {rect} at (402.96,168) size 4.94x40 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=402.96] [y=168.00] [width=4.94] [height=40.00]
-          LayoutSVGText {text} at (403.42,206) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (403.42,206) size 4x9
-              chunk 1 (middle anchor) text run 1 at (403.43,213.00) startOffset 0 endOffset 1 width 4.00: "7"
-          LayoutSVGRect {rect} at (407.90,168) size 4.94x40 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=407.90] [y=168.00] [width=4.94] [height=40.00]
-          LayoutSVGText {text} at (408.36,206) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (408.36,206) size 4x9
-              chunk 1 (middle anchor) text run 1 at (408.37,213.00) startOffset 0 endOffset 1 width 4.00: "8"
-          LayoutSVGRect {rect} at (50,236) size 1.45x55 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=50.00] [y=236.00] [width=1.45] [height=55.00]
-          LayoutSVGText {text} at (48.72,289) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (48.72,289) size 4x9
-              chunk 1 (middle anchor) text run 1 at (48.73,296.00) startOffset 0 endOffset 1 width 4.00: "0"
-          LayoutSVGRect {rect} at (51.45,236) size 15.24x55 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=51.45] [y=236.00] [width=15.24] [height=55.00]
-          LayoutSVGText {text} at (57.06,289) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (57.06,289) size 4x9
-              chunk 1 (middle anchor) text run 1 at (57.07,296.00) startOffset 0 endOffset 1 width 4.00: "1"
-          LayoutSVGRect {rect} at (66.69,236) size 15.24x55 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=66.69] [y=236.00] [width=15.24] [height=55.00]
-          LayoutSVGText {text} at (72.30,289) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (72.30,289) size 4x9
-              chunk 1 (middle anchor) text run 1 at (72.31,296.00) startOffset 0 endOffset 1 width 4.00: "2"
-          LayoutSVGRect {rect} at (109.47,236) size 7.10x55 [fill={[type=SOLID] [color=#008000] [opacity=0.30]}] [x=109.47] [y=236.00] [width=7.10] [height=55.00]
-          LayoutSVGText {text} at (111.02,289) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (111.02,289) size 4x9
-              chunk 1 (middle anchor) text run 1 at (111.02,296.00) startOffset 0 endOffset 1 width 4.00: "3"
-          LayoutSVGRect {rect} at (102.37,236) size 7.10x55 [fill={[type=SOLID] [color=#0000FF] [opacity=0.30]}] [x=102.37] [y=236.00] [width=7.10] [height=55.00]
-          LayoutSVGText {text} at (103.91,289) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (103.91,289) size 4x9
-              chunk 1 (middle anchor) text run 1 at (103.92,296.00) startOffset 0 endOffset 1 width 4.00: "4"
-          LayoutSVGRect {rect} at (92.15,236) size 10.22x55 [fill={[type=SOLID] [color=#4B0082] [opacity=0.30]}] [x=92.15] [y=236.00] [width=10.22] [height=55.00]
-          LayoutSVGText {text} at (95.25,289) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (95.25,289) size 4x9
-              chunk 1 (middle anchor) text run 1 at (95.26,296.00) startOffset 0 endOffset 1 width 4.00: "5"
-          LayoutSVGRect {rect} at (81.92,236) size 10.22x55 [fill={[type=SOLID] [color=#EE82EE] [opacity=0.30]}] [x=81.92] [y=236.00] [width=10.22] [height=55.00]
-          LayoutSVGText {text} at (85.03,289) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (85.03,289) size 4x9
-              chunk 1 (middle anchor) text run 1 at (85.03,296.00) startOffset 0 endOffset 1 width 4.00: "6"
-          LayoutSVGRect {rect} at (116.58,236) size 1.45x55 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=116.58] [y=236.00] [width=1.45] [height=55.00]
-          LayoutSVGText {text} at (115.30,289) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (115.30,289) size 4x9
-              chunk 1 (middle anchor) text run 1 at (115.30,296.00) startOffset 0 endOffset 1 width 4.00: "7"
-          LayoutSVGRect {rect} at (118.03,236) size 15.24x55 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=118.03] [y=236.00] [width=15.24] [height=55.00]
-          LayoutSVGText {text} at (123.64,289) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (123.64,289) size 4x9
-              chunk 1 (middle anchor) text run 1 at (123.65,296.00) startOffset 0 endOffset 1 width 4.00: "8"
-          LayoutSVGRect {rect} at (133.26,236) size 15.24x55 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=133.26] [y=236.00] [width=15.24] [height=55.00]
-          LayoutSVGText {text} at (138.88,289) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (138.88,289) size 4x9
-              chunk 1 (middle anchor) text run 1 at (138.88,296.00) startOffset 0 endOffset 1 width 4.00: "9"
-          LayoutSVGRect {rect} at (200,244) size 11.04x40 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=200.00] [y=244.00] [width=11.04] [height=40.00]
-          LayoutSVGText {text} at (203.52,282) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (203.52,282) size 4x9
-              chunk 1 (middle anchor) text run 1 at (203.52,289.00) startOffset 0 endOffset 1 width 4.00: "0"
-          LayoutSVGRect {rect} at (211.04,244) size 5.83x40 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=211.04] [y=244.00] [width=5.83] [height=40.00]
-          LayoutSVGText {text} at (211.95,282) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (211.95,282) size 4x9
-              chunk 1 (middle anchor) text run 1 at (211.95,289.00) startOffset 0 endOffset 1 width 4.00: "1"
-          LayoutSVGRect {rect} at (216.87,244) size 5.83x40 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=216.87] [y=244.00] [width=5.83] [height=40.00]
-          LayoutSVGText {text} at (217.78,282) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (217.78,282) size 4x9
-              chunk 1 (middle anchor) text run 1 at (217.78,289.00) startOffset 0 endOffset 1 width 4.00: "2"
-          LayoutSVGRect {rect} at (250.24,244) size 7.10x40 [fill={[type=SOLID] [color=#008000] [opacity=0.30]}] [x=250.24] [y=244.00] [width=7.10] [height=40.00]
-          LayoutSVGText {text} at (251.78,282) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (251.78,282) size 4x9
-              chunk 1 (middle anchor) text run 1 at (251.79,289.00) startOffset 0 endOffset 1 width 4.00: "3"
-          LayoutSVGRect {rect} at (243.14,244) size 7.10x40 [fill={[type=SOLID] [color=#0000FF] [opacity=0.30]}] [x=243.14] [y=244.00] [width=7.10] [height=40.00]
-          LayoutSVGText {text} at (244.69,282) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (244.69,282) size 4x9
-              chunk 1 (middle anchor) text run 1 at (244.69,289.00) startOffset 0 endOffset 1 width 4.00: "4"
-          LayoutSVGRect {rect} at (232.92,244) size 10.22x40 [fill={[type=SOLID] [color=#4B0082] [opacity=0.30]}] [x=232.92] [y=244.00] [width=10.22] [height=40.00]
-          LayoutSVGText {text} at (236.02,282) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (236.02,282) size 4x9
-              chunk 1 (middle anchor) text run 1 at (236.03,289.00) startOffset 0 endOffset 1 width 4.00: "5"
-          LayoutSVGRect {rect} at (222.70,244) size 10.22x40 [fill={[type=SOLID] [color=#EE82EE] [opacity=0.30]}] [x=222.70] [y=244.00] [width=10.22] [height=40.00]
-          LayoutSVGText {text} at (225.80,282) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (225.80,282) size 4x9
-              chunk 1 (middle anchor) text run 1 at (225.81,289.00) startOffset 0 endOffset 1 width 4.00: "6"
-          LayoutSVGRect {rect} at (257.35,244) size 11.04x40 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=257.35] [y=244.00] [width=11.04] [height=40.00]
-          LayoutSVGText {text} at (260.86,282) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (260.86,282) size 4x9
-              chunk 1 (middle anchor) text run 1 at (260.87,289.00) startOffset 0 endOffset 1 width 4.00: "7"
-          LayoutSVGRect {rect} at (268.39,244) size 5.83x40 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=268.39] [y=244.00] [width=5.83] [height=40.00]
-          LayoutSVGText {text} at (269.30,282) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (269.30,282) size 4x9
-              chunk 1 (middle anchor) text run 1 at (269.30,289.00) startOffset 0 endOffset 1 width 4.00: "8"
-          LayoutSVGRect {rect} at (274.21,244) size 5.83x40 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=274.21] [y=244.00] [width=5.83] [height=40.00]
-          LayoutSVGText {text} at (275.13,282) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (275.13,282) size 4x9
-              chunk 1 (middle anchor) text run 1 at (275.13,289.00) startOffset 0 endOffset 1 width 4.00: "9"
-          LayoutSVGRect {rect} at (350,243) size 9.40x40 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=350.00] [y=243.00] [width=9.40] [height=40.00]
-          LayoutSVGText {text} at (352.69,281) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (352.69,281) size 4x9
-              chunk 1 (middle anchor) text run 1 at (352.70,288.00) startOffset 0 endOffset 1 width 4.00: "0"
-          LayoutSVGRect {rect} at (359.40,243) size 7.27x40 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=359.40] [y=243.00] [width=7.27] [height=40.00]
-          LayoutSVGText {text} at (361.03,281) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (361.03,281) size 4x9
-              chunk 1 (middle anchor) text run 1 at (361.04,288.00) startOffset 0 endOffset 1 width 4.00: "1"
-          LayoutSVGRect {rect} at (366.67,243) size 7.27x40 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=366.67] [y=243.00] [width=7.27] [height=40.00]
-          LayoutSVGText {text} at (368.30,281) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (368.30,281) size 4x9
-              chunk 1 (middle anchor) text run 1 at (368.31,288.00) startOffset 0 endOffset 1 width 4.00: "2"
-          LayoutSVGRect {rect} at (401.49,243) size 7.10x40 [fill={[type=SOLID] [color=#008000] [opacity=0.30]}] [x=401.49] [y=243.00] [width=7.10] [height=40.00]
-          LayoutSVGText {text} at (403.03,281) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (403.03,281) size 4x9
-              chunk 1 (middle anchor) text run 1 at (403.04,288.00) startOffset 0 endOffset 1 width 4.00: "3"
-          LayoutSVGRect {rect} at (394.39,243) size 7.10x40 [fill={[type=SOLID] [color=#0000FF] [opacity=0.30]}] [x=394.39] [y=243.00] [width=7.10] [height=40.00]
-          LayoutSVGText {text} at (395.94,281) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (395.94,281) size 4x9
-              chunk 1 (middle anchor) text run 1 at (395.94,288.00) startOffset 0 endOffset 1 width 4.00: "4"
-          LayoutSVGRect {rect} at (384.16,243) size 10.22x40 [fill={[type=SOLID] [color=#4B0082] [opacity=0.30]}] [x=384.16] [y=243.00] [width=10.22] [height=40.00]
-          LayoutSVGText {text} at (387.27,281) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (387.27,281) size 4x9
-              chunk 1 (middle anchor) text run 1 at (387.28,288.00) startOffset 0 endOffset 1 width 4.00: "5"
-          LayoutSVGRect {rect} at (373.94,243) size 10.22x40 [fill={[type=SOLID] [color=#EE82EE] [opacity=0.30]}] [x=373.94] [y=243.00] [width=10.22] [height=40.00]
-          LayoutSVGText {text} at (377.05,281) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (377.05,281) size 4x9
-              chunk 1 (middle anchor) text run 1 at (377.05,288.00) startOffset 0 endOffset 1 width 4.00: "6"
-          LayoutSVGRect {rect} at (408.59,243) size 9.40x40 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=408.59] [y=243.00] [width=9.40] [height=40.00]
-          LayoutSVGText {text} at (411.28,281) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (411.28,281) size 4x9
-              chunk 1 (middle anchor) text run 1 at (411.29,288.00) startOffset 0 endOffset 1 width 4.00: "7"
-          LayoutSVGRect {rect} at (418,243) size 7.27x40 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=417.99] [y=243.00] [width=7.27] [height=40.00]
-          LayoutSVGText {text} at (419.63,281) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (419.63,281) size 4x9
-              chunk 1 (middle anchor) text run 1 at (419.63,288.00) startOffset 0 endOffset 1 width 4.00: "8"
-          LayoutSVGRect {rect} at (425.27,243) size 7.27x40 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=425.27] [y=243.00] [width=7.27] [height=40.00]
-          LayoutSVGText {text} at (426.89,281) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (426.89,281) size 4x9
-              chunk 1 (middle anchor) text run 1 at (426.90,288.00) startOffset 0 endOffset 1 width 4.00: "9"
-          LayoutSVGRect {rect} at (50,311) size 15.62x55 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=50.00] [y=311.00] [width=15.62] [height=55.00]
-          LayoutSVGText {text} at (55.80,364) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (55.80,364) size 4x9
-              chunk 1 (middle anchor) text run 1 at (55.81,371.00) startOffset 0 endOffset 1 width 4.00: "0"
-          LayoutSVGRect {rect} at (65.62,311) size 49.07x55 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=65.62] [y=311.00] [width=49.07] [height=55.00]
-          LayoutSVGText {text} at (88.14,364) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (88.14,364) size 4x9
-              chunk 1 (middle anchor) text run 1 at (88.15,371.00) startOffset 0 endOffset 1 width 4.00: "1"
-          LayoutSVGRect {rect} at (114.69,311) size 25.28x55 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=114.69] [y=311.00] [width=25.28] [height=55.00]
-          LayoutSVGText {text} at (125.31,364) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (125.31,364) size 4x9
-              chunk 1 (middle anchor) text run 1 at (125.32,371.00) startOffset 0 endOffset 1 width 4.00: "2"
-          LayoutSVGRect {rect} at (139.96,311) size 25.28x55 [fill={[type=SOLID] [color=#008000] [opacity=0.30]}] [x=139.96] [y=311.00] [width=25.28] [height=55.00]
-          LayoutSVGText {text} at (150.59,364) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (150.59,364) size 4x9
-              chunk 1 (middle anchor) text run 1 at (150.60,371.00) startOffset 0 endOffset 1 width 4.00: "3"
-          LayoutSVGRect {rect} at (200,319) size 4.38x40 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=200.00] [y=319.00] [width=4.38] [height=40.00]
-          LayoutSVGText {text} at (200.19,357) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (200.19,357) size 4x9
-              chunk 1 (middle anchor) text run 1 at (200.19,364.00) startOffset 0 endOffset 1 width 4.00: "0"
-          LayoutSVGRect {rect} at (204.38,319) size 4.38x40 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=204.38] [y=319.00] [width=4.38] [height=40.00]
-          LayoutSVGText {text} at (204.56,357) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (204.56,357) size 4x9
-              chunk 1 (middle anchor) text run 1 at (204.56,364.00) startOffset 0 endOffset 1 width 4.00: "1"
-          LayoutSVGRect {rect} at (208.75,319) size 49.07x40 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=208.75] [y=319.00] [width=49.07] [height=40.00]
-          LayoutSVGText {text} at (231.28,357) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (231.28,357) size 4x9
-              chunk 1 (middle anchor) text run 1 at (231.28,364.00) startOffset 0 endOffset 1 width 4.00: "2"
-          LayoutSVGRect {rect} at (257.82,319) size 10.75x40 [fill={[type=SOLID] [color=#008000] [opacity=0.30]}] [x=257.82] [y=319.00] [width=10.75] [height=40.00]
-          LayoutSVGText {text} at (261.19,357) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (261.19,357) size 4x9
-              chunk 1 (middle anchor) text run 1 at (261.19,364.00) startOffset 0 endOffset 1 width 4.00: "3"
-          LayoutSVGRect {rect} at (268.57,319) size 10.75x40 [fill={[type=SOLID] [color=#0000FF] [opacity=0.30]}] [x=268.57] [y=319.00] [width=10.75] [height=40.00]
-          LayoutSVGText {text} at (271.94,357) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (271.94,357) size 4x9
-              chunk 1 (middle anchor) text run 1 at (271.94,364.00) startOffset 0 endOffset 1 width 4.00: "4"
-          LayoutSVGRect {rect} at (350,318) size 5.02x40 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=350.00] [y=318.00] [width=5.02] [height=40.00]
-          LayoutSVGText {text} at (350.50,356) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (350.50,356) size 4x9
-              chunk 1 (middle anchor) text run 1 at (350.51,363.00) startOffset 0 endOffset 1 width 4.00: "0"
-          LayoutSVGRect {rect} at (355.02,318) size 5.02x40 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=355.02] [y=318.00] [width=5.02] [height=40.00]
-          LayoutSVGText {text} at (355.53,356) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (355.53,356) size 4x9
-              chunk 1 (middle anchor) text run 1 at (355.54,363.00) startOffset 0 endOffset 1 width 4.00: "1"
-          LayoutSVGRect {rect} at (360.05,318) size 49.07x40 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=360.05] [y=318.00] [width=49.07] [height=40.00]
-          LayoutSVGText {text} at (382.58,356) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (382.58,356) size 4x9
-              chunk 1 (middle anchor) text run 1 at (382.58,363.00) startOffset 0 endOffset 1 width 4.00: "2"
-          LayoutSVGRect {rect} at (409.12,318) size 7.88x40 [fill={[type=SOLID] [color=#008000] [opacity=0.30]}] [x=409.12] [y=318.00] [width=7.88] [height=40.00]
-          LayoutSVGText {text} at (411.05,356) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (411.05,356) size 4x9
-              chunk 1 (middle anchor) text run 1 at (411.05,363.00) startOffset 0 endOffset 1 width 4.00: "3"
-          LayoutSVGRect {rect} at (417,318) size 7.88x40 [fill={[type=SOLID] [color=#0000FF] [opacity=0.30]}] [x=416.99] [y=318.00] [width=7.88] [height=40.00]
-          LayoutSVGText {text} at (418.92,356) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (418.92,356) size 4x9
-              chunk 1 (middle anchor) text run 1 at (418.93,363.00) startOffset 0 endOffset 1 width 4.00: "4"
-        LayoutSVGText {text} at (50,10.09) size 49.50x55.89 contains 1 chunk(s)
-          LayoutSVGInlineText {#text} at (50,10.09) size 49.50x55.89
-            chunk 1 text run 1 at (50.00,50.00) startOffset 0 endOffset 6 width 48.33: "ab\x{30C}c\x{30C}\x{30C}"
-        LayoutSVGText {text} at (200,15.56) size 48.56x43.42 contains 1 chunk(s)
-          LayoutSVGInlineText {#text} at (200,15.56) size 48.56x43.42
-            chunk 1 text run 1 at (200.00,50.00) startOffset 0 endOffset 6 width 48.57: "ab\x{30C}c\x{30C}\x{30C}"
-        LayoutSVGText {text} at (350,16.72) size 57.50x41.27 contains 1 chunk(s)
-          LayoutSVGInlineText {#text} at (350,16.72) size 57.50x41.27
-            chunk 1 text run 1 at (350.00,50.00) startOffset 0 endOffset 6 width 57.51: "ab\x{30C}c\x{30C}\x{30C}"
-        LayoutSVGText {text} at (51.66,86) size 48.53x55 contains 1 chunk(s)
-          LayoutSVGInlineText {#text} at (51.66,86) size 48.53x55
-            chunk 1 text run 1 at (51.67,125.00) startOffset 0 endOffset 3 width 13.40: "c\x{30C}\x{30C}"
-            chunk 1 text run 1 at (65.07,125.00) startOffset 0 endOffset 1 width 0.00 RTL: "\x{200F}"
-            chunk 1 text run 1 at (65.07,125.00) startOffset 0 endOffset 2 width 16.97: "b\x{30C}"
-            chunk 1 text run 1 at (82.04,125.00) startOffset 0 endOffset 1 width 0.00 RTL: "\x{200F}"
-            chunk 1 text run 1 at (82.04,125.00) startOffset 0 endOffset 1 width 17.96: "a"
-            chunk 1 text run 1 at (100.00,125.00) startOffset 0 endOffset 1 width 0.00 RTL: "\x{200F}"
-        LayoutSVGText {text} at (201.42,94) size 48.56x40 contains 1 chunk(s)
-          LayoutSVGInlineText {#text} at (201.42,94) size 48.56x40
-            chunk 1 text run 1 at (201.43,125.00) startOffset 0 endOffset 3 width 15.53: "c\x{30C}\x{30C}"
-            chunk 1 text run 1 at (216.97,125.00) startOffset 0 endOffset 1 width 0.00 RTL: "\x{200F}"
-            chunk 1 text run 1 at (216.97,125.00) startOffset 0 endOffset 2 width 17.50: "b\x{30C}"
-            chunk 1 text run 1 at (234.47,125.00) startOffset 0 endOffset 1 width 0.00 RTL: "\x{200F}"
-            chunk 1 text run 1 at (234.47,125.00) startOffset 0 endOffset 1 width 15.53: "a"
-            chunk 1 text run 1 at (250.00,125.00) startOffset 0 endOffset 1 width 0.00 RTL: "\x{200F}"
-        LayoutSVGText {text} at (342.14,93) size 57.84x40 contains 1 chunk(s)
-          LayoutSVGInlineText {#text} at (342.14,93) size 57.84x40
-            chunk 1 text run 1 at (342.15,125.00) startOffset 0 endOffset 3 width 18.58: "c\x{30C}\x{30C}"
-            chunk 1 text run 1 at (360.73,125.00) startOffset 0 endOffset 1 width 0.00 RTL: "\x{200F}"
-            chunk 1 text run 1 at (360.73,125.00) startOffset 0 endOffset 2 width 19.81: "b\x{30C}"
-            chunk 1 text run 1 at (380.53,125.00) startOffset 0 endOffset 1 width 0.00 RTL: "\x{200F}"
-            chunk 1 text run 1 at (380.53,125.00) startOffset 0 endOffset 1 width 19.47: "a"
-            chunk 1 text run 1 at (400.00,125.00) startOffset 0 endOffset 1 width 0.00 RTL: "\x{200F}"
-        LayoutSVGText {text} at (42.19,160.08) size 94.27x55.91 contains 1 chunk(s)
-          LayoutSVGInlineText {#text} at (42.19,160.08) size 94.27x55.91
-            chunk 1 text run 1 at (50.00,200.00) startOffset 0 endOffset 8 width 78.46: "fi\x{30C} fi\x{30C}\x{30C}"
-        LayoutSVGText {text} at (200,169) size 63.75x40 contains 1 chunk(s)
-          LayoutSVGInlineText {#text} at (200,169) size 63.75x40
-            chunk 1 text run 1 at (200.00,200.00) startOffset 0 endOffset 9 width 63.20: "fi\x{30C} ffi\x{30C}\x{30C}"
-        LayoutSVGText {text} at (350,168) size 62.83x40 contains 1 chunk(s)
-          LayoutSVGInlineText {#text} at (350,168) size 62.83x40
-            chunk 1 text run 1 at (350.00,200.00) startOffset 0 endOffset 9 width 62.84: "fi\x{30C} ffi\x{30C}\x{30C}"
-        LayoutSVGText {text} at (42.19,236) size 103.41x55 contains 1 chunk(s)
-          LayoutSVGInlineText {#text} at (42.19,236) size 103.41x55
-            chunk 1 text run 1 at (50.00,275.00) startOffset 0 endOffset 3 width 29.02: "ff\x{30C}"
-            chunk 1 text run 1 at (81.92,275.00) startOffset 0 endOffset 4 width 34.65 RTL: "\x{640}\x{640}\x{644}\x{627}"
-            chunk 1 text run 1 at (116.58,275.00) startOffset 0 endOffset 3 width 29.02: "ff\x{30C}"
-        LayoutSVGText {text} at (200,244) size 81.78x40 contains 1 chunk(s)
-          LayoutSVGInlineText {#text} at (200,244) size 81.78x40
-            chunk 1 text run 1 at (200.00,275.00) startOffset 0 endOffset 3 width 22.70: "ff\x{30C}"
-            chunk 1 text run 1 at (222.70,275.00) startOffset 0 endOffset 4 width 34.65 RTL: "\x{640}\x{640}\x{644}\x{627}"
-            chunk 1 text run 1 at (257.35,275.00) startOffset 0 endOffset 3 width 22.70: "ff\x{30C}"
-        LayoutSVGText {text} at (350,243) size 82.53x40 contains 1 chunk(s)
-          LayoutSVGInlineText {#text} at (350,243) size 82.53x40
-            chunk 1 text run 1 at (350.00,275.00) startOffset 0 endOffset 3 width 23.94: "ff\x{30C}"
-            chunk 1 text run 1 at (373.94,275.00) startOffset 0 endOffset 4 width 34.65 RTL: "\x{640}\x{640}\x{644}\x{627}"
-            chunk 1 text run 1 at (408.59,275.00) startOffset 0 endOffset 3 width 23.94: "ff\x{30C}"
-        LayoutSVGText {text} at (50,311) size 115.22x55.13 contains 1 chunk(s)
-          LayoutSVGInlineText {#text} at (50,311) size 115.22x55.13
-            chunk 1 text run 1 at (50.00,350.00) startOffset 0 endOffset 1 width 15.62: "\x{30C}"
-            chunk 1 text run 1 at (65.62,350.00) startOffset 0 endOffset 1 width 49.07 RTL: "\x{FDB0}"
-            chunk 1 text run 1 at (114.69,350.00) startOffset 0 endOffset 2 width 50.55: "i\x{333}"
-        LayoutSVGText {text} at (200,319) size 79.30x47.13 contains 1 chunk(s)
-          LayoutSVGInlineText {#text} at (200,319) size 79.30x47.13
-            chunk 1 text run 1 at (200.00,350.00) startOffset 0 endOffset 2 width 8.75: ".\x{30C}"
-            chunk 1 text run 1 at (208.75,350.00) startOffset 0 endOffset 1 width 49.07 RTL: "\x{FDB0}"
-            chunk 1 text run 1 at (257.82,350.00) startOffset 0 endOffset 2 width 21.50: "i\x{333}"
-        LayoutSVGText {text} at (350,318) size 74.86x48.13 contains 1 chunk(s)
-          LayoutSVGInlineText {#text} at (350,318) size 74.86x48.13
-            chunk 1 text run 1 at (350.00,350.00) startOffset 0 endOffset 2 width 14.83: ".\x{30C}"
-            chunk 1 text run 1 at (360.05,350.00) startOffset 0 endOffset 1 width 49.07 RTL: "\x{FDB0}"
-            chunk 1 text run 1 at (409.12,350.00) startOffset 0 endOffset 2 width 15.76: "i\x{333}"
-      LayoutText {#text} at (0,0) size 0x0
-      LayoutText {#text} at (0,0) size 0x0
-      LayoutText {#text} at (0,0) size 0x0
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/text/combining-character-queries-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/text/combining-character-queries-expected.png
index ac8bc98..af46429 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/text/combining-character-queries-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/text/combining-character-queries-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/text/combining-character-queries-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/svg/text/combining-character-queries-expected.txt
index b95f3fa..7dfb65ad 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/svg/text/combining-character-queries-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/mac/svg/text/combining-character-queries-expected.txt
@@ -185,38 +185,6 @@
           LayoutSVGText {text} at (355.63,131) size 4x9 contains 1 chunk(s)
             LayoutSVGInlineText {#text} at (355.63,131) size 4x9
               chunk 1 (middle anchor) text run 1 at (355.63,138.00) startOffset 0 endOffset 1 width 4.00: "8"
-          LayoutSVGRect {rect} at (50,161) size 5.97x55 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=50.00] [y=161.00] [width=5.97] [height=55.00]
-          LayoutSVGText {text} at (50.98,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (50.98,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (50.99,221.00) startOffset 0 endOffset 1 width 4.00: "0"
-          LayoutSVGRect {rect} at (55.97,161) size 16.27x55 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=55.97] [y=161.00] [width=16.27] [height=55.00]
-          LayoutSVGText {text} at (62.09,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (62.09,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (62.11,221.00) startOffset 0 endOffset 1 width 4.00: "1"
-          LayoutSVGRect {rect} at (72.24,161) size 16.27x55 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=72.24] [y=161.00] [width=16.27] [height=55.00]
-          LayoutSVGText {text} at (78.36,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (78.36,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (78.37,221.00) startOffset 0 endOffset 1 width 4.00: "2"
-          LayoutSVGRect {rect} at (88.50,161) size 9.72x55 [fill={[type=SOLID] [color=#008000] [opacity=0.30]}] [x=88.50] [y=161.00] [width=9.72] [height=55.00]
-          LayoutSVGText {text} at (91.36,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (91.36,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (91.37,221.00) startOffset 0 endOffset 1 width 4.00: "3"
-          LayoutSVGRect {rect} at (98.23,161) size 5.97x55 [fill={[type=SOLID] [color=#0000FF] [opacity=0.30]}] [x=98.23] [y=161.00] [width=5.97] [height=55.00]
-          LayoutSVGText {text} at (99.20,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (99.20,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (99.21,221.00) startOffset 0 endOffset 1 width 4.00: "4"
-          LayoutSVGRect {rect} at (104.20,161) size 10.84x55 [fill={[type=SOLID] [color=#4B0082] [opacity=0.30]}] [x=104.20] [y=161.00] [width=10.84] [height=55.00]
-          LayoutSVGText {text} at (107.61,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (107.61,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (107.62,221.00) startOffset 0 endOffset 1 width 4.00: "5"
-          LayoutSVGRect {rect} at (115.04,161) size 10.84x55 [fill={[type=SOLID] [color=#EE82EE] [opacity=0.30]}] [x=115.04] [y=161.00] [width=10.84] [height=55.00]
-          LayoutSVGText {text} at (118.45,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (118.45,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (118.47,221.00) startOffset 0 endOffset 1 width 4.00: "6"
-          LayoutSVGRect {rect} at (125.89,161) size 10.84x55 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=125.89] [y=161.00] [width=10.84] [height=55.00]
-          LayoutSVGText {text} at (129.30,214) size 4x9 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (129.30,214) size 4x9
-              chunk 1 (middle anchor) text run 1 at (129.31,221.00) startOffset 0 endOffset 1 width 4.00: "7"
           LayoutSVGRect {rect} at (200,169) size 11.66x40 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=200.00] [y=169.00] [width=11.66] [height=40.00]
           LayoutSVGText {text} at (203.81,207) size 4x9 contains 1 chunk(s)
             LayoutSVGInlineText {#text} at (203.81,207) size 4x9
@@ -498,9 +466,6 @@
             chunk 1 text run 1 at (380.53,125.00) startOffset 0 endOffset 1 width 0.00 RTL: "\x{200F}"
             chunk 1 text run 1 at (380.53,125.00) startOffset 0 endOffset 1 width 19.47: "a"
             chunk 1 text run 1 at (400.00,125.00) startOffset 0 endOffset 1 width 0.00 RTL: "\x{200F}"
-        LayoutSVGText {text} at (42.19,160.08) size 70.64x55.91 contains 1 chunk(s)
-          LayoutSVGInlineText {#text} at (42.19,160.08) size 70.64x55.91
-            chunk 1 text run 1 at (50.00,200.00) startOffset 0 endOffset 8 width 62.84: "fi\x{30C} fi\x{30C}\x{30C}"
         LayoutSVGText {text} at (200,169) size 63.75x40 contains 1 chunk(s)
           LayoutSVGInlineText {#text} at (200,169) size 63.75x40
             chunk 1 text run 1 at (200.00,200.00) startOffset 0 endOffset 9 width 63.20: "fi\x{30C} ffi\x{30C}\x{30C}"
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/text/combining-character-queries-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/text/combining-character-queries-expected.png
index 4b6c55fb..7124de23 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/text/combining-character-queries-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/text/combining-character-queries-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/text/combining-character-queries-expected.txt b/third_party/WebKit/LayoutTests/platform/win/svg/text/combining-character-queries-expected.txt
index 65b9ed0..ff286189 100644
--- a/third_party/WebKit/LayoutTests/platform/win/svg/text/combining-character-queries-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/svg/text/combining-character-queries-expected.txt
@@ -185,38 +185,6 @@
           LayoutSVGText {text} at (356.14,129) size 4x10 contains 1 chunk(s)
             LayoutSVGInlineText {#text} at (356.14,129) size 4x10
               chunk 1 (middle anchor) text run 1 at (356.15,137.00) startOffset 0 endOffset 1 width 4.00: "8"
-          LayoutSVGRect {rect} at (50,161) size 11.66x49 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=50.00] [y=161.00] [width=11.66] [height=49.00]
-          LayoutSVGText {text} at (53.81,207) size 4x10 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (53.81,207) size 4x10
-              chunk 1 (middle anchor) text run 1 at (53.83,215.00) startOffset 0 endOffset 1 width 4.00: "0"
-          LayoutSVGRect {rect} at (61.66,161) size 4.86x49 [fill={[type=SOLID] [color=#FFA500] [opacity=0.30]}] [x=61.66] [y=161.00] [width=4.86] [height=49.00]
-          LayoutSVGText {text} at (62.08,207) size 4x10 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (62.08,207) size 4x10
-              chunk 1 (middle anchor) text run 1 at (62.09,215.00) startOffset 0 endOffset 1 width 4.00: "1"
-          LayoutSVGRect {rect} at (66.52,161) size 4.86x49 [fill={[type=SOLID] [color=#FFFF00] [opacity=0.30]}] [x=66.52] [y=161.00] [width=4.86] [height=49.00]
-          LayoutSVGText {text} at (66.94,207) size 4x10 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (66.94,207) size 4x10
-              chunk 1 (middle anchor) text run 1 at (66.95,215.00) startOffset 0 endOffset 1 width 4.00: "2"
-          LayoutSVGRect {rect} at (71.38,161) size 10.46x49 [fill={[type=SOLID] [color=#008000] [opacity=0.30]}] [x=71.38] [y=161.00] [width=10.46] [height=49.00]
-          LayoutSVGText {text} at (74.59,207) size 4x10 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (74.59,207) size 4x10
-              chunk 1 (middle anchor) text run 1 at (74.61,215.00) startOffset 0 endOffset 1 width 4.00: "3"
-          LayoutSVGRect {rect} at (81.84,161) size 11.66x49 [fill={[type=SOLID] [color=#0000FF] [opacity=0.30]}] [x=81.84] [y=161.00] [width=11.66] [height=49.00]
-          LayoutSVGText {text} at (85.66,207) size 4x10 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (85.66,207) size 4x10
-              chunk 1 (middle anchor) text run 1 at (85.67,215.00) startOffset 0 endOffset 1 width 4.00: "4"
-          LayoutSVGRect {rect} at (93.49,161) size 3.24x49 [fill={[type=SOLID] [color=#4B0082] [opacity=0.30]}] [x=93.49] [y=161.00] [width=3.24] [height=49.00]
-          LayoutSVGText {text} at (93.11,207) size 4x10 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (93.11,207) size 4x10
-              chunk 1 (middle anchor) text run 1 at (93.11,215.00) startOffset 0 endOffset 1 width 4.00: "5"
-          LayoutSVGRect {rect} at (96.74,161) size 3.24x49 [fill={[type=SOLID] [color=#EE82EE] [opacity=0.30]}] [x=96.74] [y=161.00] [width=3.24] [height=49.00]
-          LayoutSVGText {text} at (96.34,207) size 4x10 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (96.34,207) size 4x10
-              chunk 1 (middle anchor) text run 1 at (96.36,215.00) startOffset 0 endOffset 1 width 4.00: "6"
-          LayoutSVGRect {rect} at (99.98,161) size 3.24x49 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=99.98] [y=161.00] [width=3.24] [height=49.00]
-          LayoutSVGText {text} at (99.59,207) size 4x10 contains 1 chunk(s)
-            LayoutSVGInlineText {#text} at (99.59,207) size 4x10
-              chunk 1 (middle anchor) text run 1 at (99.60,215.00) startOffset 0 endOffset 1 width 4.00: "7"
           LayoutSVGRect {rect} at (200,169) size 11.66x39 [fill={[type=SOLID] [color=#FF0000] [opacity=0.30]}] [x=200.00] [y=169.00] [width=11.66] [height=39.00]
           LayoutSVGText {text} at (203.81,205) size 4x10 contains 1 chunk(s)
             LayoutSVGInlineText {#text} at (203.81,205) size 4x10
@@ -498,9 +466,6 @@
             chunk 1 text run 1 at (380.53,125.00) startOffset 0 endOffset 1 width 0.00 RTL: "\x{200F}"
             chunk 1 text run 1 at (380.53,125.00) startOffset 0 endOffset 1 width 19.47: "a"
             chunk 1 text run 1 at (400.00,125.00) startOffset 0 endOffset 1 width 0.00 RTL: "\x{200F}"
-        LayoutSVGText {text} at (50,161) size 58.20x49 contains 1 chunk(s)
-          LayoutSVGInlineText {#text} at (50,161) size 58.20x49
-            chunk 1 text run 1 at (50.00,200.00) startOffset 0 endOffset 8 width 53.22: "fi\x{30C} fi\x{30C}\x{30C}"
         LayoutSVGText {text} at (200,169) size 67.53x39 contains 1 chunk(s)
           LayoutSVGInlineText {#text} at (200,169) size 67.53x39
             chunk 1 text run 1 at (200.00,200.00) startOffset 0 endOffset 9 width 62.53: "fi\x{30C} ffi\x{30C}\x{30C}"
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/cursor-continueprimarykey-expected.txt b/third_party/WebKit/LayoutTests/storage/indexeddb/cursor-continueprimarykey-expected.txt
deleted file mode 100644
index 04f0fd1..0000000
--- a/third_party/WebKit/LayoutTests/storage/indexeddb/cursor-continueprimarykey-expected.txt
+++ /dev/null
@@ -1,172 +0,0 @@
-Test IndexedDB's IDBCursor.continue() with a primary key parameter.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-dbname = "cursor-continueprimarykey.html"
-indexedDB.deleteDatabase(dbname)
-indexedDB.open(dbname)
-
-prepareDatabase():
-db = event.target.result
-store = db.createObjectStore('store')
-index = store.createIndex('index', 'indexKey', {multiEntry: true})
-store.put({indexKey: ['a', 'b']}, 1)
-store.put({indexKey: ['a', 'b']}, 2)
-store.put({indexKey: ['a', 'b']}, 3)
-store.put({indexKey: ['b']}, 4)
-checking index structure...
-
-index key  primary key
-=========  ===========
-a          1
-a          2
-a          3
-b          1
-b          2
-b          3
-b          4
-
-Test case: cursor.continue()
-
-tx = db.transaction('store')
-request = tx.objectStore('store').index('index').openCursor()
-cursor.continue()
-PASS cursor.key is "a"
-PASS cursor.primaryKey is 2
-
-Test case: cursor.continue('a')
-
-tx = db.transaction('store')
-request = tx.objectStore('store').index('index').openCursor()
-Expecting exception from cursor.continue('a')
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'continue' on 'IDBCursor': The parameter is less than or equal to this cursor's position.
-
-Test case: cursor.continue('b')
-
-tx = db.transaction('store')
-request = tx.objectStore('store').index('index').openCursor()
-cursor.continue('b')
-PASS cursor.key is "b"
-PASS cursor.primaryKey is 1
-
-Test case: cursor.continue('c')
-
-tx = db.transaction('store')
-request = tx.objectStore('store').index('index').openCursor()
-cursor.continue('c')
-PASS cursor is null
-
-Test case: cursor.continuePrimaryKey('a', 3)
-
-tx = db.transaction('store')
-request = tx.objectStore('store').index('index').openCursor()
-cursor.continuePrimaryKey('a', 3)
-PASS cursor.key is "a"
-PASS cursor.primaryKey is 3
-
-Test case: cursor.continuePrimaryKey('a', 4)
-
-tx = db.transaction('store')
-request = tx.objectStore('store').index('index').openCursor()
-cursor.continuePrimaryKey('a', 4)
-PASS cursor.key is "b"
-PASS cursor.primaryKey is 1
-
-Test case: cursor.continuePrimaryKey('b', 1)
-
-tx = db.transaction('store')
-request = tx.objectStore('store').index('index').openCursor()
-cursor.continuePrimaryKey('b', 1)
-PASS cursor.key is "b"
-PASS cursor.primaryKey is 1
-
-Test case: cursor.continuePrimaryKey('b', 4)
-
-tx = db.transaction('store')
-request = tx.objectStore('store').index('index').openCursor()
-cursor.continuePrimaryKey('b', 4)
-PASS cursor.key is "b"
-PASS cursor.primaryKey is 4
-
-Test case: cursor.continuePrimaryKey('b', 5)
-
-tx = db.transaction('store')
-request = tx.objectStore('store').index('index').openCursor()
-cursor.continuePrimaryKey('b', 5)
-PASS cursor is null
-
-Test case: cursor.continuePrimaryKey('c', 1)
-
-tx = db.transaction('store')
-request = tx.objectStore('store').index('index').openCursor()
-cursor.continuePrimaryKey('c', 1)
-PASS cursor is null
-
-Test case: cursor.continuePrimaryKey(null, 1)
-
-tx = db.transaction('store')
-request = tx.objectStore('store').index('index').openCursor()
-Expecting exception from cursor.continuePrimaryKey(null, 1)
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'continuePrimaryKey' on 'IDBCursor': The parameter is not a valid key.
-
-Test case: cursor.continuePrimaryKey(null, 2)
-
-tx = db.transaction('store')
-request = tx.objectStore('store').index('index').openCursor()
-Expecting exception from cursor.continuePrimaryKey(null, 2)
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'continuePrimaryKey' on 'IDBCursor': The parameter is not a valid key.
-
-Test case: cursor.continuePrimaryKey(null, 3)
-
-tx = db.transaction('store')
-request = tx.objectStore('store').index('index').openCursor()
-Expecting exception from cursor.continuePrimaryKey(null, 3)
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'continuePrimaryKey' on 'IDBCursor': The parameter is not a valid key.
-
-Test case: cursor.continuePrimaryKey(null, 4)
-
-tx = db.transaction('store')
-request = tx.objectStore('store').index('index').openCursor()
-Expecting exception from cursor.continuePrimaryKey(null, 4)
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'continuePrimaryKey' on 'IDBCursor': The parameter is not a valid key.
-
-Test case: cursor.continuePrimaryKey(null, 5)
-
-tx = db.transaction('store')
-request = tx.objectStore('store').index('index').openCursor()
-Expecting exception from cursor.continuePrimaryKey(null, 5)
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'continuePrimaryKey' on 'IDBCursor': The parameter is not a valid key.
-
-Test case: cursor.continuePrimaryKey('a', null)
-
-tx = db.transaction('store')
-request = tx.objectStore('store').index('index').openCursor()
-Expecting exception from cursor.continuePrimaryKey('a', null)
-PASS Exception was thrown.
-PASS code is 0
-PASS ename is 'DataError'
-Exception message: Failed to execute 'continuePrimaryKey' on 'IDBCursor': The parameter is not a valid key.
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/cursor-continueprimarykey.html b/third_party/WebKit/LayoutTests/storage/indexeddb/cursor-continueprimarykey.html
deleted file mode 100644
index c22e56c..0000000
--- a/third_party/WebKit/LayoutTests/storage/indexeddb/cursor-continueprimarykey.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<!DOCTYPE html>
-<script src="../../resources/js-test.js"></script>
-<script src="resources/shared.js"></script>
-<script src="resources/cursor-continueprimarykey.js"></script>
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/resources/cursor-continueprimarykey.js b/third_party/WebKit/LayoutTests/storage/indexeddb/resources/cursor-continueprimarykey.js
deleted file mode 100644
index f8ea36ce..0000000
--- a/third_party/WebKit/LayoutTests/storage/indexeddb/resources/cursor-continueprimarykey.js
+++ /dev/null
@@ -1,115 +0,0 @@
-if (this.importScripts) {
-    importScripts('../../../fast/js/resources/js-test-pre.js');
-    importScripts('shared.js');
-}
-
-description("Test IndexedDB's IDBCursor.continue() with a primary key parameter.");
-
-indexedDBTest(prepareDatabase, verifyContinueCalls);
-function prepareDatabase(evt)
-{
-    preamble(evt);
-
-    evalAndLog("db = event.target.result");
-    evalAndLog("store = db.createObjectStore('store')");
-    evalAndLog("index = store.createIndex('index', 'indexKey', {multiEntry: true})");
-
-    evalAndLog("store.put({indexKey: ['a', 'b']}, 1)");
-    evalAndLog("store.put({indexKey: ['a', 'b']}, 2)");
-    evalAndLog("store.put({indexKey: ['a', 'b']}, 3)");
-    evalAndLog("store.put({indexKey: ['b']}, 4)");
-
-    var indexExpected = [
-        {key: "a", primaryKey: 1},
-        {key: "a", primaryKey: 2},
-        {key: "a", primaryKey: 3},
-        {key: "b", primaryKey: 1},
-        {key: "b", primaryKey: 2},
-        {key: "b", primaryKey: 3},
-        {key: "b", primaryKey: 4}
-    ];
-    debug("checking index structure...");
-    debug("");
-    debug("index key  primary key");
-    debug("=========  ===========");
-    var quiet = true;
-    evalAndLog("request = index.openCursor()", quiet);
-    request.onerror = unexpectedErrorCallback;
-    request.onsuccess = function onCursorSuccess() {
-        evalAndLog("cursor = request.result", quiet);
-        var expectedEntry = indexExpected.shift();
-        if (expectedEntry) {
-            shouldBe("cursor.key", JSON.stringify(expectedEntry.key), quiet);
-            shouldBe("cursor.primaryKey", JSON.stringify(expectedEntry.primaryKey), quiet);
-            debug(cursor.key + "          " + cursor.primaryKey);
-            evalAndLog("cursor.continue()", quiet);
-        } else {
-            shouldBeNull("cursor", quiet);
-        }
-    };
-}
-
-var testCases = [
-    // Continuing index key
-    { call: "cursor.continue()", result: { key: "a", primaryKey: 2 } },
-    { call: "cursor.continue('a')", exception: 'DataError' },
-    { call: "cursor.continue('b')", result: { key: "b", primaryKey: 1 } },
-    { call: "cursor.continue('c')", result: null },
-
-    // Called w/ index key and primary key:
-    { call: "cursor.continuePrimaryKey('a', 3)", result: {key: 'a', primaryKey: 3} },
-    { call: "cursor.continuePrimaryKey('a', 4)", result: {key: 'b', primaryKey: 1} },
-    { call: "cursor.continuePrimaryKey('b', 1)", result: {key: 'b', primaryKey: 1} },
-    { call: "cursor.continuePrimaryKey('b', 4)", result: {key: 'b', primaryKey: 4} },
-    { call: "cursor.continuePrimaryKey('b', 5)", result: null },
-    { call: "cursor.continuePrimaryKey('c', 1)", result: null },
-
-    // Called w/ primary key but w/o index key
-    { call: "cursor.continuePrimaryKey(null, 1)", exception: 'DataError' },
-    { call: "cursor.continuePrimaryKey(null, 2)", exception: 'DataError' },
-    { call: "cursor.continuePrimaryKey(null, 3)", exception: 'DataError' },
-    { call: "cursor.continuePrimaryKey(null, 4)", exception: 'DataError' },
-    { call: "cursor.continuePrimaryKey(null, 5)", exception: 'DataError' },
-
-    // Called w/ index key but w/o primary key
-    { call: "cursor.continuePrimaryKey('a', null)", exception: 'DataError' },
- ];
-
-function verifyContinueCalls() {
-    debug("");
-    if (!testCases.length) {
-        finishJSTest();
-        return;
-    }
-
-    var quiet = true;
-    testCase = testCases.shift();
-    debug("Test case: " + testCase.call);
-    debug("");
-    evalAndLog("tx = db.transaction('store')");
-    evalAndLog("request = tx.objectStore('store').index('index').openCursor()");
-    var i = 0;
-    request.onsuccess = function() {
-        ++i;
-        evalAndLog("cursor = request.result", true);
-        if (i === 1) {
-            if ('exception' in testCase) {
-                evalAndExpectException(testCase.call, "0", "'DataError'");
-            } else {
-                evalAndLog(testCase.call);
-            }
-            return;
-        }
-
-        if (i === 2) {
-            if (testCase.result) {
-                shouldBe("cursor.key", JSON.stringify(testCase.result.key));
-                shouldBe("cursor.primaryKey", JSON.stringify(testCase.result.primaryKey));
-            } else {
-                shouldBeNull("cursor");
-            }
-        }
-    };
-
-    tx.oncomplete = verifyContinueCalls;
-}
diff --git a/third_party/WebKit/LayoutTests/svg/text/combining-character-queries.html b/third_party/WebKit/LayoutTests/svg/text/combining-character-queries.html
index 98afd680..b64348ad 100644
--- a/third_party/WebKit/LayoutTests/svg/text/combining-character-queries.html
+++ b/third_party/WebKit/LayoutTests/svg/text/combining-character-queries.html
@@ -22,8 +22,8 @@
     <text x="400" y="125" class="testTextRun" font-family="sans-serif" direction="rtl">&#8207;a&#8207;b&#x030c;&#8207;c&#x030c;&#x030c;</text>
 
     <!-- multiple combining diacritics on ligatures in LTR -->
-    <!-- MacOS has differences with the "ffi" glyph and diacritics in cursive font family so the first run uses 'fi' as a workaround. -->
-    <text x="50" y="200" class="testTextRun" font-family="cursive">fi&#x030c; fi&#x030c;&#x030c;</text>
+    <!-- MacOS has differences with multiple diacritics in cursive font family so this is skipped, see: https://crbug.com/669693. -->
+    <!-- <text x="50" y="200" class="testTextRun" font-family="cursive">fi&#x030c; ffi&#x030c;&#x030c;</text> -->
     <text x="200" y="200" class="testTextRun" font-family="serif">fi&#x030c; ffi&#x030c;&#x030c;</text>
     <text x="350" y="200" class="testTextRun" font-family="sans-serif">fi&#x030c; ffi&#x030c;&#x030c;</text>
 
diff --git a/third_party/WebKit/LayoutTests/webaudio/resources/audit.js b/third_party/WebKit/LayoutTests/webaudio/resources/audit.js
index 49536a67..6bfaa9e 100644
--- a/third_party/WebKit/LayoutTests/webaudio/resources/audit.js
+++ b/third_party/WebKit/LayoutTests/webaudio/resources/audit.js
@@ -656,7 +656,7 @@
             + '\t' + this._actual[index].toExponential(16)
             + '\t' + this._expected[index].toExponential(16);
           if (++counter >= this._options.numberOfErrors) {
-            failDetail += '\n\t...and ' + (numberOfErrors - counter)
+            failDetail += '\n\t...and ' + (errorIndices.length - counter)
               + ' more errors.';
             break;
           }
diff --git a/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-failures-expected.txt b/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-failures-expected.txt
index 33d1de5..86d52e3 100644
--- a/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-failures-expected.txt
+++ b/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-failures-expected.txt
@@ -28,11 +28,13 @@
 	[3]	18
 	...and 3 more errors. assert_true: expected true got false
 FAIL X [0,0,0] should have contain at least one value different from 0. assert_true: expected true got false
-FAIL X [1,8,11,18,6,5,5,5,123,49] expected to be equal to the array [1,8,10,18,6,5,6,5,123,48] but differs in 3 places:
+FAIL X [0,1,2,3,4,5,6,7,8,9] expected to be equal to the array [0,0,0,0,0,0,0,0,0,0] but differs in 9 places:
 	Index	Actual			Expected
-	[2]	1.1000000000000000e+1	1.0000000000000000e+1
-	[6]	5.0000000000000000e+0	6.0000000000000000e+0
-	[9]	4.9000000000000000e+1	4.8000000000000000e+1 assert_true: expected true got false
+	[1]	1.0000000000000000e+0	0.0000000000000000e+0
+	[2]	2.0000000000000000e+0	0.0000000000000000e+0
+	[3]	3.0000000000000000e+0	0.0000000000000000e+0
+	[4]	4.0000000000000000e+0	0.0000000000000000e+0
+	...and 5 more errors. assert_true: expected true got false
 FAIL X [1,1,1,1,2,2,3,3,3] expected to have the value sequence of [1,3,2] but got 2 at index 4. assert_true: expected true got false
 FAIL X [0.5,0.5,0.55,0.5,0.45,0.5] has a glitch at index 5 of size 0.04999999999999999. assert_true: expected true got false
 FAIL X [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.9] does not equal [0.7,0.6,0.5,0.4,0.3,0.2,0.1] with an element-wise tolerance of {"absoluteThreshold":0.02,"relativeThreshold":0}.
diff --git a/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-failures.html b/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-failures.html
index 7e6da631..903edf9 100644
--- a/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-failures.html
+++ b/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-failures.html
@@ -54,8 +54,8 @@
       should(59, 'The measured decibel').beCloseTo(62, { threshold: 0.01 });
       should([1, 8, 11, 18, 6, 5, 5, 5, 123, 49]).beConstantValueOf(5);
       should([0, 0, 0]).notBeConstantValueOf(0);
-      should([1, 8, 11, 18, 6, 5, 5, 5, 123, 49])
-        .beEqualToArray([1, 8, 10, 18, 6, 5, 6, 5, 123, 48]);
+      should([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
+        .beEqualToArray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
       should([1, 1, 1, 1, 2, 2, 3, 3, 3]).containValues([1, 3, 2]);
       should([0.5, 0.5, 0.55, 0.5, 0.45, 0.5]).notGlitch(0.04);
       should([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.9])
diff --git a/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp b/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp
index eac486e7..9e667246 100644
--- a/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp
@@ -304,7 +304,7 @@
   ASSERT(!m_domObjectHolders.contains(holderBase.get()));
   holderBase->setWorld(this);
   holderBase->setWeak(&DOMWrapperWorld::weakCallbackForDOMObjectHolder);
-  m_domObjectHolders.add(std::move(holderBase));
+  m_domObjectHolders.insert(std::move(holderBase));
 }
 
 void DOMWrapperWorld::unregisterDOMObjectHolder(
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.cpp
index 73b01d6..f7b1d0e 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.cpp
@@ -136,7 +136,7 @@
     return true;
   m_observedAttributes.reserveCapacityForSize(list.size());
   for (const auto& attribute : list)
-    m_observedAttributes.add(attribute);
+    m_observedAttributes.insert(attribute);
   return true;
 }
 
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitorVerifier.h b/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitorVerifier.h
index 8649e122..ead8499 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitorVerifier.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitorVerifier.h
@@ -61,7 +61,7 @@
 
   bool markWrapperHeader(HeapObjectHeader* header) const override {
     if (!m_visitedHeaders.contains(header)) {
-      m_visitedHeaders.add(header);
+      m_visitedHeaders.insert(header);
       return true;
     }
     return false;
diff --git a/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp b/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp
index 34f5c3b7..06ead69 100644
--- a/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp
@@ -231,7 +231,7 @@
   for (size_t i = 0; i < imageBitmaps.size(); ++i) {
     if (visited.contains(imageBitmaps[i]))
       continue;
-    visited.add(imageBitmaps[i]);
+    visited.insert(imageBitmaps[i]);
     contents->push_back(imageBitmaps[i]->transfer());
   }
   return contents;
@@ -269,7 +269,7 @@
                               " has an associated context.");
       return;
     }
-    visited.add(offscreenCanvases[i].get());
+    visited.insert(offscreenCanvases[i].get());
     offscreenCanvases[i].get()->setNeutered();
   }
 }
@@ -421,7 +421,7 @@
     DOMArrayBufferBase* arrayBuffer = *it;
     if (visited.contains(arrayBuffer))
       continue;
-    visited.add(arrayBuffer);
+    visited.insert(arrayBuffer);
 
     size_t index = std::distance(arrayBuffers.begin(), it);
     if (arrayBuffer->isShared()) {
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp b/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp
index 9f60e5b8..906e829 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8PerIsolateData.cpp
@@ -403,7 +403,7 @@
   if (!m_activeScriptWrappables)
     m_activeScriptWrappables = new ActiveScriptWrappableSet();
 
-  m_activeScriptWrappables->add(wrappable);
+  m_activeScriptWrappables->insert(wrappable);
 }
 
 void V8PerIsolateData::TemporaryScriptWrappableVisitorScope::
diff --git a/third_party/WebKit/Source/core/animation/AnimationTimeline.cpp b/third_party/WebKit/Source/core/animation/AnimationTimeline.cpp
index f7fb988d..3fbcae6 100644
--- a/third_party/WebKit/Source/core/animation/AnimationTimeline.cpp
+++ b/third_party/WebKit/Source/core/animation/AnimationTimeline.cpp
@@ -89,7 +89,7 @@
 void AnimationTimeline::animationAttached(Animation& animation) {
   DCHECK_EQ(animation.timeline(), this);
   DCHECK(!m_animations.contains(&animation));
-  m_animations.add(&animation);
+  m_animations.insert(&animation);
 }
 
 Animation* AnimationTimeline::play(AnimationEffectReadOnly* child) {
@@ -281,7 +281,7 @@
 void AnimationTimeline::setOutdatedAnimation(Animation* animation) {
   DCHECK(animation->outdated());
   m_outdatedAnimationCount++;
-  m_animationsNeedingUpdate.add(animation);
+  m_animationsNeedingUpdate.insert(animation);
   if (isActive() && !m_document->page()->animator().isServicingAnimations())
     m_timing->serviceOnNextFrame();
 }
diff --git a/third_party/WebKit/Source/core/animation/EffectStackTest.cpp b/third_party/WebKit/Source/core/animation/EffectStackTest.cpp
index 13cea9f..9b4b807 100644
--- a/third_party/WebKit/Source/core/animation/EffectStackTest.cpp
+++ b/third_party/WebKit/Source/core/animation/EffectStackTest.cpp
@@ -134,7 +134,7 @@
       play(makeKeyframeEffect(makeEffectModel(CSSPropertyFontSize,
                                               AnimatableDouble::create(1))),
            0);
-  cancelledAnimations.add(animation);
+  cancelledAnimations.insert(animation);
   play(makeKeyframeEffect(
            makeEffectModel(CSSPropertyZIndex, AnimatableDouble::create(2))),
        0);
diff --git a/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp b/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp
index 7b531d4a..4823857 100644
--- a/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp
+++ b/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp
@@ -49,7 +49,7 @@
   PropertyHandleSet result;
   for (const auto& keyframe : m_keyframes) {
     for (const auto& property : keyframe->properties())
-      result.add(property);
+      result.insert(property);
   }
   return result;
 }
diff --git a/third_party/WebKit/Source/core/animation/SampledEffect.cpp b/third_party/WebKit/Source/core/animation/SampledEffect.cpp
index 93faf1b..2d2aa74f 100644
--- a/third_party/WebKit/Source/core/animation/SampledEffect.cpp
+++ b/third_party/WebKit/Source/core/animation/SampledEffect.cpp
@@ -34,7 +34,7 @@
     HashSet<PropertyHandle>& replacedProperties) {
   for (const auto& interpolation : m_interpolations) {
     if (!interpolation->dependsOnUnderlyingValue())
-      replacedProperties.add(interpolation->getProperty());
+      replacedProperties.insert(interpolation->getProperty());
   }
 }
 
diff --git a/third_party/WebKit/Source/core/animation/StringKeyframe.cpp b/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
index 7f6bb9ff..5a522fe 100644
--- a/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
+++ b/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
@@ -79,18 +79,18 @@
         << "Web Animations: Encountered unexpanded shorthand CSS property ("
         << propertyReference.id() << ").";
     if (propertyReference.id() == CSSPropertyVariable)
-      properties.add(PropertyHandle(
+      properties.insert(PropertyHandle(
           toCSSCustomPropertyDeclaration(propertyReference.value()).name()));
     else
-      properties.add(PropertyHandle(propertyReference.id(), false));
+      properties.insert(PropertyHandle(propertyReference.id(), false));
   }
 
   for (unsigned i = 0; i < m_presentationAttributeMap->propertyCount(); ++i)
-    properties.add(
+    properties.insert(
         PropertyHandle(m_presentationAttributeMap->propertyAt(i).id(), true));
 
   for (const auto& key : m_svgAttributeMap.keys())
-    properties.add(PropertyHandle(*key));
+    properties.insert(PropertyHandle(*key));
 
   return properties;
 }
diff --git a/third_party/WebKit/Source/core/animation/animatable/AnimatableValueKeyframe.cpp b/third_party/WebKit/Source/core/animation/animatable/AnimatableValueKeyframe.cpp
index 3ff76d0..a1676dc 100644
--- a/third_party/WebKit/Source/core/animation/animatable/AnimatableValueKeyframe.cpp
+++ b/third_party/WebKit/Source/core/animation/animatable/AnimatableValueKeyframe.cpp
@@ -23,7 +23,7 @@
   PropertyHandleSet properties;
   for (PropertyValueMap::const_iterator iter = m_propertyValues.begin();
        iter != m_propertyValues.end(); ++iter)
-    properties.add(PropertyHandle(*iter.keys()));
+    properties.insert(PropertyHandle(*iter.keys()));
   return properties;
 }
 
diff --git a/third_party/WebKit/Source/core/animation/css/CSSAnimationUpdate.h b/third_party/WebKit/Source/core/animation/css/CSSAnimationUpdate.h
index 64dfd2a..613f2e6 100644
--- a/third_party/WebKit/Source/core/animation/css/CSSAnimationUpdate.h
+++ b/third_party/WebKit/Source/core/animation/css/CSSAnimationUpdate.h
@@ -144,7 +144,7 @@
   }
   void cancelAnimation(size_t index, const Animation& animation) {
     m_cancelledAnimationIndices.push_back(index);
-    m_suppressedAnimations.add(&animation);
+    m_suppressedAnimations.insert(&animation);
   }
   void toggleAnimationIndexPaused(size_t index) {
     m_animationIndicesWithPauseToggled.push_back(index);
@@ -156,7 +156,7 @@
                        StyleRuleKeyframes* styleRule) {
     m_animationsWithUpdates.push_back(UpdatedCSSAnimation(
         index, animation, effect, specifiedTiming, styleRule));
-    m_suppressedAnimations.add(animation);
+    m_suppressedAnimations.insert(animation);
   }
   void updateCompositorKeyframes(Animation* animation) {
     m_updatedCompositorKeyframes.push_back(animation);
@@ -180,8 +180,8 @@
   bool isCancelledTransition(CSSPropertyID id) const {
     return m_cancelledTransitions.contains(id);
   }
-  void cancelTransition(CSSPropertyID id) { m_cancelledTransitions.add(id); }
-  void finishTransition(CSSPropertyID id) { m_finishedTransitions.add(id); }
+  void cancelTransition(CSSPropertyID id) { m_cancelledTransitions.insert(id); }
+  void finishTransition(CSSPropertyID id) { m_finishedTransitions.insert(id); }
 
   const HeapVector<NewCSSAnimation>& newAnimations() const {
     return m_newAnimations;
diff --git a/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp b/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
index b571510b..e9a65821 100644
--- a/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
+++ b/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
@@ -100,7 +100,7 @@
     const StylePropertySet& properties = styleKeyframe->properties();
     for (unsigned j = 0; j < properties.propertyCount(); j++) {
       CSSPropertyID property = properties.propertyAt(j).id();
-      specifiedPropertiesForUseCounter.add(property);
+      specifiedPropertiesForUseCounter.insert(property);
       if (property == CSSPropertyAnimationTimingFunction) {
         const CSSValue& value = properties.propertyAt(j).value();
         RefPtr<TimingFunction> timingFunction;
@@ -879,7 +879,7 @@
           elementAnimations->cssAnimations().m_transitions;
       for (CSSPropertyID id : update.cancelledTransitions()) {
         DCHECK(transitionMap.contains(id));
-        cancelledAnimations.add(transitionMap.get(id).animation.get());
+        cancelledAnimations.insert(transitionMap.get(id).animation.get());
       }
     }
 
diff --git a/third_party/WebKit/Source/core/clipboard/DataObject.cpp b/third_party/WebKit/Source/core/clipboard/DataObject.cpp
index fcbbe51..5a5882a7 100644
--- a/third_party/WebKit/Source/core/clipboard/DataObject.cpp
+++ b/third_party/WebKit/Source/core/clipboard/DataObject.cpp
@@ -57,7 +57,7 @@
       continue;
     dataObject->m_itemList.push_back(
         DataObjectItem::createFromPasteboard(type, sequenceNumber));
-    ASSERT(typesSeen.add(type).isNewEntry);
+    ASSERT(typesSeen.insert(type).isNewEntry);
   }
   return dataObject;
 }
@@ -142,7 +142,7 @@
       case DataObjectItem::StringKind:
         // Per the spec, type must be unique among all items of kind 'string'.
         results.push_back(item->type());
-        ASSERT(typesSeen.add(item->type()).isNewEntry);
+        ASSERT(typesSeen.insert(item->type()).isNewEntry);
         break;
       case DataObjectItem::FileKind:
         containsFiles = true;
@@ -151,7 +151,7 @@
   }
   if (containsFiles) {
     results.push_back(mimeTypeFiles);
-    ASSERT(typesSeen.add(mimeTypeFiles).isNewEntry);
+    ASSERT(typesSeen.insert(mimeTypeFiles).isNewEntry);
   }
   return results;
 }
diff --git a/third_party/WebKit/Source/core/css/ActiveStyleSheets.cpp b/third_party/WebKit/Source/core/css/ActiveStyleSheets.cpp
index 4f3f619..de06afc 100644
--- a/third_party/WebKit/Source/core/css/ActiveStyleSheets.cpp
+++ b/third_party/WebKit/Source/core/css/ActiveStyleSheets.cpp
@@ -32,9 +32,9 @@
       continue;
 
     if (newStyleSheets[index].second)
-      changedRuleSets.add(newStyleSheets[index].second);
+      changedRuleSets.insert(newStyleSheets[index].second);
     if (oldStyleSheets[index].second)
-      changedRuleSets.add(oldStyleSheets[index].second);
+      changedRuleSets.insert(oldStyleSheets[index].second);
   }
 
   if (index == oldStyleSheetCount) {
diff --git a/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp b/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp
index 560cdf9..93b0508 100644
--- a/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp
+++ b/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp
@@ -201,7 +201,7 @@
 
 void logUnimplementedPropertyID(CSSPropertyID propertyID) {
   DEFINE_STATIC_LOCAL(HashSet<CSSPropertyID>, propertyIDSet, ());
-  if (!propertyIDSet.add(propertyID).isNewEntry)
+  if (!propertyIDSet.insert(propertyID).isNewEntry)
     return;
 
   DLOG(ERROR) << "Blink does not yet implement getComputedStyle for '"
diff --git a/third_party/WebKit/Source/core/css/CSSFontSelector.cpp b/third_party/WebKit/Source/core/css/CSSFontSelector.cpp
index 56f954d1..a4d11009 100644
--- a/third_party/WebKit/Source/core/css/CSSFontSelector.cpp
+++ b/third_party/WebKit/Source/core/css/CSSFontSelector.cpp
@@ -60,7 +60,7 @@
 
 void CSSFontSelector::registerForInvalidationCallbacks(
     CSSFontSelectorClient* client) {
-  m_clients.add(client);
+  m_clients.insert(client);
 }
 
 void CSSFontSelector::unregisterForInvalidationCallbacks(
diff --git a/third_party/WebKit/Source/core/css/FontFaceSet.cpp b/third_party/WebKit/Source/core/css/FontFaceSet.cpp
index d998594..80433325 100644
--- a/third_party/WebKit/Source/core/css/FontFaceSet.cpp
+++ b/third_party/WebKit/Source/core/css/FontFaceSet.cpp
@@ -232,7 +232,7 @@
       m_ready->reset();
     handlePendingEventsAndPromisesSoon();
   }
-  m_loadingFonts.add(fontFace);
+  m_loadingFonts.insert(fontFace);
   fontFace->addCallback(this);
 }
 
diff --git a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
index be7b7347..85d49cc 100644
--- a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
+++ b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
@@ -565,7 +565,7 @@
     if (sheet->ownerDocument() != document)
       m_hasSingleOwnerDocument = false;
   }
-  m_loadingClients.add(sheet);
+  m_loadingClients.insert(sheet);
 }
 
 void StyleSheetContents::unregisterClient(CSSStyleSheet* sheet) {
@@ -587,13 +587,13 @@
   // In this case, we don't need to add the stylesheet to completed clients.
   if (!sheet->ownerDocument())
     return;
-  m_completedClients.add(sheet);
+  m_completedClients.insert(sheet);
 }
 
 void StyleSheetContents::clientLoadStarted(CSSStyleSheet* sheet) {
   ASSERT(m_completedClients.contains(sheet));
   m_completedClients.remove(sheet);
-  m_loadingClients.add(sheet);
+  m_loadingClients.insert(sheet);
 }
 
 void StyleSheetContents::setReferencedFromResource(
diff --git a/third_party/WebKit/Source/core/css/cssom/FilteredComputedStylePropertyMap.cpp b/third_party/WebKit/Source/core/css/cssom/FilteredComputedStylePropertyMap.cpp
index 27d5cbf..eaf9dcf 100644
--- a/third_party/WebKit/Source/core/css/cssom/FilteredComputedStylePropertyMap.cpp
+++ b/third_party/WebKit/Source/core/css/cssom/FilteredComputedStylePropertyMap.cpp
@@ -12,11 +12,11 @@
     const Vector<AtomicString>& customProperties)
     : ComputedStylePropertyMap(computedStyleDeclaration) {
   for (const auto& nativeProperty : nativeProperties) {
-    m_nativeProperties.add(nativeProperty);
+    m_nativeProperties.insert(nativeProperty);
   }
 
   for (const auto& customProperty : customProperties) {
-    m_customProperties.add(customProperty);
+    m_customProperties.insert(customProperty);
   }
 }
 
diff --git a/third_party/WebKit/Source/core/css/invalidation/InvalidationSet.cpp b/third_party/WebKit/Source/core/css/invalidation/InvalidationSet.cpp
index e5dcb21a..c9831e7 100644
--- a/third_party/WebKit/Source/core/css/invalidation/InvalidationSet.cpp
+++ b/third_party/WebKit/Source/core/css/invalidation/InvalidationSet.cpp
@@ -205,28 +205,28 @@
   if (wholeSubtreeInvalid())
     return;
   DCHECK(!className.isEmpty());
-  ensureClassSet().add(className);
+  ensureClassSet().insert(className);
 }
 
 void InvalidationSet::addId(const AtomicString& id) {
   if (wholeSubtreeInvalid())
     return;
   DCHECK(!id.isEmpty());
-  ensureIdSet().add(id);
+  ensureIdSet().insert(id);
 }
 
 void InvalidationSet::addTagName(const AtomicString& tagName) {
   if (wholeSubtreeInvalid())
     return;
   DCHECK(!tagName.isEmpty());
-  ensureTagNameSet().add(tagName);
+  ensureTagNameSet().insert(tagName);
 }
 
 void InvalidationSet::addAttribute(const AtomicString& attribute) {
   if (wholeSubtreeInvalid())
     return;
   DCHECK(!attribute.isEmpty());
-  ensureAttributeSet().add(attribute);
+  ensureAttributeSet().insert(attribute);
 }
 
 void InvalidationSet::setWholeSubtreeInvalid() {
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp b/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp
index bf5c2567..26c1632d 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp
@@ -120,7 +120,7 @@
           toCSSCustomPropertyDeclaration(property.value())->name();
       if (seenCustomProperties.contains(name))
         continue;
-      seenCustomProperties.add(name);
+      seenCustomProperties.insert(name);
     } else if (property.id() == CSSPropertyApplyAtRule) {
       // TODO(timloh): Do we need to do anything here?
     } else {
diff --git a/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp b/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp
index 7352193..8d7f8e44 100644
--- a/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp
@@ -40,7 +40,7 @@
 CSSVariableData* CSSVariableResolver::valueForCustomProperty(
     AtomicString name) {
   if (m_variablesSeen.contains(name)) {
-    m_cycleStartPoints.add(name);
+    m_cycleStartPoints.insert(name);
     return nullptr;
   }
 
@@ -94,7 +94,7 @@
   bool disallowAnimationTainted = false;
   bool isAnimationTainted = variableData.isAnimationTainted();
   Vector<CSSParserToken> tokens;
-  m_variablesSeen.add(name);
+  m_variablesSeen.insert(name);
   bool success =
       resolveTokenRange(variableData.tokens(), disallowAnimationTainted, tokens,
                         isAnimationTainted);
diff --git a/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp b/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp
index 560c5bed11..5ef3af8e 100644
--- a/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp
@@ -67,7 +67,7 @@
     CSSPropertyID property,
     const CSSImageGeneratorValue& value) {
   if (value.isPending()) {
-    m_pendingImageProperties.add(property);
+    m_pendingImageProperties.insert(property);
     return StylePendingImage::create(value);
   }
   return StyleGeneratedImage::create(value);
@@ -77,7 +77,7 @@
     CSSPropertyID property,
     const CSSImageSetValue& value) {
   if (value.isCachePending(m_deviceScaleFactor)) {
-    m_pendingImageProperties.add(property);
+    m_pendingImageProperties.insert(property);
     return StylePendingImage::create(value);
   }
   return value.cachedImage(m_deviceScaleFactor);
@@ -87,7 +87,7 @@
     CSSPropertyID property,
     const CSSImageValue& value) {
   if (value.isCachePending()) {
-    m_pendingImageProperties.add(property);
+    m_pendingImageProperties.insert(property);
     return StylePendingImage::create(value);
   }
   value.restoreCachedResourceIfNeeded(*m_document);
diff --git a/third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp
index 373a63e7..5098a503 100644
--- a/third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/ScopedStyleResolver.cpp
@@ -116,7 +116,7 @@
     ASSERT(m_authorStyleSheets[i]->ownerNode());
     StyleSheetContents* contents = m_authorStyleSheets[i]->contents();
     if (contents->hasOneClient() ||
-        visitedSharedStyleSheetContents.add(contents).isNewEntry)
+        visitedSharedStyleSheetContents.insert(contents).isNewEntry)
       features.add(contents->ruleSet().features());
   }
 
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h b/third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h
index 48751f5..1f76f55 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h
+++ b/third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h
@@ -13,7 +13,7 @@
 
 class StyleRuleUsageTracker : public GarbageCollected<StyleRuleUsageTracker> {
  public:
-  void track(StyleRule* rule) { m_ruleList.add(rule); }
+  void track(StyleRule* rule) { m_ruleList.insert(rule); }
 
   bool contains(StyleRule*) const;
 
diff --git a/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp b/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp
index bd1ff5f..a5f42bc 100644
--- a/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp
+++ b/third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp
@@ -104,7 +104,7 @@
     if (it != m_addedSelectors.end())
       m_addedSelectors.remove(it);
     else
-      m_removedSelectors.add(selector);
+      m_removedSelectors.insert(selector);
   }
 
   for (const auto& selector : addedSelectors) {
@@ -118,7 +118,7 @@
     if (it != m_removedSelectors.end())
       m_removedSelectors.remove(it);
     else
-      m_addedSelectors.add(selector);
+      m_addedSelectors.insert(selector);
   }
 
   if (!shouldUpdateTimer)
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 230d3c9..da5e675 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -541,7 +541,7 @@
   DCHECK(!parentDocument() || !parentDocument()->isContextSuspended());
 
 #ifndef NDEBUG
-  liveDocumentSet().add(this);
+  liveDocumentSet().insert(this);
 #endif
 }
 
@@ -2330,7 +2330,7 @@
 }
 
 void Document::scheduleUseShadowTreeUpdate(SVGUseElement& element) {
-  m_useElementsNeedingUpdate.add(&element);
+  m_useElementsNeedingUpdate.insert(&element);
   scheduleLayoutTreeUpdateIfNeeded();
 }
 
@@ -4156,10 +4156,10 @@
 
 void Document::registerNodeList(const LiveNodeListBase* list) {
   DCHECK(!m_nodeLists[list->invalidationType()].contains(list));
-  m_nodeLists[list->invalidationType()].add(list);
+  m_nodeLists[list->invalidationType()].insert(list);
   liveNodeListBaseWriteBarrier(this, list);
   if (list->isRootedAtTreeScope())
-    m_listsInvalidatedAtDocument.add(list);
+    m_listsInvalidatedAtDocument.insert(list);
 }
 
 void Document::unregisterNodeList(const LiveNodeListBase* list) {
@@ -4173,7 +4173,7 @@
 
 void Document::registerNodeListWithIdNameCache(const LiveNodeListBase* list) {
   DCHECK(!m_nodeLists[InvalidateOnIdNameAttrChange].contains(list));
-  m_nodeLists[InvalidateOnIdNameAttrChange].add(list);
+  m_nodeLists[InvalidateOnIdNameAttrChange].insert(list);
   liveNodeListBaseWriteBarrier(this, list);
 }
 
@@ -4183,7 +4183,7 @@
 }
 
 void Document::attachNodeIterator(NodeIterator* ni) {
-  m_nodeIterators.add(ni);
+  m_nodeIterators.insert(ni);
 }
 
 void Document::detachNodeIterator(NodeIterator* ni) {
@@ -4415,7 +4415,7 @@
 void Document::registerEventFactory(
     std::unique_ptr<EventFactoryBase> eventFactory) {
   DCHECK(!eventFactories().contains(eventFactory.get()));
-  eventFactories().add(std::move(eventFactory));
+  eventFactories().insert(std::move(eventFactory));
 }
 
 Event* Document::createEvent(ExecutionContext* executionContext,
@@ -5622,7 +5622,7 @@
 
 void Document::attachRange(Range* range) {
   DCHECK(!m_ranges.contains(range));
-  m_ranges.add(range);
+  m_ranges.insert(range);
 }
 
 void Document::detachRange(Range* range) {
diff --git a/third_party/WebKit/Source/core/dom/DocumentParser.cpp b/third_party/WebKit/Source/core/dom/DocumentParser.cpp
index ff1f2eb0..0c985d2 100644
--- a/third_party/WebKit/Source/core/dom/DocumentParser.cpp
+++ b/third_party/WebKit/Source/core/dom/DocumentParser.cpp
@@ -85,7 +85,7 @@
 void DocumentParser::resumeScheduledTasks() {}
 
 void DocumentParser::addClient(DocumentParserClient* client) {
-  m_clients.add(client);
+  m_clients.insert(client);
 }
 
 void DocumentParser::removeClient(DocumentParserClient* client) {
diff --git a/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollector.h b/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollector.h
index baff8778..e3bfabd 100644
--- a/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollector.h
+++ b/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollector.h
@@ -59,7 +59,7 @@
   bool hasVisited(Document* document) const {
     return m_visitedDocuments->contains(document);
   }
-  void willVisit(Document* document) { m_visitedDocuments->add(document); }
+  void willVisit(Document* document) { m_visitedDocuments->insert(document); }
 
  private:
   Member<StyleSheetCollection> m_collection;
diff --git a/third_party/WebKit/Source/core/dom/ElementIntersectionObserverData.cpp b/third_party/WebKit/Source/core/dom/ElementIntersectionObserverData.cpp
index d7b5590..aa3dc49 100644
--- a/third_party/WebKit/Source/core/dom/ElementIntersectionObserverData.cpp
+++ b/third_party/WebKit/Source/core/dom/ElementIntersectionObserverData.cpp
@@ -23,7 +23,7 @@
 
 void ElementIntersectionObserverData::addObserver(
     IntersectionObserver& observer) {
-  m_intersectionObservers.add(&observer);
+  m_intersectionObservers.insert(&observer);
 }
 
 void ElementIntersectionObserverData::removeObserver(
diff --git a/third_party/WebKit/Source/core/dom/IdTargetObserverRegistry.cpp b/third_party/WebKit/Source/core/dom/IdTargetObserverRegistry.cpp
index df29ea23..1df0104 100644
--- a/third_party/WebKit/Source/core/dom/IdTargetObserverRegistry.cpp
+++ b/third_party/WebKit/Source/core/dom/IdTargetObserverRegistry.cpp
@@ -47,7 +47,7 @@
   if (result.isNewEntry)
     result.storedValue->value = new ObserverSet();
 
-  result.storedValue->value->add(observer);
+  result.storedValue->value->insert(observer);
 }
 
 void IdTargetObserverRegistry::removeObserver(const AtomicString& id,
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp b/third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp
index 68ec7e7..e6289913 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp
+++ b/third_party/WebKit/Source/core/dom/IntersectionObserverController.cpp
@@ -42,7 +42,7 @@
 
 void IntersectionObserverController::scheduleIntersectionObserverForDelivery(
     IntersectionObserver& observer) {
-  m_pendingIntersectionObservers.add(&observer);
+  m_pendingIntersectionObservers.insert(&observer);
   postTaskToDeliverObservations();
 }
 
@@ -84,7 +84,7 @@
 
 void IntersectionObserverController::addTrackedObserver(
     IntersectionObserver& observer) {
-  m_trackedIntersectionObservers.add(&observer);
+  m_trackedIntersectionObservers.insert(&observer);
 }
 
 void IntersectionObserverController::removeTrackedObserversForRoot(
diff --git a/third_party/WebKit/Source/core/dom/MessagePort.cpp b/third_party/WebKit/Source/core/dom/MessagePort.cpp
index 3bfd5bd..ca49716 100644
--- a/third_party/WebKit/Source/core/dom/MessagePort.cpp
+++ b/third_party/WebKit/Source/core/dom/MessagePort.cpp
@@ -259,7 +259,7 @@
           "Port at index " + String::number(i) + " is " + type + ".");
       return nullptr;
     }
-    visited.add(port);
+    visited.insert(port);
   }
 
   UseCounter::count(context, UseCounter::MessagePortsTransferred);
diff --git a/third_party/WebKit/Source/core/dom/MutationObserver.cpp b/third_party/WebKit/Source/core/dom/MutationObserver.cpp
index a25ae14..8b00d14 100644
--- a/third_party/WebKit/Source/core/dom/MutationObserver.cpp
+++ b/third_party/WebKit/Source/core/dom/MutationObserver.cpp
@@ -77,7 +77,7 @@
   HashSet<AtomicString> attributeFilter;
   if (observerInit.hasAttributeFilter()) {
     for (const auto& name : observerInit.attributeFilter())
-      attributeFilter.add(AtomicString(name));
+      attributeFilter.insert(AtomicString(name));
     options |= AttributeFilter;
   }
 
@@ -157,7 +157,7 @@
 void MutationObserver::observationStarted(
     MutationObserverRegistration* registration) {
   DCHECK(!m_registrations.contains(registration));
-  m_registrations.add(registration);
+  m_registrations.insert(registration);
 }
 
 void MutationObserver::observationEnded(
@@ -211,7 +211,7 @@
 
 static void activateObserver(MutationObserver* observer) {
   ensureEnqueueMicrotask();
-  activeMutationObservers().add(observer);
+  activeMutationObservers().insert(observer);
 }
 
 void MutationObserver::enqueueMutationRecord(MutationRecord* mutation) {
@@ -303,7 +303,7 @@
   std::sort(observers.begin(), observers.end(), ObserverLessThan());
   for (const auto& observer : observers) {
     if (observer->shouldBeSuspended())
-      suspendedMutationObservers().add(observer);
+      suspendedMutationObservers().insert(observer);
     else
       observer->deliver();
   }
diff --git a/third_party/WebKit/Source/core/dom/MutationObserverRegistration.cpp b/third_party/WebKit/Source/core/dom/MutationObserverRegistration.cpp
index 86bd65c3..d8a4aa0a 100644
--- a/third_party/WebKit/Source/core/dom/MutationObserverRegistration.cpp
+++ b/third_party/WebKit/Source/core/dom/MutationObserverRegistration.cpp
@@ -87,7 +87,7 @@
     m_registrationNodeKeepAlive =
         m_registrationNode.get();  // Balanced in clearTransientRegistrations.
   }
-  m_transientRegistrationNodes->add(&node);
+  m_transientRegistrationNodes->insert(&node);
 }
 
 void MutationObserverRegistration::clearTransientRegistrations() {
@@ -139,12 +139,12 @@
 void MutationObserverRegistration::addRegistrationNodesToSet(
     HeapHashSet<Member<Node>>& nodes) const {
   DCHECK(m_registrationNode);
-  nodes.add(m_registrationNode.get());
+  nodes.insert(m_registrationNode.get());
   if (!m_transientRegistrationNodes)
     return;
   for (NodeHashSet::const_iterator iter = m_transientRegistrationNodes->begin();
        iter != m_transientRegistrationNodes->end(); ++iter)
-    nodes.add(iter->get());
+    nodes.insert(iter->get());
 }
 
 DEFINE_TRACE(MutationObserverRegistration) {
diff --git a/third_party/WebKit/Source/core/dom/NodeRareData.h b/third_party/WebKit/Source/core/dom/NodeRareData.h
index a3c23b7..014be41c 100644
--- a/third_party/WebKit/Source/core/dom/NodeRareData.h
+++ b/third_party/WebKit/Source/core/dom/NodeRareData.h
@@ -50,7 +50,7 @@
   }
 
   void addTransientRegistration(MutationObserverRegistration* registration) {
-    m_transientRegistry.add(
+    m_transientRegistry.insert(
         TraceWrapperMember<MutationObserverRegistration>(this, registration));
   }
 
diff --git a/third_party/WebKit/Source/core/dom/Range.cpp b/third_party/WebKit/Source/core/dom/Range.cpp
index 699262fd..561597f 100644
--- a/third_party/WebKit/Source/core/dom/Range.cpp
+++ b/third_party/WebKit/Source/core/dom/Range.cpp
@@ -1641,7 +1641,7 @@
   for (Node* node = firstNode(); node != stopNode;
        node = NodeTraversal::next(*node)) {
     if (node->isElementNode())
-      nodeSet.add(node);
+      nodeSet.insert(node);
   }
 
   for (Node* node = firstNode(); node != stopNode;
diff --git a/third_party/WebKit/Source/core/dom/ResizeObserverController.cpp b/third_party/WebKit/Source/core/dom/ResizeObserverController.cpp
index 685eb585..b076f72 100644
--- a/third_party/WebKit/Source/core/dom/ResizeObserverController.cpp
+++ b/third_party/WebKit/Source/core/dom/ResizeObserverController.cpp
@@ -12,7 +12,7 @@
     : m_observersChanged(false) {}
 
 void ResizeObserverController::addObserver(ResizeObserver& observer) {
-  m_observers.add(&observer);
+  m_observers.insert(&observer);
 }
 
 size_t ResizeObserverController::gatherObservations(size_t deeperThan) {
diff --git a/third_party/WebKit/Source/core/dom/ScriptRunner.cpp b/third_party/WebKit/Source/core/dom/ScriptRunner.cpp
index 51ed26c..6b7e8009 100644
--- a/third_party/WebKit/Source/core/dom/ScriptRunner.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptRunner.cpp
@@ -53,7 +53,7 @@
   m_document->incrementLoadEventDelayCount();
   switch (executionType) {
     case Async:
-      m_pendingAsyncScripts.add(scriptLoader);
+      m_pendingAsyncScripts.insert(scriptLoader);
       break;
 
     case InOrder:
diff --git a/third_party/WebKit/Source/core/dom/SecurityContext.h b/third_party/WebKit/Source/core/dom/SecurityContext.h
index b58abaa..7a463f87 100644
--- a/third_party/WebKit/Source/core/dom/SecurityContext.h
+++ b/third_party/WebKit/Source/core/dom/SecurityContext.h
@@ -78,7 +78,7 @@
   String addressSpaceForBindings() const;
 
   void addInsecureNavigationUpgrade(unsigned hashedHost) {
-    m_insecureNavigationsToUpgrade.add(hashedHost);
+    m_insecureNavigationsToUpgrade.insert(hashedHost);
   }
   InsecureNavigationsSet* insecureNavigationsToUpgrade() {
     return &m_insecureNavigationsToUpgrade;
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
index b36d197..7950c0b6 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
@@ -214,7 +214,7 @@
 
   setNeedsActiveStyleUpdate(treeScope);
   if (treeScope != m_document)
-    m_activeTreeScopes.add(&treeScope);
+    m_activeTreeScopes.insert(&treeScope);
 }
 
 void StyleEngine::removeStyleSheetCandidateNode(Node& node,
@@ -306,7 +306,7 @@
   DCHECK(collection);
   collection->updateActiveStyleSheets(*this);
   if (!collection->hasStyleSheetCandidateNodes()) {
-    treeScopesRemoved.add(treeScope);
+    treeScopesRemoved.insert(treeScope);
     // When removing TreeScope from ActiveTreeScopes,
     // its resolver should be destroyed by invoking resetAuthorStyle.
     DCHECK(!treeScope->scopedStyleResolver());
@@ -505,7 +505,7 @@
   }
 
   DCHECK(m_styleSheetCollectionMap.contains(&scope));
-  m_dirtyTreeScopes.add(&scope);
+  m_dirtyTreeScopes.insert(&scope);
   document().scheduleLayoutTreeUpdateIfNeeded();
 }
 
diff --git a/third_party/WebKit/Source/core/dom/StyleEngineTest.cpp b/third_party/WebKit/Source/core/dom/StyleEngineTest.cpp
index 6bdeb81..41b7f8b 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngineTest.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngineTest.cpp
@@ -57,7 +57,7 @@
   ruleSet.compactRulesIfNeeded();
   if (ruleSet.needsFullRecalcForRuleSetInvalidation())
     return RuleSetInvalidationFullRecalc;
-  ruleSets.add(&ruleSet);
+  ruleSets.insert(&ruleSet);
   styleEngine().scheduleInvalidationsForRuleSets(treeScope, ruleSets);
   return RuleSetInvalidationsScheduled;
 }
diff --git a/third_party/WebKit/Source/core/dom/VisitedLinkState.cpp b/third_party/WebKit/Source/core/dom/VisitedLinkState.cpp
index dd0fec9..c9ea598 100644
--- a/third_party/WebKit/Source/core/dom/VisitedLinkState.cpp
+++ b/third_party/WebKit/Source/core/dom/VisitedLinkState.cpp
@@ -129,7 +129,7 @@
     return EInsideLink::kInsideVisitedLink;
 
   if (LinkHash hash = linkHashForElement(element, attribute)) {
-    m_linksCheckedForVisitedState.add(hash);
+    m_linksCheckedForVisitedState.insert(hash);
     if (Platform::current()->isLinkVisited(hash))
       return EInsideLink::kInsideVisitedLink;
   }
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementDescriptorTest.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElementDescriptorTest.cpp
index c3d3b984a..025dfd6 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementDescriptorTest.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementDescriptorTest.cpp
@@ -30,7 +30,7 @@
 
 TEST(CustomElementDescriptorTest, hashable) {
   HashSet<CustomElementDescriptor> descriptors;
-  descriptors.add(CustomElementDescriptor("foo-bar", "foo-bar"));
+  descriptors.insert(CustomElementDescriptor("foo-bar", "foo-bar"));
   EXPECT_TRUE(
       descriptors.contains(CustomElementDescriptor("foo-bar", "foo-bar")))
       << "the identical descriptor should be found in the hash set";
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp
index 79d0833..245c52da 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp
@@ -238,7 +238,7 @@
 }
 
 void CustomElementRegistry::entangle(V0CustomElementRegistrationContext* v0) {
-  m_v0->add(v0);
+  m_v0->insert(v0);
   v0->setV1(this);
 }
 
@@ -267,7 +267,7 @@
     set = m_upgradeCandidates->add(name, new UpgradeCandidateSet())
               .storedValue->value;
   }
-  set->add(candidate);
+  set->insert(candidate);
 }
 
 // https://html.spec.whatwg.org/multipage/scripting.html#dom-customelementsregistry-whendefined
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeSorter.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeSorter.cpp
index e915e924..93d6e26 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeSorter.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeSorter.cpp
@@ -28,19 +28,19 @@
 CustomElementUpgradeSorter::addToParentChildMap(Node* parent, Node* child) {
   ParentChildMap::AddResult result = m_parentChildMap->add(parent, nullptr);
   if (!result.isNewEntry) {
-    result.storedValue->value->add(child);
+    result.storedValue->value->insert(child);
     // The entry for the parent exists; so must its parents.
     return kParentAlreadyExistsInMap;
   }
 
   ChildSet* childSet = new ChildSet();
-  childSet->add(child);
+  childSet->insert(child);
   result.storedValue->value = childSet;
   return kParentAddedToMap;
 }
 
 void CustomElementUpgradeSorter::add(Element* element) {
-  m_elements->add(element);
+  m_elements->insert(element);
 
   for (Node *n = element, *parent = n->parentOrShadowHostNode(); parent;
        n = parent, parent = parent->parentOrShadowHostNode()) {
diff --git a/third_party/WebKit/Source/core/dom/custom/V0CustomElementRegistry.cpp b/third_party/WebKit/Source/core/dom/custom/V0CustomElementRegistry.cpp
index 1023ce29..bb4ef57 100644
--- a/third_party/WebKit/Source/core/dom/custom/V0CustomElementRegistry.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/V0CustomElementRegistry.cpp
@@ -100,7 +100,7 @@
     return 0;
 
   m_definitions.add(descriptor, definition);
-  m_registeredTypeNames.add(descriptor.type());
+  m_registeredTypeNames.insert(descriptor.type());
 
   if (!constructorBuilder->didRegisterDefinition()) {
     V0CustomElementException::throwException(
diff --git a/third_party/WebKit/Source/core/editing/SelectionController.cpp b/third_party/WebKit/Source/core/editing/SelectionController.cpp
index cb993f27..cc60d86 100644
--- a/third_party/WebKit/Source/core/editing/SelectionController.cpp
+++ b/third_party/WebKit/Source/core/editing/SelectionController.cpp
@@ -278,8 +278,8 @@
   return targetPosition.compareTo(dragStartPosition) < 0;
 }
 
-static void updateSelectionIfSelectAll(
-    VisibleSelectionInFlatTree& newSelection,
+static SelectionInFlatTree applySelectAll(
+    const VisibleSelectionInFlatTree& newSelection,
     Node* mousePressNode,
     const LayoutPoint& dragStartPoint,
     Node* target,
@@ -292,42 +292,39 @@
 
   if (rootUserSelectAllForMousePressNode &&
       rootUserSelectAllForMousePressNode == rootUserSelectAllForTarget) {
-    newSelection.setBase(mostBackwardCaretPosition(
-        PositionInFlatTree::beforeNode(rootUserSelectAllForMousePressNode),
-        CanCrossEditingBoundary));
-    newSelection.setExtent(mostForwardCaretPosition(
-        PositionInFlatTree::afterNode(rootUserSelectAllForMousePressNode),
-        CanCrossEditingBoundary));
-    return;
+    return SelectionInFlatTree::Builder()
+        .setBaseAndExtent(
+            PositionInFlatTree::beforeNode(rootUserSelectAllForMousePressNode),
+            PositionInFlatTree::afterNode(rootUserSelectAllForMousePressNode))
+        .build();
   }
 
+  SelectionInFlatTree::Builder builder;
   // Reset base for user select all when base is inside user-select-all area
   // and extent < base.
-  if (rootUserSelectAllForMousePressNode) {
-    if (targetPositionIsBeforeDragStartPosition(mousePressNode, dragStartPoint,
-                                                target, hitTestPoint)) {
-      newSelection.setBase(mostForwardCaretPosition(
-          PositionInFlatTree::afterNode(rootUserSelectAllForMousePressNode),
-          CanCrossEditingBoundary));
-    }
+  if (rootUserSelectAllForMousePressNode &&
+      targetPositionIsBeforeDragStartPosition(mousePressNode, dragStartPoint,
+                                              target, hitTestPoint)) {
+    builder.collapse(
+        PositionInFlatTree::afterNode(rootUserSelectAllForMousePressNode));
+  } else {
+    builder.collapse(newSelection.base());
   }
 
   if (rootUserSelectAllForTarget && mousePressNode->layoutObject()) {
     if (targetPositionIsBeforeDragStartPosition(mousePressNode, dragStartPoint,
                                                 target, hitTestPoint)) {
-      newSelection.setExtent(mostBackwardCaretPosition(
-          PositionInFlatTree::beforeNode(rootUserSelectAllForTarget),
-          CanCrossEditingBoundary));
-      return;
+      builder.extend(
+          PositionInFlatTree::beforeNode(rootUserSelectAllForTarget));
+      return builder.build();
     }
 
-    newSelection.setExtent(mostForwardCaretPosition(
-        PositionInFlatTree::afterNode(rootUserSelectAllForTarget),
-        CanCrossEditingBoundary));
-    return;
+    builder.extend(PositionInFlatTree::afterNode(rootUserSelectAllForTarget));
+    return builder.build();
   }
 
-  newSelection.setExtent(targetPosition);
+  builder.extend(targetPosition.deepEquivalent());
+  return builder.build();
 }
 
 void SelectionController::updateSelectionForMouseDrag(
@@ -390,8 +387,9 @@
     newSelection = createVisibleSelection(builder.build());
   }
 
-  updateSelectionIfSelectAll(newSelection, mousePressNode, dragStartPos, target,
-                             hitTestResult.localPoint(), targetPosition);
+  newSelection = createVisibleSelection(
+      applySelectAll(newSelection, mousePressNode, dragStartPos, target,
+                     hitTestResult.localPoint(), targetPosition));
 
   // TODO(yosin): We should have |newBase| and |newExtent| instead of
   // |newSelection|.
diff --git a/third_party/WebKit/Source/core/events/EventDispatcher.cpp b/third_party/WebKit/Source/core/events/EventDispatcher.cpp
index c89649f3..b2c2126 100644
--- a/third_party/WebKit/Source/core/events/EventDispatcher.cpp
+++ b/third_party/WebKit/Source/core/events/EventDispatcher.cpp
@@ -94,7 +94,7 @@
   if (nodesDispatchingSimulatedClicks.contains(&node))
     return;
 
-  nodesDispatchingSimulatedClicks.add(&node);
+  nodesDispatchingSimulatedClicks.insert(&node);
 
   if (mouseEventOptions == SendMouseOverUpDownEvents)
     EventDispatcher(node, MouseEvent::create(EventTypeNames::mouseover,
diff --git a/third_party/WebKit/Source/core/fileapi/FileReader.cpp b/third_party/WebKit/Source/core/fileapi/FileReader.cpp
index 805822b..68f23f6 100644
--- a/third_party/WebKit/Source/core/fileapi/FileReader.cpp
+++ b/third_party/WebKit/Source/core/fileapi/FileReader.cpp
@@ -135,7 +135,7 @@
         m_runningReaders.size() < m_maxRunningReaders) {
       reader->executePendingRead();
       ASSERT(!m_runningReaders.contains(reader));
-      m_runningReaders.add(reader);
+      m_runningReaders.insert(reader);
       return;
     }
     m_pendingReaders.append(reader);
@@ -170,7 +170,7 @@
         return;
       FileReader* reader = m_pendingReaders.takeFirst();
       reader->executePendingRead();
-      m_runningReaders.add(reader);
+      m_runningReaders.insert(reader);
     }
   }
 
diff --git a/third_party/WebKit/Source/core/frame/FrameConsole.cpp b/third_party/WebKit/Source/core/frame/FrameConsole.cpp
index 3d3a5496..03d0c12 100644
--- a/third_party/WebKit/Source/core/frame/FrameConsole.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameConsole.cpp
@@ -103,7 +103,7 @@
 void FrameConsole::addSingletonMessage(ConsoleMessage* consoleMessage) {
   if (m_singletonMessages.contains(consoleMessage->message()))
     return;
-  m_singletonMessages.add(consoleMessage->message());
+  m_singletonMessages.insert(consoleMessage->message());
   addMessage(consoleMessage);
 }
 
diff --git a/third_party/WebKit/Source/core/frame/FrameSerializer.cpp b/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
index 7225b31..0ec8646 100644
--- a/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
@@ -250,7 +250,7 @@
     const String& attributeValue) {
   if (m_elementsWithRewrittenLinks.contains(&element))
     return;
-  m_elementsWithRewrittenLinks.add(&element);
+  m_elementsWithRewrittenLinks.insert(&element);
 
   // Append the rewritten attribute.
   // TODO(tiger): Refactor MarkupAccumulator so it is easier to append an
@@ -395,7 +395,7 @@
     m_resources->append(
         SerializedResource(url, String("text/css"),
                            SharedBuffer::create(text.data(), text.length())));
-    m_resourceURLs.add(url);
+    m_resourceURLs.insert(url);
   }
 
   // Sub resources need to be serialized even if the CSS definition doesn't
@@ -478,7 +478,7 @@
   }
 
   m_resources->append(SerializedResource(url, mimeType, std::move(data)));
-  m_resourceURLs.add(url);
+  m_resourceURLs.insert(url);
 }
 
 void FrameSerializer::addImageToResources(ImageResourceContent* image,
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index e50c31d..b4b05512 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -1438,7 +1438,7 @@
 }
 
 void FrameView::addPart(LayoutPart* object) {
-  m_parts.add(object);
+  m_parts.insert(object);
 }
 
 void FrameView::removePart(LayoutPart* object) {
@@ -1477,7 +1477,7 @@
   if (isHTMLObjectElement(*node) || isHTMLEmbedElement(*node))
     toHTMLPlugInElement(node)->setNeedsWidgetUpdate(true);
 
-  m_partUpdateSet.add(&object);
+  m_partUpdateSet.insert(&object);
 }
 
 void FrameView::setDisplayMode(WebDisplayMode mode) {
@@ -1539,7 +1539,7 @@
 void FrameView::addBackgroundAttachmentFixedObject(LayoutObject* object) {
   ASSERT(!m_backgroundAttachmentFixedObjects.contains(object));
 
-  m_backgroundAttachmentFixedObjects.add(object);
+  m_backgroundAttachmentFixedObjects.insert(object);
   if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
     scrollingCoordinator->frameViewHasBackgroundAttachmentFixedObjectsDidChange(
         this);
@@ -1575,7 +1575,7 @@
   }
 
   if (!m_viewportConstrainedObjects->contains(object)) {
-    m_viewportConstrainedObjects->add(object);
+    m_viewportConstrainedObjects->insert(object);
 
     if (ScrollingCoordinator* scrollingCoordinator =
             this->scrollingCoordinator())
@@ -3606,7 +3606,7 @@
 void FrameView::addResizerArea(LayoutBox& resizerBox) {
   if (!m_resizerAreas)
     m_resizerAreas = WTF::wrapUnique(new ResizerAreaSet);
-  m_resizerAreas->add(&resizerBox);
+  m_resizerAreas->insert(&resizerBox);
 }
 
 void FrameView::removeResizerArea(LayoutBox& resizerBox) {
@@ -3622,7 +3622,7 @@
   ASSERT(scrollableArea);
   if (!m_scrollableAreas)
     m_scrollableAreas = new ScrollableAreaSet;
-  m_scrollableAreas->add(scrollableArea);
+  m_scrollableAreas->insert(scrollableArea);
 
   if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
     scrollingCoordinator->scrollableAreasDidChange();
@@ -3641,7 +3641,7 @@
   ASSERT(scrollableArea);
   if (!m_animatingScrollableAreas)
     m_animatingScrollableAreas = new ScrollableAreaSet;
-  m_animatingScrollableAreas->add(scrollableArea);
+  m_animatingScrollableAreas->insert(scrollableArea);
 }
 
 void FrameView::removeAnimatingScrollableArea(ScrollableArea* scrollableArea) {
@@ -3766,7 +3766,7 @@
 void FrameView::addChild(Widget* child) {
   ASSERT(child != this && !child->parent());
   child->setParent(this);
-  m_children.add(child);
+  m_children.insert(child);
 }
 
 void FrameView::setScrollbarModes(ScrollbarMode horizontalMode,
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
index d95e24c..da76ba78 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -485,7 +485,7 @@
 
 void LocalDOMWindow::registerEventListenerObserver(
     EventListenerObserver* eventListenerObserver) {
-  m_eventListenerObservers.add(eventListenerObserver);
+  m_eventListenerObservers.insert(eventListenerObserver);
 }
 
 void LocalDOMWindow::reset() {
@@ -623,7 +623,7 @@
                            UserGestureIndicator::currentToken());
   timer->startOneShot(0, BLINK_FROM_HERE);
   timer->suspendIfNeeded();
-  m_postMessageTimers.add(timer);
+  m_postMessageTimers.insert(timer);
 }
 
 void LocalDOMWindow::postMessageTimerFired(PostMessageTimer* timer) {
diff --git a/third_party/WebKit/Source/core/frame/PlatformEventDispatcher.cpp b/third_party/WebKit/Source/core/frame/PlatformEventDispatcher.cpp
index f7eebaf..f3536cd4 100644
--- a/third_party/WebKit/Source/core/frame/PlatformEventDispatcher.cpp
+++ b/third_party/WebKit/Source/core/frame/PlatformEventDispatcher.cpp
@@ -20,7 +20,7 @@
   if (m_controllers.contains(controller))
     return;
 
-  m_controllers.add(controller);
+  m_controllers.insert(controller);
 
   if (!m_isListening) {
     startListening();
diff --git a/third_party/WebKit/Source/core/frame/SubresourceIntegrity.cpp b/third_party/WebKit/Source/core/frame/SubresourceIntegrity.cpp
index 26b67f7c..b088046 100644
--- a/third_party/WebKit/Source/core/frame/SubresourceIntegrity.cpp
+++ b/third_party/WebKit/Source/core/frame/SubresourceIntegrity.cpp
@@ -415,7 +415,7 @@
     }
 
     IntegrityMetadata integrityMetadata(digest, algorithm);
-    metadataSet.add(integrityMetadata.toPair());
+    metadataSet.insert(integrityMetadata.toPair());
   }
 
   if (metadataSet.size() == 0 && error)
diff --git a/third_party/WebKit/Source/core/frame/SubresourceIntegrityTest.cpp b/third_party/WebKit/Source/core/frame/SubresourceIntegrityTest.cpp
index 7beac2f..13240b7 100644
--- a/third_party/WebKit/Source/core/frame/SubresourceIntegrityTest.cpp
+++ b/third_party/WebKit/Source/core/frame/SubresourceIntegrityTest.cpp
@@ -141,7 +141,7 @@
       size_t expectedMetadataArraySize) {
     IntegrityMetadataSet expectedMetadataSet;
     for (size_t i = 0; i < expectedMetadataArraySize; i++) {
-      expectedMetadataSet.add(expectedMetadataArray[i].toPair());
+      expectedMetadataSet.insert(expectedMetadataArray[i].toPair());
     }
     IntegrityMetadataSet metadataSet;
     EXPECT_EQ(SubresourceIntegrity::IntegrityParseValidResult,
diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
index 9b43214a..987e599 100644
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
@@ -1494,7 +1494,7 @@
 }
 
 void ContentSecurityPolicy::didSendViolationReport(const String& report) {
-  m_violationReportsSent.add(report.impl()->hash());
+  m_violationReportsSent.insert(report.impl()->hash());
 }
 
 const char* ContentSecurityPolicy::getDirectiveName(const DirectiveType& type) {
diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp
index 5256b4e..993fcd4 100644
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp
@@ -383,7 +383,7 @@
 TEST_F(ContentSecurityPolicyTest, RequireSRIForInHeaderPresentIntegrity) {
   KURL url(KURL(), "https://example.test");
   IntegrityMetadataSet integrityMetadata;
-  integrityMetadata.add(
+  integrityMetadata.insert(
       IntegrityMetadata("1234", HashAlgorithmSha384).toPair());
   csp->bindToExecutionContext(document.get());
   // Enforce
@@ -551,7 +551,7 @@
 TEST_F(ContentSecurityPolicyTest, RequireSRIForInMetaPresentIntegrity) {
   KURL url(KURL(), "https://example.test");
   IntegrityMetadataSet integrityMetadata;
-  integrityMetadata.add(
+  integrityMetadata.insert(
       IntegrityMetadata("1234", HashAlgorithmSha384).toPair());
   csp->bindToExecutionContext(document.get());
   // Enforce
diff --git a/third_party/WebKit/Source/core/frame/csp/MediaListDirective.cpp b/third_party/WebKit/Source/core/frame/csp/MediaListDirective.cpp
index 274dd2c..9087712 100644
--- a/third_party/WebKit/Source/core/frame/csp/MediaListDirective.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/MediaListDirective.cpp
@@ -77,7 +77,7 @@
       policy()->reportInvalidPluginTypes(String(begin, position - begin));
       continue;
     }
-    m_pluginTypes.add(String(begin, position - begin));
+    m_pluginTypes.insert(String(begin, position - begin));
 
     ASSERT(position == end || isASCIISpace(*position));
   }
@@ -111,7 +111,7 @@
   HashSet<String> normalized;
   for (const auto& type : m_pluginTypes) {
     if (other.contains(type))
-      normalized.add(type);
+      normalized.insert(type);
   }
 
   return normalized;
diff --git a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
index 578582d2..d9807bd 100644
--- a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.cpp
@@ -561,13 +561,13 @@
 }
 
 void SourceListDirective::addSourceNonce(const String& nonce) {
-  m_nonces.add(nonce);
+  m_nonces.insert(nonce);
 }
 
 void SourceListDirective::addSourceHash(
     const ContentSecurityPolicyHashAlgorithm& algorithm,
     const DigestValue& hash) {
-  m_hashes.add(CSPHashValue(algorithm, hash));
+  m_hashes.insert(CSPHashValue(algorithm, hash));
   m_hashAlgorithmsUsed |= algorithm;
 }
 
@@ -719,7 +719,7 @@
   HashSet<String> normalized;
   for (const auto& nonce : m_nonces) {
     if (other.contains(nonce))
-      normalized.add(nonce);
+      normalized.insert(nonce);
   }
 
   return normalized;
@@ -733,7 +733,7 @@
   HashSet<CSPHashValue> normalized;
   for (const auto& hash : m_hashes) {
     if (other.contains(hash))
-      normalized.add(hash);
+      normalized.insert(hash);
   }
 
   return normalized;
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
index 363c577f..084703a4 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
@@ -773,7 +773,7 @@
 }
 
 void HTMLCanvasElement::addListener(CanvasDrawListener* listener) {
-  m_listeners.add(listener);
+  m_listeners.insert(listener);
 }
 
 void HTMLCanvasElement::removeListener(CanvasDrawListener* listener) {
diff --git a/third_party/WebKit/Source/core/html/HTMLCollection.cpp b/third_party/WebKit/Source/core/html/HTMLCollection.cpp
index 33a3c2f..05d5411 100644
--- a/third_party/WebKit/Source/core/html/HTMLCollection.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLCollection.cpp
@@ -455,7 +455,7 @@
     const AtomicString& idAttribute = element->getIdAttribute();
     if (!idAttribute.isEmpty()) {
       HashSet<AtomicString>::AddResult addResult =
-          existingNames.add(idAttribute);
+          existingNames.insert(idAttribute);
       if (addResult.isNewEntry)
         names.push_back(idAttribute);
     }
@@ -466,7 +466,7 @@
         (type() != DocAll ||
          nameShouldBeVisibleInDocumentAll(toHTMLElement(*element)))) {
       HashSet<AtomicString>::AddResult addResult =
-          existingNames.add(nameAttribute);
+          existingNames.insert(nameAttribute);
       if (addResult.isNewEntry)
         names.push_back(nameAttribute);
     }
diff --git a/third_party/WebKit/Source/core/html/HTMLDocument.cpp b/third_party/WebKit/Source/core/html/HTMLDocument.cpp
index 358922ba..e100e978ee8 100644
--- a/third_party/WebKit/Source/core/html/HTMLDocument.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLDocument.cpp
@@ -210,7 +210,7 @@
 
   attrSet->reserveCapacityForSize(WTF_ARRAY_LENGTH(caseInsensitiveAttributes));
   for (const QualifiedName* attr : caseInsensitiveAttributes)
-    attrSet->add(attr->localName().impl());
+    attrSet->insert(attr->localName().impl());
 
   return attrSet;
 }
diff --git a/third_party/WebKit/Source/core/html/HTMLFormControlsCollection.cpp b/third_party/WebKit/Source/core/html/HTMLFormControlsCollection.cpp
index 8810a78..6a508c4 100644
--- a/third_party/WebKit/Source/core/html/HTMLFormControlsCollection.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLFormControlsCollection.cpp
@@ -143,11 +143,11 @@
       const AtomicString& nameAttrVal = element->getNameAttribute();
       if (!idAttrVal.isEmpty()) {
         cache->addElementWithId(idAttrVal, element);
-        foundInputElements.add(idAttrVal.impl());
+        foundInputElements.insert(idAttrVal.impl());
       }
       if (!nameAttrVal.isEmpty() && idAttrVal != nameAttrVal) {
         cache->addElementWithName(nameAttrVal, element);
-        foundInputElements.add(nameAttrVal.impl());
+        foundInputElements.insert(nameAttrVal.impl());
       }
     }
   }
@@ -205,14 +205,14 @@
     const AtomicString& idAttribute = element->getIdAttribute();
     if (!idAttribute.isEmpty()) {
       HashSet<AtomicString>::AddResult addResult =
-          existingNames.add(idAttribute);
+          existingNames.insert(idAttribute);
       if (addResult.isNewEntry)
         names.push_back(idAttribute);
     }
     const AtomicString& nameAttribute = element->getNameAttribute();
     if (!nameAttribute.isEmpty()) {
       HashSet<AtomicString>::AddResult addResult =
-          existingNames.add(nameAttribute);
+          existingNames.insert(nameAttribute);
       if (addResult.isNewEntry)
         names.push_back(nameAttribute);
     }
diff --git a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
index cebcc0b..9a425115 100644
--- a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
@@ -116,7 +116,7 @@
 // Unlike moveWidgetToParentSoon, this will not call dispose the Widget.
 void temporarilyRemoveWidgetFromParentSoon(Widget* widget) {
   if (s_updateSuspendCount) {
-    widgetsPendingTemporaryRemovalFromParent().add(widget);
+    widgetsPendingTemporaryRemovalFromParent().insert(widget);
   } else {
     if (toFrameView(widget->parent()))
       toFrameView(widget->parent())->removeChild(widget);
@@ -215,7 +215,7 @@
 
 void HTMLFrameOwnerElement::disposeWidgetSoon(Widget* widget) {
   if (s_updateSuspendCount) {
-    widgetsPendingDispose().add(widget);
+    widgetsPendingDispose().insert(widget);
     return;
   }
   widget->dispose();
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index 589e7c2..c12b486 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -164,7 +164,7 @@
   } else {
     set = it->value;
   }
-  set->add(element);
+  set->insert(element);
 }
 
 void removeElementFromDocumentMap(HTMLMediaElement* element,
diff --git a/third_party/WebKit/Source/core/html/HTMLObjectElement.cpp b/third_party/WebKit/Source/core/html/HTMLObjectElement.cpp
index ee1eeb0f..780bb4b 100644
--- a/third_party/WebKit/Source/core/html/HTMLObjectElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLObjectElement.cpp
@@ -162,7 +162,7 @@
     if (name.isEmpty())
       continue;
 
-    uniqueParamNames.add(name.impl());
+    uniqueParamNames.insert(name.impl());
     paramNames.push_back(p->name());
     paramValues.push_back(p->value());
 
@@ -191,7 +191,7 @@
   String codebase;
   if (MIMETypeRegistry::isJavaAppletMIMEType(serviceType)) {
     codebase = "codebase";
-    uniqueParamNames.add(
+    uniqueParamNames.insert(
         codebase.impl());  // pretend we found it in a PARAM already
   }
 
diff --git a/third_party/WebKit/Source/core/html/HTMLOptionsCollection.cpp b/third_party/WebKit/Source/core/html/HTMLOptionsCollection.cpp
index 5445526..321ba136 100644
--- a/third_party/WebKit/Source/core/html/HTMLOptionsCollection.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLOptionsCollection.cpp
@@ -53,14 +53,14 @@
     const AtomicString& idAttribute = element->getIdAttribute();
     if (!idAttribute.isEmpty()) {
       HashSet<AtomicString>::AddResult addResult =
-          existingNames.add(idAttribute);
+          existingNames.insert(idAttribute);
       if (addResult.isNewEntry)
         names.push_back(idAttribute);
     }
     const AtomicString& nameAttribute = element->getNameAttribute();
     if (!nameAttribute.isEmpty()) {
       HashSet<AtomicString>::AddResult addResult =
-          existingNames.add(nameAttribute);
+          existingNames.insert(nameAttribute);
       if (addResult.isNewEntry)
         names.push_back(nameAttribute);
     }
diff --git a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
index 2ddfe27b..d415f99f 100644
--- a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
+++ b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
@@ -171,9 +171,9 @@
 
   if (hasURL) {
     if (taintOrigin)
-      m_dirtyURLs.add(sourceURL.getString());
+      m_dirtyURLs.insert(sourceURL.getString());
     else
-      m_cleanURLs.add(sourceURL.getString());
+      m_cleanURLs.insert(sourceURL.getString());
   }
   return taintOrigin;
 }
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp b/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp
index 940c1aa..3128d7f 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp
@@ -90,7 +90,7 @@
     Settings* settings = m_document->settings();
     if (settings && (settings->getCSSExternalScannerNoPreload() ||
                      settings->getCSSExternalScannerPreload()))
-      m_cssPreloaders.add(new CSSPreloaderResourceClient(resource, this));
+      m_cssPreloaders.insert(new CSSPreloaderResourceClient(resource, this));
   }
 }
 
diff --git a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
index 2fa3ee2..25f506b8 100644
--- a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
+++ b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
@@ -199,7 +199,7 @@
 }
 
 void ImageBitmapFactories::addLoader(ImageBitmapLoader* loader) {
-  m_pendingLoaders.add(loader);
+  m_pendingLoaders.insert(loader);
 }
 
 void ImageBitmapFactories::didFinishLoading(ImageBitmapLoader* loader) {
diff --git a/third_party/WebKit/Source/core/input/TouchEventManager.cpp b/third_party/WebKit/Source/core/input/TouchEventManager.cpp
index 8d161e1e..81bfa6a 100644
--- a/third_party/WebKit/Source/core/input/TouchEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/TouchEventManager.cpp
@@ -164,7 +164,7 @@
       if (!changedTouches[pointState].m_touches)
         changedTouches[pointState].m_touches = TouchList::create();
       changedTouches[pointState].m_touches->append(touch);
-      changedTouches[pointState].m_targets.add(touchInfo.touchNode);
+      changedTouches[pointState].m_targets.insert(touchInfo.touchNode);
       changedTouches[pointState].m_pointerType =
           point.pointerProperties().pointerType;
     }
diff --git a/third_party/WebKit/Source/core/inspector/DOMPatchSupport.cpp b/third_party/WebKit/Source/core/inspector/DOMPatchSupport.cpp
index d60da0bd..996f183 100644
--- a/third_party/WebKit/Source/core/inspector/DOMPatchSupport.cpp
+++ b/third_party/WebKit/Source/core/inspector/DOMPatchSupport.cpp
@@ -335,7 +335,7 @@
       usedNewOrdinals;
   for (size_t i = 0; i < oldList.size(); ++i) {
     if (oldMap[i].first) {
-      if (usedNewOrdinals.add(oldMap[i].second).isNewEntry)
+      if (usedNewOrdinals.insert(oldMap[i].second).isNewEntry)
         continue;
       oldMap[i].first = 0;
       oldMap[i].second = 0;
@@ -387,7 +387,7 @@
       newMap[i].second = 0;
       continue;
     }
-    usedOldOrdinals.add(oldOrdinal);
+    usedOldOrdinals.insert(oldOrdinal);
     markNodeAsUsed(newMap[i].first);
   }
 
diff --git a/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp
index 633d8ee..081bdb56 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp
@@ -350,7 +350,7 @@
     m_idToAnimationClone.remove(animationId);
     m_idToAnimation.remove(animationId);
     m_idToAnimationType.remove(animationId);
-    m_clearedAnimations.add(animationId);
+    m_clearedAnimations.insert(animationId);
   }
   return Response::OK();
 }
diff --git a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
index fa2948f..c893609 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
@@ -130,7 +130,7 @@
     if (!rule || rule->type() != CSSRule::kStyleRule ||
         uniqRulesSet.contains(rule))
       continue;
-    uniqRulesSet.add(rule);
+    uniqRulesSet.insert(rule);
     uniqRules.push_back(toCSSStyleRule(rule));
   }
   uniqRules.reverse();
@@ -775,7 +775,7 @@
 }
 
 void InspectorCSSAgent::activeStyleSheetsUpdated(Document* document) {
-  m_invalidatedDocuments.add(document);
+  m_invalidatedDocuments.insert(document);
 }
 
 void InspectorCSSAgent::updateActiveStyleSheets(
@@ -829,7 +829,7 @@
                  !m_cssStyleSheetToInspectorStyleSheet.contains(cssStyleSheet);
     if (isNew) {
       InspectorStyleSheet* newStyleSheet = bindStyleSheet(cssStyleSheet);
-      documentCSSStyleSheets->add(cssStyleSheet);
+      documentCSSStyleSheets->insert(cssStyleSheet);
       if (frontend())
         frontend()->styleSheetAdded(
             newStyleSheet->buildObjectForStyleSheetInfo());
@@ -2057,7 +2057,7 @@
   for (auto& state : m_nodeIdToForcedPseudoState) {
     Element* element = toElement(m_domAgent->nodeForId(state.key));
     if (element && element->ownerDocument())
-      documentsToChange.add(element->ownerDocument());
+      documentsToChange.insert(element->ownerDocument());
   }
 
   m_nodeIdToForcedPseudoState.clear();
diff --git a/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp
index 5412bae..bad7716 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp
@@ -162,7 +162,7 @@
 
 void InspectorRevalidateDOMTask::scheduleStyleAttrRevalidationFor(
     Element* element) {
-  m_styleAttrInvalidatedElements.add(element);
+  m_styleAttrInvalidatedElements.insert(element);
   if (!m_timer.isActive())
     m_timer.startOneShot(0, BLINK_FROM_HERE);
 }
@@ -569,7 +569,7 @@
         continue;
       const SpaceSplitString& classNameList = element.classNames();
       for (unsigned i = 0; i < classNameList.size(); ++i)
-        uniqueNames.add(classNameList[i]);
+        uniqueNames.insert(classNameList[i]);
     }
   }
   for (const String& className : uniqueNames)
@@ -1719,14 +1719,14 @@
     if (firstChild && firstChild->getNodeType() == Node::kTextNode &&
         !firstChild->nextSibling()) {
       children->addItem(buildObjectForNode(firstChild, 0, pierce, nodesMap));
-      m_childrenRequested.add(bind(container, nodesMap));
+      m_childrenRequested.insert(bind(container, nodesMap));
     }
     return children;
   }
 
   Node* child = innerFirstChild(container);
   depth--;
-  m_childrenRequested.add(bind(container, nodesMap));
+  m_childrenRequested.insert(bind(container, nodesMap));
 
   while (child) {
     children->addItem(buildObjectForNode(child, depth, pierce, nodesMap));
diff --git a/third_party/WebKit/Source/core/inspector/InspectorHighlight.cpp b/third_party/WebKit/Source/core/inspector/InspectorHighlight.cpp
index 8132d6b0..fe169791 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorHighlight.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorHighlight.cpp
@@ -195,7 +195,7 @@
     size_t classNameCount = classNamesString.size();
     for (size_t i = 0; i < classNameCount; ++i) {
       const AtomicString& className = classNamesString[i];
-      if (!usedClassNames.add(className).isNewEntry)
+      if (!usedClassNames.insert(className).isNewEntry)
         continue;
       classNames.append('.');
       classNames.append(className);
diff --git a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
index 2aab6c33..47c84b4 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
@@ -936,7 +936,7 @@
   if (!m_replayXHRs.contains(xhr))
     return;
   DCHECK(m_removeFinishedReplayXHRTimer);
-  m_replayXHRsToBeDeleted.add(xhr);
+  m_replayXHRsToBeDeleted.insert(xhr);
   m_replayXHRs.remove(xhr);
   m_removeFinishedReplayXHRTimer->startOneShot(0, BLINK_FROM_HERE);
 }
@@ -1397,7 +1397,7 @@
   xhr->sendForInspectorXHRReplay(xhrReplayData->formData(),
                                  IGNORE_EXCEPTION_FOR_TESTING);
 
-  m_replayXHRs.add(xhr);
+  m_replayXHRs.insert(xhr);
   return Response::OK();
 }
 
diff --git a/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.cpp b/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.cpp
index 8fce332..790d5bb 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.cpp
@@ -120,14 +120,14 @@
     resourceRequest.setRequestContext(WebURLRequest::RequestContextInternal);
 
     if (!resourceRequest.url().getString().isEmpty()) {
-      urlsToFetch.add(resourceRequest.url().getString());
+      urlsToFetch.insert(resourceRequest.url().getString());
       FetchRequest request(resourceRequest, FetchInitiatorTypeNames::internal);
       Resource* resource = RawResource::fetch(request, document->fetcher());
       if (resource) {
         // Prevent garbage collection by holding a reference to this resource.
         m_resources.push_back(resource);
         ResourceClient* resourceClient = new ResourceClient(this);
-        m_pendingResourceClients.add(resourceClient);
+        m_pendingResourceClients.insert(resourceClient);
         resourceClient->waitForResource(resource);
       }
     }
@@ -140,7 +140,7 @@
       String url = styleSheet->href();
       if (url.isEmpty() || urlsToFetch.contains(url))
         continue;
-      urlsToFetch.add(url);
+      urlsToFetch.insert(url);
       FetchRequest request(ResourceRequest(url),
                            FetchInitiatorTypeNames::internal);
       request.mutableResourceRequest().setRequestContext(
@@ -152,7 +152,7 @@
       // Prevent garbage collection by holding a reference to this resource.
       m_resources.push_back(resource);
       ResourceClient* resourceClient = new ResourceClient(this);
-      m_pendingResourceClients.add(resourceClient);
+      m_pendingResourceClients.insert(resourceClient);
       resourceClient->waitForResource(resource);
     }
   }
diff --git a/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp b/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp
index 6f13b67..05cbeb1 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp
@@ -139,7 +139,7 @@
     const CSSSelector* simpleSelector = subSelector;
     while (simpleSelector) {
       if (simpleSelector->match() == CSSSelector::Class)
-        uniqueNames.add(simpleSelector->value());
+        uniqueNames.insert(simpleSelector->value());
       simpleSelector = simpleSelector->tagHistory();
     }
   }
@@ -775,13 +775,13 @@
         m_sourceData->propertyData;
     for (const auto& data : sourcePropertyData) {
       result.push_back(data);
-      sourcePropertyNames.add(data.name.lower());
+      sourcePropertyNames.insert(data.name.lower());
     }
   }
 
   for (int i = 0, size = m_style->length(); i < size; ++i) {
     String name = m_style->item(i);
-    if (!sourcePropertyNames.add(name.lower()).isNewEntry)
+    if (!sourcePropertyNames.insert(name.lower()).isNewEntry)
       continue;
 
     String value = m_style->getPropertyValue(name);
@@ -839,7 +839,7 @@
 
       String shorthand = m_style->getPropertyShorthand(name);
       if (!shorthand.isEmpty()) {
-        if (foundShorthands.add(shorthand).isNewEntry) {
+        if (foundShorthands.insert(shorthand).isNewEntry) {
           std::unique_ptr<protocol::CSS::ShorthandEntry> entry =
               protocol::CSS::ShorthandEntry::create()
                   .setName(shorthand)
diff --git a/third_party/WebKit/Source/core/layout/DepthOrderedLayoutObjectList.cpp b/third_party/WebKit/Source/core/layout/DepthOrderedLayoutObjectList.cpp
index 17528f5..c1e9038 100644
--- a/third_party/WebKit/Source/core/layout/DepthOrderedLayoutObjectList.cpp
+++ b/third_party/WebKit/Source/core/layout/DepthOrderedLayoutObjectList.cpp
@@ -38,7 +38,7 @@
 
 void DepthOrderedLayoutObjectList::add(LayoutObject& object) {
   ASSERT(!object.frameView()->isInPerformLayout());
-  m_data->m_objects.add(&object);
+  m_data->m_objects.insert(&object);
   m_data->m_orderedObjects.clear();
 }
 
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
index 49d25e0..f2f945d 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
@@ -1262,7 +1262,7 @@
          ++it) {
       const FloatingObject& floatingObject = *it->get();
       if (!floatingObject.isDescendant())
-        oldIntrudingFloatSet.add(floatingObject.layoutObject());
+        oldIntrudingFloatSet.insert(floatingObject.layoutObject());
     }
   }
 
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
index 798e9a9..50348ea 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
@@ -588,7 +588,7 @@
         for (HashSet<const SimpleFontData*>::const_iterator it =
                  wordMeasurement.fallbackFonts.begin();
              it != end; ++it)
-          fallbackFonts.add(*it);
+          fallbackFonts.insert(*it);
       }
     }
     wordMeasurementsIndex = i;
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 5c3b3af..24e8029 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -5673,7 +5673,7 @@
 }
 
 void LayoutBox::addSnapArea(const LayoutBox& snapArea) {
-  ensureRareData().ensureSnapAreas().add(&snapArea);
+  ensureRareData().ensureSnapAreas().insert(&snapArea);
 }
 
 void LayoutBox::removeSnapArea(const LayoutBox& snapArea) {
diff --git a/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp b/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
index a0602ae9..bd33f446 100644
--- a/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
@@ -103,7 +103,7 @@
       }
 
       if (m_currentChild && notFirstOrdinalValue())
-        m_ordinalValues.add(m_currentChild->style()->boxOrdinalGroup());
+        m_ordinalValues.insert(m_currentChild->style()->boxOrdinalGroup());
     } while (!m_currentChild ||
              (!m_currentChild->isAnonymous() &&
               m_currentChild->style()->boxOrdinalGroup() != m_currentOrdinal));
diff --git a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
index e859346c..7d04c86 100644
--- a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
@@ -884,7 +884,7 @@
                child.scrollbarLogicalWidth() - child.scrollbarLogicalWidth();
   }
   m_intrinsicSizeAlongMainAxis.set(&child, mainSize);
-  m_relaidOutChildren.add(&child);
+  m_relaidOutChildren.insert(&child);
 }
 
 void LayoutFlexibleBox::clearCachedMainSizeForChild(const LayoutBox& child) {
@@ -1827,7 +1827,7 @@
     if (!child->needsLayout())
       markChildForPaginationRelayoutIfNeeded(*child, layoutScope);
     if (child->needsLayout())
-      m_relaidOutChildren.add(child);
+      m_relaidOutChildren.insert(child);
     child->layoutIfNeeded();
 
     updateAutoMarginsInMainAxis(*child, autoMarginOffset);
diff --git a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
index 017e0da..34621286 100644
--- a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
@@ -1135,7 +1135,7 @@
       flexFactorSum -= flexFactor;
       if (!additionalTracksToTreatAsInflexible)
         additionalTracksToTreatAsInflexible = WTF::makeUnique<TrackIndexSet>();
-      additionalTracksToTreatAsInflexible->add(index);
+      additionalTracksToTreatAsInflexible->insert(index);
       validFlexFactorUnit = false;
     }
   }
@@ -1532,7 +1532,7 @@
                              ? sizingData.columnTracks[trackIndex]
                              : sizingData.rowTracks[trackIndex];
       while (LayoutBox* gridItem = iterator.nextGridItem()) {
-        if (itemsSet.add(gridItem).isNewEntry) {
+        if (itemsSet.insert(gridItem).isNewEntry) {
           const GridSpan& span = grid.gridItemSpan(*gridItem, direction);
           if (span.integerSpan() == 1) {
             resolveContentBasedTrackSizingFunctionsForNonSpanningItems(
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
index e7e3bd17..0f6f0eef 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
@@ -1285,7 +1285,7 @@
 #endif
       if (cell->hasVisualOverflow() &&
           !m_forceSlowPaintPathWithOverflowingCell) {
-        m_overflowingCells.add(cell);
+        m_overflowingCells.insert(cell);
         if (m_overflowingCells.size() > maxAllowedOverflowingCellsCount) {
           // We need to set m_forcesSlowPaintPath only if there is a least one
           // overflowing cells as the hit testing code rely on this information.
diff --git a/third_party/WebKit/Source/core/layout/LayoutTextControl.cpp b/third_party/WebKit/Source/core/layout/LayoutTextControl.cpp
index 29f941b8..67d63bd 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTextControl.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTextControl.cpp
@@ -224,7 +224,7 @@
 
     for (size_t i = 0; i < WTF_ARRAY_LENGTH(fontFamiliesWithInvalidCharWidth);
          ++i)
-      fontFamiliesWithInvalidCharWidthMap->add(
+      fontFamiliesWithInvalidCharWidthMap->insert(
           AtomicString(fontFamiliesWithInvalidCharWidth[i]));
   }
 
diff --git a/third_party/WebKit/Source/core/layout/LayoutView.cpp b/third_party/WebKit/Source/core/layout/LayoutView.cpp
index d550901f..ec371a8 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
@@ -592,7 +592,7 @@
       while (cb && !cb->isLayoutView()) {
         selRect.unite(selectionRectForLayoutObject(cb));
         VisitedContainingBlockSet::AddResult addResult =
-            visitedContainingBlocks.add(cb);
+            visitedContainingBlocks.insert(cb);
         if (!addResult.isNewEntry)
           break;
         cb = cb->containingBlock();
diff --git a/third_party/WebKit/Source/core/layout/SubtreeLayoutScope.cpp b/third_party/WebKit/Source/core/layout/SubtreeLayoutScope.cpp
index 212ac74e..f64728e 100644
--- a/third_party/WebKit/Source/core/layout/SubtreeLayoutScope.cpp
+++ b/third_party/WebKit/Source/core/layout/SubtreeLayoutScope.cpp
@@ -63,7 +63,7 @@
 void SubtreeLayoutScope::recordObjectMarkedForLayout(
     LayoutObject* layoutObject) {
 #if DCHECK_IS_ON()
-  m_layoutObjectsToLayout.add(layoutObject);
+  m_layoutObjectsToLayout.insert(layoutObject);
 #endif
 }
 
diff --git a/third_party/WebKit/Source/core/layout/TextAutosizer.cpp b/third_party/WebKit/Source/core/layout/TextAutosizer.cpp
index 361403e..a684c82c 100644
--- a/third_party/WebKit/Source/core/layout/TextAutosizer.cpp
+++ b/third_party/WebKit/Source/core/layout/TextAutosizer.cpp
@@ -361,7 +361,7 @@
 TextAutosizer::BeginLayoutBehavior TextAutosizer::prepareForLayout(
     LayoutBlock* block) {
 #if DCHECK_IS_ON()
-  m_blocksThatHaveBegunLayout.add(block);
+  m_blocksThatHaveBegunLayout.insert(block);
 #endif
 
   if (!m_firstBlockToBeginLayout) {
@@ -386,7 +386,7 @@
   if (layoutObject->isLayoutBlock()) {
     LayoutBlock* block = toLayoutBlock(layoutObject);
 #if DCHECK_IS_ON()
-    m_blocksThatHaveBegunLayout.add(block);
+    m_blocksThatHaveBegunLayout.insert(block);
 #endif
     if (Cluster* cluster = maybeCreateCluster(block))
       m_clusterStack.push_back(WTF::wrapUnique(cluster));
@@ -556,8 +556,8 @@
         if (supercluster &&
             supercluster->m_inheritParentMultiplier == DontInheritMultiplier) {
           if (supercluster->m_hasEnoughTextToAutosize == NotEnoughText) {
-            m_fingerprintMapper.getPotentiallyInconsistentSuperclusters().add(
-                supercluster);
+            m_fingerprintMapper.getPotentiallyInconsistentSuperclusters()
+                .insert(supercluster);
           }
           return;
         }
@@ -572,7 +572,7 @@
 
   // If we didn't add any supercluster, we should add one.
   if (lastSupercluster) {
-    m_fingerprintMapper.getPotentiallyInconsistentSuperclusters().add(
+    m_fingerprintMapper.getPotentiallyInconsistentSuperclusters().insert(
         lastSupercluster);
   }
 }
@@ -1278,7 +1278,7 @@
       m_blocksForFingerprint.add(fingerprint, std::unique_ptr<BlockSet>());
   if (addResult.isNewEntry)
     addResult.storedValue->value = WTF::wrapUnique(new BlockSet);
-  addResult.storedValue->value->add(block);
+  addResult.storedValue->value->insert(block);
 #if DCHECK_IS_ON()
   assertMapsAreConsistent();
 #endif
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.cpp
index 2e525ba..525258e 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.cpp
@@ -186,7 +186,7 @@
 
 void LayoutSVGResourceContainer::addClient(LayoutObject* client) {
   ASSERT(client);
-  m_clients.add(client);
+  m_clients.insert(client);
   clearInvalidationMask();
 }
 
@@ -269,7 +269,7 @@
 
   for (SVGElement* element : *dependencies) {
     if (LayoutObject* layoutObject = element->layoutObject()) {
-      if (UNLIKELY(!invalidatingDependencies.add(element).isNewEntry)) {
+      if (UNLIKELY(!invalidatingDependencies.insert(element).isNewEntry)) {
         // Reference cycle: we are in process of invalidating this dependant.
         continue;
       }
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGResources.cpp b/third_party/WebKit/Source/core/layout/svg/SVGResources.cpp
index 785fa11..95c9032 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGResources.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/SVGResources.cpp
@@ -442,33 +442,33 @@
     ASSERT(!m_clipperFilterMaskerData);
     ASSERT(!m_markerData);
     ASSERT(!m_fillStrokeData);
-    set.add(m_linkedResource);
+    set.insert(m_linkedResource);
     return;
   }
 
   if (m_clipperFilterMaskerData) {
     if (m_clipperFilterMaskerData->clipper)
-      set.add(m_clipperFilterMaskerData->clipper);
+      set.insert(m_clipperFilterMaskerData->clipper);
     if (m_clipperFilterMaskerData->filter)
-      set.add(m_clipperFilterMaskerData->filter);
+      set.insert(m_clipperFilterMaskerData->filter);
     if (m_clipperFilterMaskerData->masker)
-      set.add(m_clipperFilterMaskerData->masker);
+      set.insert(m_clipperFilterMaskerData->masker);
   }
 
   if (m_markerData) {
     if (m_markerData->markerStart)
-      set.add(m_markerData->markerStart);
+      set.insert(m_markerData->markerStart);
     if (m_markerData->markerMid)
-      set.add(m_markerData->markerMid);
+      set.insert(m_markerData->markerMid);
     if (m_markerData->markerEnd)
-      set.add(m_markerData->markerEnd);
+      set.insert(m_markerData->markerEnd);
   }
 
   if (m_fillStrokeData) {
     if (m_fillStrokeData->fill)
-      set.add(m_fillStrokeData->fill);
+      set.insert(m_fillStrokeData->fill);
     if (m_fillStrokeData->stroke)
-      set.add(m_fillStrokeData->stroke);
+      set.insert(m_fillStrokeData->stroke);
   }
 }
 
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGResourcesCycleSolver.cpp b/third_party/WebKit/Source/core/layout/svg/SVGResourcesCycleSolver.cpp
index b155c74..8ee065e 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGResourcesCycleSolver.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/SVGResourcesCycleSolver.cpp
@@ -46,7 +46,7 @@
 
   ActiveFrame(ResourceSet& activeSet, LayoutSVGResourceContainer* resource)
       : m_activeSet(activeSet), m_resource(resource) {
-    m_activeSet.add(m_resource);
+    m_activeSet.insert(m_resource);
   }
   ~ActiveFrame() { m_activeSet.remove(m_resource); }
 
@@ -87,7 +87,7 @@
   }
 
   // No cycles found in (or from) this resource. Add it to the "DAG cache".
-  m_dagCache.add(resource);
+  m_dagCache.insert(resource);
   return false;
 }
 
@@ -97,7 +97,7 @@
   // If the starting LayoutObject is a resource container itself, then add it
   // to the active set (to break direct self-references.)
   if (m_layoutObject->isSVGResourceContainer())
-    m_activeResources.add(toLayoutSVGResourceContainer(m_layoutObject));
+    m_activeResources.insert(toLayoutSVGResourceContainer(m_layoutObject));
 
   ResourceSet localResources;
   m_resources->buildSetOfResources(localResources);
diff --git a/third_party/WebKit/Source/core/loader/CrossOriginPreflightResultCache.cpp b/third_party/WebKit/Source/core/loader/CrossOriginPreflightResultCache.cpp
index e987bfb..513e453 100644
--- a/third_party/WebKit/Source/core/loader/CrossOriginPreflightResultCache.cpp
+++ b/third_party/WebKit/Source/core/loader/CrossOriginPreflightResultCache.cpp
@@ -72,7 +72,7 @@
   while (end && isSpaceOrNewline((*stringImpl)[end]))
     --end;
 
-  set.add(string.substring(start, end - start + 1));
+  set.insert(string.substring(start, end - start + 1));
 }
 
 template <class HashType>
diff --git a/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp b/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp
index a3f5aac..b6930b1 100644
--- a/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp
+++ b/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp
@@ -214,7 +214,7 @@
   WebOriginTrialTokenStatus tokenResult =
       m_trialTokenValidator->validateToken(token, origin, &trialName);
   if (tokenResult == WebOriginTrialTokenStatus::Success)
-    m_enabledTrials.add(trialName);
+    m_enabledTrials.insert(trialName);
 
   tokenValidationResultHistogram().count(static_cast<int>(tokenResult));
 }
diff --git a/third_party/WebKit/Source/core/page/Page.cpp b/third_party/WebKit/Source/core/page/Page.cpp
index 1cfac486..6557e088 100644
--- a/third_party/WebKit/Source/core/page/Page.cpp
+++ b/third_party/WebKit/Source/core/page/Page.cpp
@@ -105,7 +105,7 @@
 
 Page* Page::createOrdinary(PageClients& pageClients) {
   Page* page = create(pageClients);
-  ordinaryPages().add(page);
+  ordinaryPages().insert(page);
   if (ScopedPageSuspender::isActive())
     page->setSuspended(true);
   return page;
@@ -139,7 +139,7 @@
   ASSERT(m_editorClient);
 
   ASSERT(!allPages().contains(this));
-  allPages().add(this);
+  allPages().insert(this);
 }
 
 Page::~Page() {
diff --git a/third_party/WebKit/Source/core/page/TouchAdjustment.cpp b/third_party/WebKit/Source/core/page/TouchAdjustment.cpp
index 43dad53a..218b5a0 100644
--- a/third_party/WebKit/Source/core/page/TouchAdjustment.cpp
+++ b/third_party/WebKit/Source/core/page/TouchAdjustment.cpp
@@ -295,7 +295,7 @@
         for (visitedNode = parentShadowHostOrOwner(visitedNode); visitedNode;
              visitedNode = parentShadowHostOrOwner(visitedNode)) {
           HeapHashSet<Member<Node>>::AddResult addResult =
-              ancestorsToRespondersSet.add(visitedNode);
+              ancestorsToRespondersSet.insert(visitedNode);
           if (!addResult.isNewEntry)
             break;
         }
@@ -336,7 +336,7 @@
           replacement = nullptr;
           break;
         }
-        editableAncestors.add(replacement);
+        editableAncestors.insert(replacement);
         parent = parent->parentOrShadowHostNode();
       }
       candidate = replacement;
diff --git a/third_party/WebKit/Source/core/page/TouchDisambiguation.cpp b/third_party/WebKit/Source/core/page/TouchDisambiguation.cpp
index e912538..934ad2bf 100644
--- a/third_party/WebKit/Source/core/page/TouchDisambiguation.cpp
+++ b/third_party/WebKit/Source/core/page/TouchDisambiguation.cpp
@@ -121,7 +121,7 @@
       Node* containerNode = container->node();
       if (!containerNode)
         continue;
-      if (!blackList.add(containerNode).isNewEntry)
+      if (!blackList.insert(containerNode).isNewEntry)
         break;
     }
   }
diff --git a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
index feeddc1..b32feec 100644
--- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -660,7 +660,7 @@
   for (const auto& layerRect : layerRects) {
     const PaintLayer* layer = layerRect.key;
     do {
-      if (!layersWithRects.add(layer).isNewEntry)
+      if (!layersWithRects.insert(layer).isNewEntry)
         break;
 
       if (layer->parent()) {
@@ -735,7 +735,7 @@
           layerRect.key
               ->enclosingLayerForPaintInvalidationCrossingFrameBoundaries();
       DCHECK(compositedLayer);
-      m_layersWithTouchRects.add(compositedLayer);
+      m_layersWithTouchRects.insert(compositedLayer);
     }
   }
 
diff --git a/third_party/WebKit/Source/core/page/scrolling/SnapCoordinator.cpp b/third_party/WebKit/Source/core/page/scrolling/SnapCoordinator.cpp
index c0c58cc4..9f96c0b 100644
--- a/third_party/WebKit/Source/core/page/scrolling/SnapCoordinator.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/SnapCoordinator.cpp
@@ -68,7 +68,7 @@
     m_snapContainers.remove(&snapContainer);
     snapContainer.clearSnapAreas();
   } else {
-    m_snapContainers.add(&snapContainer);
+    m_snapContainers.insert(&snapContainer);
   }
 
   // TODO(majidvp): Add logic to correctly handle orphaned snap areas here.
diff --git a/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp b/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp
index 983c326..d04b1ea 100644
--- a/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/TableSectionPainter.cpp
@@ -311,7 +311,7 @@
           if (overflowingCells.contains(cell))
             continue;
           if (cell->rowSpan() > 1 || cell->colSpan() > 1) {
-            if (!spanningCells.add(cell).isNewEntry)
+            if (!spanningCells.insert(cell).isNewEntry)
               continue;
           }
           cells.push_back(cell);
diff --git a/third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp b/third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp
index 9c656a4..e90e1f06 100644
--- a/third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp
@@ -37,7 +37,7 @@
 SVGDocumentExtensions::~SVGDocumentExtensions() {}
 
 void SVGDocumentExtensions::addTimeContainer(SVGSVGElement* element) {
-  m_timeContainers.add(element);
+  m_timeContainers.insert(element);
 }
 
 void SVGDocumentExtensions::removeTimeContainer(SVGSVGElement* element) {
@@ -47,7 +47,7 @@
 void SVGDocumentExtensions::addWebAnimationsPendingSVGElement(
     SVGElement& element) {
   ASSERT(RuntimeEnabledFeatures::webAnimationsSVGEnabled());
-  m_webAnimationsPendingSVGElements.add(&element);
+  m_webAnimationsPendingSVGElements.insert(&element);
 }
 
 void SVGDocumentExtensions::serviceOnAnimationFrame(Document& document) {
@@ -122,7 +122,7 @@
 void SVGDocumentExtensions::addSVGRootWithRelativeLengthDescendents(
     SVGSVGElement* svgRoot) {
   ASSERT(!m_inRelativeLengthSVGRootsInvalidation);
-  m_relativeLengthSVGRoots.add(svgRoot);
+  m_relativeLengthSVGRoots.insert(svgRoot);
 }
 
 void SVGDocumentExtensions::removeSVGRootWithRelativeLengthDescendents(
diff --git a/third_party/WebKit/Source/core/svg/SVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGElement.cpp
index ecc8a60..88b13ca 100644
--- a/third_party/WebKit/Source/core/svg/SVGElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGElement.cpp
@@ -269,7 +269,7 @@
       notifyAnimValChanged(element, attribute);
     }
   });
-  ensureSVGRareData()->webAnimatedAttributes().add(&attribute);
+  ensureSVGRareData()->webAnimatedAttributes().insert(&attribute);
 }
 
 void SVGElement::clearWebAnimatedAttributes() {
@@ -528,7 +528,7 @@
 
     bool hadRelativeLengths = currentElement.hasRelativeLengths();
     if (clientHasRelativeLengths)
-      currentElement.m_elementsWithRelativeLengths.add(clientElement);
+      currentElement.m_elementsWithRelativeLengths.insert(clientElement);
     else
       currentElement.m_elementsWithRelativeLengths.remove(clientElement);
 
@@ -614,7 +614,7 @@
       ensureSVGRareData()->elementInstances();
   ASSERT(!instances.contains(instance));
 
-  instances.add(instance);
+  instances.insert(instance);
 }
 
 void SVGElement::removeInstanceMapping(SVGElement* instance) {
@@ -1235,8 +1235,8 @@
 void SVGElement::addReferenceTo(SVGElement* targetElement) {
   ASSERT(targetElement);
 
-  ensureSVGRareData()->outgoingReferences().add(targetElement);
-  targetElement->ensureSVGRareData()->incomingReferences().add(this);
+  ensureSVGRareData()->outgoingReferences().insert(targetElement);
+  targetElement->ensureSVGRareData()->incomingReferences().insert(this);
 }
 
 void SVGElement::rebuildAllIncomingReferences() {
diff --git a/third_party/WebKit/Source/core/svg/SVGElementProxy.cpp b/third_party/WebKit/Source/core/svg/SVGElementProxy.cpp
index 92bcb51..b750171c1 100644
--- a/third_party/WebKit/Source/core/svg/SVGElementProxy.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGElementProxy.cpp
@@ -180,7 +180,7 @@
 }
 
 void SVGElementProxySet::add(SVGElementProxy& elementProxy) {
-  m_elementProxies.add(&elementProxy);
+  m_elementProxies.insert(&elementProxy);
 }
 
 bool SVGElementProxySet::isEmpty() const {
diff --git a/third_party/WebKit/Source/core/svg/SVGLinearGradientElement.cpp b/third_party/WebKit/Source/core/svg/SVGLinearGradientElement.cpp
index af4079d..2ee5e04 100644
--- a/third_party/WebKit/Source/core/svg/SVGLinearGradientElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGLinearGradientElement.cpp
@@ -143,7 +143,7 @@
   SVGGradientElement* current = this;
 
   setGradientAttributes(current, attributes);
-  processedGradients.add(current);
+  processedGradients.insert(current);
 
   while (true) {
     // Respect xlink:href, take attributes from referenced element
@@ -161,7 +161,7 @@
 
       setGradientAttributes(current, attributes,
                             isSVGLinearGradientElement(*current));
-      processedGradients.add(current);
+      processedGradients.insert(current);
     } else {
       return true;
     }
diff --git a/third_party/WebKit/Source/core/svg/SVGPatternElement.cpp b/third_party/WebKit/Source/core/svg/SVGPatternElement.cpp
index db648a0..5e400bf 100644
--- a/third_party/WebKit/Source/core/svg/SVGPatternElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGPatternElement.cpp
@@ -198,7 +198,7 @@
 
   while (true) {
     setPatternAttributes(current, attributes);
-    processedPatterns.add(current);
+    processedPatterns.insert(current);
 
     // Respect xlink:href, take attributes from referenced element
     Node* refNode = SVGURIReference::targetElementFromIRIString(
diff --git a/third_party/WebKit/Source/core/svg/SVGRadialGradientElement.cpp b/third_party/WebKit/Source/core/svg/SVGRadialGradientElement.cpp
index ce9fc39..b368ba2 100644
--- a/third_party/WebKit/Source/core/svg/SVGRadialGradientElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGRadialGradientElement.cpp
@@ -158,7 +158,7 @@
   SVGGradientElement* current = this;
 
   setGradientAttributes(current, attributes);
-  processedGradients.add(current);
+  processedGradients.insert(current);
 
   while (true) {
     // Respect xlink:href, take attributes from referenced element
@@ -176,7 +176,7 @@
 
       setGradientAttributes(current, attributes,
                             isSVGRadialGradientElement(*current));
-      processedGradients.add(current);
+      processedGradients.insert(current);
     } else {
       break;
     }
diff --git a/third_party/WebKit/Source/core/svg/SVGTreeScopeResources.cpp b/third_party/WebKit/Source/core/svg/SVGTreeScopeResources.cpp
index 598859d..b0723842 100644
--- a/third_party/WebKit/Source/core/svg/SVGTreeScopeResources.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGTreeScopeResources.cpp
@@ -55,7 +55,7 @@
       m_pendingResources.add(id, nullptr);
   if (result.isNewEntry)
     result.storedValue->value = new SVGPendingElements;
-  result.storedValue->value->add(element);
+  result.storedValue->value->insert(element);
 
   element->setHasPendingResources();
 }
diff --git a/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp b/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp
index 871201b..65241a7 100644
--- a/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp
+++ b/third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp
@@ -436,7 +436,7 @@
   AnimationsVector scheduledAnimationsInSameGroup;
   for (const auto& entry : m_scheduledAnimations) {
     if (!entry.key.first || entry.value->isEmpty()) {
-      invalidKeys.add(entry.key);
+      invalidKeys.insert(entry.key);
       continue;
     }
 
diff --git a/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp b/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
index 42c9c97d..c9787a8 100644
--- a/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
+++ b/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
@@ -430,7 +430,7 @@
   HashSet<SMILTime> existing;
   for (unsigned n = 0; n < timeList.size(); ++n) {
     if (!timeList[n].time().isUnresolved())
-      existing.add(timeList[n].time().value());
+      existing.insert(timeList[n].time().value());
   }
   Vector<String> splitString;
   parseString.split(';', splitString);
@@ -1178,7 +1178,7 @@
   // use a HashSet of untraced heap references -- any conservative GC which
   // strikes before unwinding will find these elements on the stack.
   DEFINE_STATIC_LOCAL(HashSet<UntracedMember<SVGSMILElement>>, loopBreaker, ());
-  if (!loopBreaker.add(this).isNewEntry)
+  if (!loopBreaker.insert(this).isNewEntry)
     return;
 
   for (SVGSMILElement* element : m_syncBaseDependents)
@@ -1216,7 +1216,7 @@
 }
 
 void SVGSMILElement::addSyncBaseDependent(SVGSMILElement* animation) {
-  m_syncBaseDependents.add(animation);
+  m_syncBaseDependents.insert(animation);
   if (m_interval.begin.isFinite())
     animation->createInstanceTimesFromSyncbase(this);
 }
diff --git a/third_party/WebKit/Source/core/svg/graphics/filters/SVGFilterBuilder.cpp b/third_party/WebKit/Source/core/svg/graphics/filters/SVGFilterBuilder.cpp
index 0ac0f22..29928f7c 100644
--- a/third_party/WebKit/Source/core/svg/graphics/filters/SVGFilterBuilder.cpp
+++ b/third_party/WebKit/Source/core/svg/graphics/filters/SVGFilterBuilder.cpp
@@ -80,7 +80,7 @@
   // allow determining what effects needs to be invalidated when a certain
   // effect changes.
   for (unsigned i = 0; i < numberOfInputEffects; ++i)
-    effectReferences(effect->inputEffect(i)).add(effect);
+    effectReferences(effect->inputEffect(i)).insert(effect);
 
   // If object is null, that means the element isn't attached for some
   // reason, which in turn mean that certain types of invalidation will not
diff --git a/third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp b/third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp
index ea797969..6fb752a 100644
--- a/third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp
@@ -36,7 +36,7 @@
 
 static void addWorkerIsolate(v8::Isolate* isolate) {
   MutexLocker lock(isolatesMutex());
-  isolates().add(isolate);
+  isolates().insert(isolate);
 }
 
 static void removeWorkerIsolate(v8::Isolate* isolate) {
diff --git a/third_party/WebKit/Source/core/workers/WorkerEventQueue.cpp b/third_party/WebKit/Source/core/workers/WorkerEventQueue.cpp
index f125057..a83a6ab9 100644
--- a/third_party/WebKit/Source/core/workers/WorkerEventQueue.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerEventQueue.cpp
@@ -57,7 +57,7 @@
     return false;
   InspectorInstrumentation::asyncTaskScheduled(
       event->target()->getExecutionContext(), event->type(), event);
-  m_pendingEvents.add(event);
+  m_pendingEvents.insert(event);
   m_workerGlobalScope->postTask(
       TaskType::UnspecedTimer, BLINK_FROM_HERE,
       createSameThreadTask(&WorkerEventQueue::dispatchEvent,
diff --git a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
index b2d5910..bceb03e1 100644
--- a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
@@ -134,7 +134,7 @@
     V8AbstractEventListener* eventListener) {
   // TODO(sof): remove once crbug.com/677654 has been diagnosed.
   CHECK(&ThreadState::fromObject(this)->heap() == &ThreadState::fromObject(eventListener)->heap());
-  bool newEntry = m_eventListeners.add(eventListener).isNewEntry;
+  bool newEntry = m_eventListeners.insert(eventListener).isNewEntry;
   CHECK(newEntry);
 }
 
diff --git a/third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp b/third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp
index 41ce11c..ae82cd6 100644
--- a/third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp
@@ -62,7 +62,7 @@
   m_workerThread = workerThread;
   m_document = document;
   m_url = url.getString();
-  inspectorProxies().add(this);
+  inspectorProxies().insert(this);
   // We expect everyone starting worker thread to synchronously ask for
   // workerStartMode right before.
   bool waitingForDebugger =
diff --git a/third_party/WebKit/Source/core/workers/WorkerThread.cpp b/third_party/WebKit/Source/core/workers/WorkerThread.cpp
index 2ba4838..2a426ad 100644
--- a/third_party/WebKit/Source/core/workers/WorkerThread.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerThread.cpp
@@ -301,7 +301,7 @@
       m_workerThreadLifecycleContext(new WorkerThreadLifecycleContext) {
   DCHECK(isMainThread());
   MutexLocker lock(threadSetMutex());
-  workerThreads().add(this);
+  workerThreads().insert(this);
 }
 
 void WorkerThread::terminateInternal(TerminationMode mode) {
diff --git a/third_party/WebKit/Source/core/workers/Worklet.cpp b/third_party/WebKit/Source/core/workers/Worklet.cpp
index 6dbdc7f..da888b1 100644
--- a/third_party/WebKit/Source/core/workers/Worklet.cpp
+++ b/third_party/WebKit/Source/core/workers/Worklet.cpp
@@ -45,7 +45,7 @@
   if (resource) {
     WorkletScriptLoader* workletLoader =
         WorkletScriptLoader::create(resolver, this, resource);
-    m_scriptLoaders.add(workletLoader);
+    m_scriptLoaders.insert(workletLoader);
   } else {
     resolver->reject(DOMException::create(NetworkError));
   }
diff --git a/third_party/WebKit/Source/core/xml/XPathFunctions.cpp b/third_party/WebKit/Source/core/xml/XPathFunctions.cpp
index aae17d9..e4cfea2 100644
--- a/third_party/WebKit/Source/core/xml/XPathFunctions.cpp
+++ b/third_party/WebKit/Source/core/xml/XPathFunctions.cpp
@@ -364,7 +364,7 @@
     // this case is formally undefined.
     Node* node = contextScope.getElementById(
         AtomicString(idList.substring(startPos, endPos - startPos)));
-    if (node && resultSet.add(node).isNewEntry)
+    if (node && resultSet.insert(node).isNewEntry)
       result->append(node);
 
     startPos = endPos;
diff --git a/third_party/WebKit/Source/core/xml/XPathNodeSet.cpp b/third_party/WebKit/Source/core/xml/XPathNodeSet.cpp
index e0995346..f2f56c0e 100644
--- a/third_party/WebKit/Source/core/xml/XPathNodeSet.cpp
+++ b/third_party/WebKit/Source/core/xml/XPathNodeSet.cpp
@@ -127,7 +127,8 @@
   // each group.
   HeapHashSet<Member<Node>> parentNodes;
   for (unsigned i = from; i < to; ++i)
-    parentNodes.add(parentWithDepth(commonAncestorDepth + 1, parentMatrix[i]));
+    parentNodes.insert(
+        parentWithDepth(commonAncestorDepth + 1, parentMatrix[i]));
 
   unsigned previousGroupEnd = from;
   unsigned groupEnd = from;
@@ -217,7 +218,7 @@
   DCHECK_GT(nodeCount, 1u);
   for (unsigned i = 0; i < nodeCount; ++i) {
     Node* node = m_nodes[i].get();
-    nodes.add(node);
+    nodes.insert(node);
     if (node->isAttributeNode())
       containsAttributeNodes = true;
   }
diff --git a/third_party/WebKit/Source/core/xml/XPathParser.cpp b/third_party/WebKit/Source/core/xml/XPathParser.cpp
index 1335f71de..e7d9a3887 100644
--- a/third_party/WebKit/Source/core/xml/XPathParser.cpp
+++ b/third_party/WebKit/Source/core/xml/XPathParser.cpp
@@ -507,7 +507,7 @@
     return;
 
   DCHECK(!m_strings.contains(s));
-  m_strings.add(WTF::wrapUnique(s));
+  m_strings.insert(WTF::wrapUnique(s));
 }
 
 void Parser::deleteString(String* s) {
diff --git a/third_party/WebKit/Source/core/xml/XPathPath.cpp b/third_party/WebKit/Source/core/xml/XPathPath.cpp
index 52cd1f95a..6960e729 100644
--- a/third_party/WebKit/Source/core/xml/XPathPath.cpp
+++ b/third_party/WebKit/Source/core/xml/XPathPath.cpp
@@ -145,7 +145,8 @@
         resultIsSorted = false;
 
       for (const auto& node : *matches) {
-        if (!needToCheckForDuplicateNodes || newNodesSet.add(node).isNewEntry)
+        if (!needToCheckForDuplicateNodes ||
+            newNodesSet.insert(node).isNewEntry)
           newNodes->append(node);
       }
     }
diff --git a/third_party/WebKit/Source/core/xml/XPathPredicate.cpp b/third_party/WebKit/Source/core/xml/XPathPredicate.cpp
index 55b27b89..0b8137b 100644
--- a/third_party/WebKit/Source/core/xml/XPathPredicate.cpp
+++ b/third_party/WebKit/Source/core/xml/XPathPredicate.cpp
@@ -240,10 +240,10 @@
 
   HeapHashSet<Member<Node>> nodes;
   for (const auto& node : resultSet)
-    nodes.add(node);
+    nodes.insert(node);
 
   for (const auto& node : rhsNodes) {
-    if (nodes.add(node).isNewEntry)
+    if (nodes.insert(node).isNewEntry)
       resultSet.append(node);
   }
 
diff --git a/third_party/WebKit/Source/devtools/BUILD.gn b/third_party/WebKit/Source/devtools/BUILD.gn
index 319b7fc..9255c841 100644
--- a/third_party/WebKit/Source/devtools/BUILD.gn
+++ b/third_party/WebKit/Source/devtools/BUILD.gn
@@ -568,6 +568,7 @@
   "front_end/timeline/timelinePanel.css",
   "front_end/timeline/TimelinePanel.js",
   "front_end/timeline/timelineStatusDialog.css",
+  "front_end/timeline/TimelineTreeModeView.js",
   "front_end/timeline/TimelineTreeView.js",
   "front_end/timeline/TimelineUIUtils.js",
   "front_end/toolbox_bootstrap/module.json",
diff --git a/third_party/WebKit/Source/devtools/front_end/accessibility/accessibilityNode.css b/third_party/WebKit/Source/devtools/front_end/accessibility/accessibilityNode.css
index c75970b..cd80169 100644
--- a/third_party/WebKit/Source/devtools/front_end/accessibility/accessibilityNode.css
+++ b/third_party/WebKit/Source/devtools/front_end/accessibility/accessibilityNode.css
@@ -136,7 +136,6 @@
     border: 1px solid #ddd;
     margin-left: 5px;
     margin-bottom: 1px;
-    font-size: 11px;
 }
 
 li.siblings-expanded button.expand-siblings {
diff --git a/third_party/WebKit/Source/devtools/front_end/color_picker/spectrum.css b/third_party/WebKit/Source/devtools/front_end/color_picker/spectrum.css
index 43d4c4a..5c6df47 100644
--- a/third_party/WebKit/Source/devtools/front_end/color_picker/spectrum.css
+++ b/third_party/WebKit/Source/devtools/front_end/color_picker/spectrum.css
@@ -146,7 +146,6 @@
     border-radius: 2px;
     margin-right: 6px;
     line-height: 20px;
-    font-size: 11px;
     padding: 0;
     color: #333;
     white-space: nowrap;
diff --git a/third_party/WebKit/Source/devtools/front_end/css_tracker/unusedRulesTree.css b/third_party/WebKit/Source/devtools/front_end/css_tracker/unusedRulesTree.css
index cf5e92e..e6bdc75 100644
--- a/third_party/WebKit/Source/devtools/front_end/css_tracker/unusedRulesTree.css
+++ b/third_party/WebKit/Source/devtools/front_end/css_tracker/unusedRulesTree.css
@@ -18,7 +18,6 @@
 }
 
 .rule-result {
-    font-size: 11px;
     padding: 2px 0 2px 4px;
     word-wrap: normal;
     white-space: pre;
@@ -43,7 +42,6 @@
     padding: 4px 0;
     color: #222;
     cursor: pointer;
-    font-size: 11px;
     margin-left: 20px;
 }
 
diff --git a/third_party/WebKit/Source/devtools/front_end/data_grid/dataGrid.css b/third_party/WebKit/Source/devtools/front_end/data_grid/dataGrid.css
index 1036d23..83ca802 100644
--- a/third_party/WebKit/Source/devtools/front_end/data_grid/dataGrid.css
+++ b/third_party/WebKit/Source/devtools/front_end/data_grid/dataGrid.css
@@ -1,7 +1,6 @@
 .data-grid {
     position: relative;
     border: 1px solid #aaa;
-    font-size: 11px;
     line-height: 120%;
 }
 
@@ -23,11 +22,11 @@
 
 .data-grid .header-container {
     top: 0;
-    height: 17px;
+    height: 21px;
  }
 
 .data-grid .data-container {
-    top: 17px;
+    top: 21px;
     bottom: 0;
     overflow-y: overlay;
     transform: translateZ(0);
@@ -67,8 +66,8 @@
     right: 0;
     bottom: 0;
     border-top: 0 none transparent;
-    background-image: linear-gradient(to bottom, transparent, transparent 50%, hsla(214, 100%, 40%, 0.1) 50%, hsla(214, 100%, 40%, 0.1));
-    background-size: 128px 32px;
+    background-image: linear-gradient(to bottom, transparent, transparent 50%, hsla(214, 100%, 40%, 0.05) 50%, hsla(214, 100%, 40%, 0.05));
+    background-size: 128px 42px;
     table-layout: fixed;
 }
 
@@ -89,7 +88,8 @@
     white-space: nowrap;
     text-overflow: ellipsis;
     overflow: hidden;
-    line-height: 14px;
+    line-height: 19px;
+    height: 19px;
     border-left: 1px solid #aaa;
 }
 
@@ -99,16 +99,14 @@
 }
 
 .data-grid td {
-    height: 16px; /* Keep in sync with .data-grid table.data @ background-size */
     vertical-align: top;
     padding: 1px 4px;
     -webkit-user-select: text;
 }
 
 .data-grid th {
-    height: auto;
     text-align: left;
-    background-color: #eee;
+    background-color: #f3f3f3;
     border-bottom: 1px solid #aaa;
     font-weight: normal;
     vertical-align: middle;
@@ -188,7 +186,7 @@
     content: "a";
     color: transparent;
     position: relative;
-    top: 1px;
+    top: 3px;
     background-color: rgb(110, 110, 110);
 }
 
diff --git a/third_party/WebKit/Source/devtools/front_end/devices/devicesView.css b/third_party/WebKit/Source/devtools/front_end/devices/devicesView.css
index 4a36894c..c0a7eef 100644
--- a/third_party/WebKit/Source/devtools/front_end/devices/devicesView.css
+++ b/third_party/WebKit/Source/devtools/front_end/devices/devicesView.css
@@ -39,10 +39,6 @@
     padding-left: 10px;
 }
 
-.devices-sidebar-item-status {
-    font-size: 11px;
-}
-
 .devices-sidebar-item-status:before {
     content: "\25cf";
     font-size: 16px;
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/breadcrumbs.css b/third_party/WebKit/Source/devtools/front_end/elements/breadcrumbs.css
index 74cec40b..667edef 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/breadcrumbs.css
+++ b/third_party/WebKit/Source/devtools/front_end/elements/breadcrumbs.css
@@ -8,7 +8,6 @@
     display: inline-block;
     pointer-events: auto;
     cursor: default;
-    font-size: 11px;
     line-height: 17px;
     white-space: nowrap;
 }
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/elementsPanel.css b/third_party/WebKit/Source/devtools/front_end/elements/elementsPanel.css
index 8d8a708..f7a6eb5e 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/elementsPanel.css
+++ b/third_party/WebKit/Source/devtools/front_end/elements/elementsPanel.css
@@ -224,6 +224,7 @@
     text-overflow: ellipsis;
     overflow: hidden;
     white-space: nowrap;
+    height: 14px;
 }
 
 .styles-section .styles-section-subtitle .devtools-link {
diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/deviceModeView.css b/third_party/WebKit/Source/devtools/front_end/emulation/deviceModeView.css
index fe17f9be..25c4721 100644
--- a/third_party/WebKit/Source/devtools/front_end/emulation/deviceModeView.css
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/deviceModeView.css
@@ -365,7 +365,6 @@
 }
 
 .device-mode-ruler-text {
-    font-size: 11px;
     color: hsl(0, 0%, 50%);
     position: relative;
     pointer-events: auto;
diff --git a/third_party/WebKit/Source/devtools/front_end/main/Main.js b/third_party/WebKit/Source/devtools/front_end/main/Main.js
index f8f4953..ab67b15 100644
--- a/third_party/WebKit/Source/devtools/front_end/main/Main.js
+++ b/third_party/WebKit/Source/devtools/front_end/main/Main.js
@@ -114,6 +114,7 @@
     Runtime.experiments.register('sourceDiff', 'Source diff');
     Runtime.experiments.register('terminalInDrawer', 'Terminal in drawer', true);
     Runtime.experiments.register('timelineInvalidationTracking', 'Timeline invalidation tracking', true);
+    Runtime.experiments.register('timelineMultipleMainViews', 'Timeline with multiple main views');
     Runtime.experiments.register('timelineTracingJSProfile', 'Timeline tracing based JS profiler', true);
     Runtime.experiments.register('timelineV8RuntimeCallStats', 'V8 Runtime Call Stats on Timeline', true);
     Runtime.experiments.register('timelinePerFrameTrack', 'Show track per frame on Timeline', true);
@@ -129,7 +130,7 @@
         Runtime.experiments.enableForTest('cssTrackerPanel');
     }
 
-    Runtime.experiments.setDefaultExperiments(['persistenceValidation']);
+    Runtime.experiments.setDefaultExperiments(['persistenceValidation', 'timelineMultipleMainViews']);
   }
 
   /**
diff --git a/third_party/WebKit/Source/devtools/front_end/network/blockedURLsPane.css b/third_party/WebKit/Source/devtools/front_end/network/blockedURLsPane.css
index 0e20e389..a327f1cd 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/blockedURLsPane.css
+++ b/third_party/WebKit/Source/devtools/front_end/network/blockedURLsPane.css
@@ -13,7 +13,6 @@
 }
 
 .no-blocked-urls, .blocked-urls-list {
-    font-size: 11px;
     overflow-x: hidden;
     overflow-y: auto;
 }
diff --git a/third_party/WebKit/Source/devtools/front_end/network/networkLogView.css b/third_party/WebKit/Source/devtools/front_end/network/networkLogView.css
index 133f21c..c6372729 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/networkLogView.css
+++ b/third_party/WebKit/Source/devtools/front_end/network/networkLogView.css
@@ -66,7 +66,6 @@
 }
 
 .network-log-grid.data-grid td {
-    line-height: 17px;
     height: 41px;
     border-left: 1px solid #e1e1e1;
     vertical-align: middle;
@@ -366,7 +365,6 @@
     text-align: left;
     font-weight: normal;
     padding: 0px 4px;
-    font-size: 11px;
 }
 
 .network-waterfall-header .sort-order-icon-container {
diff --git a/third_party/WebKit/Source/devtools/front_end/network/requestCookiesView.css b/third_party/WebKit/Source/devtools/front_end/network/requestCookiesView.css
index f25907b2..d771b1a 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/requestCookiesView.css
+++ b/third_party/WebKit/Source/devtools/front_end/network/requestCookiesView.css
@@ -18,5 +18,4 @@
 
 .request-cookies-view .data-grid .row-group {
     font-weight: bold;
-    font-size: 11px;
 }
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/indexedDBViews.css b/third_party/WebKit/Source/devtools/front_end/resources/indexedDBViews.css
index ce90b8c8..1ff147c9 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/indexedDBViews.css
+++ b/third_party/WebKit/Source/devtools/front_end/resources/indexedDBViews.css
@@ -40,7 +40,6 @@
 }
 
 .indexed-db-data-view .data-view-toolbar .key-input {
-    font-size: 11px;
     margin: auto 0;
     width: 200px;
 }
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/resourcesPanel.css b/third_party/WebKit/Source/devtools/front_end/resources/resourcesPanel.css
index 96657ee2..e75321c97 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/resourcesPanel.css
+++ b/third_party/WebKit/Source/devtools/front_end/resources/resourcesPanel.css
@@ -29,7 +29,7 @@
 
 .resources-toolbar {
     border-bottom: 1px solid #ccc;
-    background-color: #eee;
+    background-color: #f3f3f3;
 }
 
 li.selected .base-storage-tree-element-subtitle {
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/serviceWorkerCacheViews.css b/third_party/WebKit/Source/devtools/front_end/resources/serviceWorkerCacheViews.css
index d3d2d407..e7a99b6 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/serviceWorkerCacheViews.css
+++ b/third_party/WebKit/Source/devtools/front_end/resources/serviceWorkerCacheViews.css
@@ -11,7 +11,6 @@
 }
 
 .service-worker-cache-data-view .data-view-toolbar .key-input {
-    font-size: 11px;
     margin: auto 0;
     width: 200px;
 }
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/fileBasedSearchResultsPane.css b/third_party/WebKit/Source/devtools/front_end/sources/fileBasedSearchResultsPane.css
index bb91341..a8510b0 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/fileBasedSearchResultsPane.css
+++ b/third_party/WebKit/Source/devtools/front_end/sources/fileBasedSearchResultsPane.css
@@ -17,8 +17,11 @@
     padding: 0;
 }
 
+.tree-outline li {
+    height: 16px;
+}
+
 li.search-result {
-    font-size: 11px;
     padding: 2px 0 2px 4px;
     word-wrap: normal;
     white-space: pre;
@@ -44,7 +47,6 @@
     padding: 4px 0;
     color: #222;
     cursor: pointer;
-    font-size: 11px;
     margin-left: 20px;
 }
 
@@ -55,7 +57,6 @@
 li.search-match {
     word-wrap: normal;
     white-space: pre;
-    min-height: 12px;
 }
 
 li.search-match::before {
@@ -67,8 +68,7 @@
     text-align: right;
     vertical-align: top;
     word-break: normal;
-    padding-right: 4px;
-    padding-left: 6px;
+    padding: 2px 4px 2px 6px;
     margin-right: 5px;
     border-right: 1px solid #BBB;
 }
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/sourcesView.css b/third_party/WebKit/Source/devtools/front_end/sources/sourcesView.css
index 62bef36..d32d8ef 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/sourcesView.css
+++ b/third_party/WebKit/Source/devtools/front_end/sources/sourcesView.css
@@ -76,7 +76,6 @@
 .source-frame-breakpoint-message {
     background-color: transparent;
     font-weight: normal;
-    font-size: 11px;
     text-align: left;
     text-shadow: none;
     color: rgb(85, 85, 85);
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineDetailsView.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineDetailsView.js
index 20fe0fc1..092d528 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineDetailsView.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineDetailsView.js
@@ -26,6 +26,7 @@
     this._tabbedPane.show(this.element);
 
     const tabIds = Timeline.TimelineDetailsView.Tab;
+
     this._defaultDetailsWidget = new UI.VBox();
     this._defaultDetailsWidget.element.classList.add('timeline-details-view');
     this._defaultDetailsContentElement =
@@ -37,17 +38,19 @@
     /** @type Map<string, Timeline.TimelineTreeView> */
     this._rangeDetailViews = new Map();
 
-    const bottomUpView = new Timeline.BottomUpTimelineTreeView(timelineModel, filters);
-    this._appendTab(tabIds.BottomUp, Common.UIString('Bottom-Up'), bottomUpView);
-    this._rangeDetailViews.set(tabIds.BottomUp, bottomUpView);
+    if (!Runtime.experiments.isEnabled('timelineMultipleMainViews')) {
+      const bottomUpView = new Timeline.BottomUpTimelineTreeView(timelineModel, filters);
+      this._appendTab(tabIds.BottomUp, Common.UIString('Bottom-Up'), bottomUpView);
+      this._rangeDetailViews.set(tabIds.BottomUp, bottomUpView);
 
-    const callTreeView = new Timeline.CallTreeTimelineTreeView(timelineModel, filters);
-    this._appendTab(tabIds.CallTree, Common.UIString('Call Tree'), callTreeView);
-    this._rangeDetailViews.set(tabIds.CallTree, callTreeView);
+      const callTreeView = new Timeline.CallTreeTimelineTreeView(timelineModel, filters);
+      this._appendTab(tabIds.CallTree, Common.UIString('Call Tree'), callTreeView);
+      this._rangeDetailViews.set(tabIds.CallTree, callTreeView);
 
-    const eventsView = new Timeline.EventsTimelineTreeView(timelineModel, filters, delegate);
-    this._appendTab(tabIds.Events, Common.UIString('Event Log'), eventsView);
-    this._rangeDetailViews.set(tabIds.Events, eventsView);
+      const eventsView = new Timeline.EventsTimelineTreeView(timelineModel, filters, delegate);
+      this._appendTab(tabIds.Events, Common.UIString('Event Log'), eventsView);
+      this._rangeDetailViews.set(tabIds.Events, eventsView);
+    }
 
     this._tabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, this._tabSelected, this);
   }
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js
index 6d00b467..db5aaaed 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js
@@ -104,16 +104,18 @@
    * @param {!Timeline.TimelineModeViewDelegate} delegate
    * @param {!TimelineModel.TimelineModel} timelineModel
    * @param {!TimelineModel.TimelineFrameModel} frameModel
+   * @param {!SDK.FilmStripModel} filmStripModel
    * @param {!TimelineModel.TimelineIRModel} irModel
    * @param {!Array<!{title: string, model: !SDK.TracingModel}>} extensionModels
    * @param {!Array<!TimelineModel.TimelineModel.Filter>} filters
    */
-  constructor(delegate, timelineModel, frameModel, irModel, extensionModels, filters) {
+  constructor(delegate, timelineModel, frameModel, filmStripModel, irModel, extensionModels, filters) {
     super();
     this.element.classList.add('timeline-flamechart');
     this._delegate = delegate;
     this._model = timelineModel;
     this._extensionModels = extensionModels;
+
     this._splitWidget = new UI.SplitWidget(false, false, 'timelineFlamechartMainView', 150);
 
     this._dataProvider = new Timeline.TimelineFlameChartDataProvider(this._model, frameModel, irModel, filters);
@@ -138,7 +140,20 @@
 
     this._splitWidget.setMainWidget(this._mainView);
     this._splitWidget.setSidebarWidget(networkPane);
-    this._splitWidget.show(this.element);
+
+    if (Runtime.experiments.isEnabled('timelineMultipleMainViews')) {
+      // Create top level properties splitter.
+      this._detailsSplitWidget = new UI.SplitWidget(false, true, 'timelinePanelDetailsSplitViewState');
+      this._detailsSplitWidget.element.classList.add('timeline-details-split');
+      this._detailsView =
+          new Timeline.TimelineDetailsView(timelineModel, frameModel, filmStripModel, filters, delegate);
+      this._detailsSplitWidget.installResizer(this._detailsView.headerElement());
+      this._detailsSplitWidget.setMainWidget(this._splitWidget);
+      this._detailsSplitWidget.setSidebarWidget(this._detailsView);
+      this._detailsSplitWidget.show(this.element);
+    } else {
+      this._splitWidget.show(this.element);
+    }
 
     this._onMainEntrySelected = this._onEntrySelected.bind(this, this._dataProvider);
     this._onNetworkEntrySelected = this._onEntrySelected.bind(this, this._networkDataProvider);
@@ -292,6 +307,8 @@
     this._mainView.setSelectedEntry(index);
     index = this._networkDataProvider.entryIndexForSelection(selection);
     this._networkView.setSelectedEntry(index);
+    if (selection && this._detailsView)
+      this._detailsView.setSelection(selection);
   }
 
   /**
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
index 701e1b9..436362b 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -75,6 +75,9 @@
     /** @type {!Array<!Timeline.TimelineModeView>} */
     this._currentViews = [];
 
+    this._viewModeSetting =
+        Common.settings.createSetting('timelineViewMode', Timeline.TimelinePanel.ViewMode.FlameChart);
+
     this._disableCaptureJSProfileSetting = Common.settings.createSetting('timelineDisableJSSampling', false);
     this._captureLayersAndPicturesSetting = Common.settings.createSetting('timelineCaptureLayersAndPictures', false);
 
@@ -104,33 +107,44 @@
     SDK.targetManager.addEventListener(SDK.TargetManager.Events.PageReloadRequested, this._pageReloadRequested, this);
     SDK.targetManager.addEventListener(SDK.TargetManager.Events.Load, this._loadEventFired, this);
 
-    // Create top level properties splitter.
-    this._detailsSplitWidget = new UI.SplitWidget(false, true, 'timelinePanelDetailsSplitViewState', 400);
-    this._detailsSplitWidget.element.classList.add('timeline-details-split');
-    this._detailsView =
-        new Timeline.TimelineDetailsView(this._model, this._frameModel, this._filmStripModel, this._filters, this);
-    this._detailsSplitWidget.installResizer(this._detailsView.headerElement());
-    this._detailsSplitWidget.setSidebarWidget(this._detailsView);
-
     this._searchableView = new UI.SearchableView(this);
     this._searchableView.setMinimumSize(0, 100);
     this._searchableView.element.classList.add('searchable-view');
-    this._detailsSplitWidget.setMainWidget(this._searchableView);
 
     this._stackView = new UI.StackView(false);
     this._stackView.element.classList.add('timeline-view-stack');
 
-    this._stackView.show(this._searchableView.element);
-    this._onModeChanged();
+    if (Runtime.experiments.isEnabled('timelineMultipleMainViews')) {
+      const viewMode = Timeline.TimelinePanel.ViewMode;
+      this._tabbedPane = new UI.TabbedPane();
+      this._tabbedPane.appendTab(viewMode.FlameChart, Common.UIString('Flame Chart'), new UI.VBox());
+      this._tabbedPane.appendTab(viewMode.BottomUp, Common.UIString('Bottom-Up'), new UI.VBox());
+      this._tabbedPane.appendTab(viewMode.CallTree, Common.UIString('Call Tree'), new UI.VBox());
+      this._tabbedPane.appendTab(viewMode.EventLog, Common.UIString('Event Log'), new UI.VBox());
+      this._tabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, this._onMainViewChanged.bind(this));
+      this._tabbedPane.selectTab(this._viewModeSetting.get());
+      this._tabbedPane.show(this._searchableView.element);
+      this._searchableView.show(this._timelinePane.element);
+    } else {
+      // Create top level properties splitter.
+      this._detailsSplitWidget = new UI.SplitWidget(false, true, 'timelinePanelDetailsSplitViewState', 400);
+      this._detailsSplitWidget.element.classList.add('timeline-details-split');
+      this._detailsView =
+          new Timeline.TimelineDetailsView(this._model, this._frameModel, this._filmStripModel, this._filters, this);
+      this._detailsSplitWidget.installResizer(this._detailsView.headerElement());
+      this._detailsSplitWidget.setSidebarWidget(this._detailsView);
+      this._detailsSplitWidget.setMainWidget(this._searchableView);
+      this._detailsSplitWidget.hideSidebar();
+      this._detailsSplitWidget.show(this._timelinePane.element);
+      this._stackView.show(this._searchableView.element);
+    }
 
+    this._onModeChanged();
     this._populateToolbar();
     this._showLandingPage();
 
     Extensions.extensionServer.addEventListener(
         Extensions.ExtensionServer.Events.TraceProviderAdded, this._appendExtensionsToToolbar, this);
-
-    this._detailsSplitWidget.show(this._timelinePane.element);
-    this._detailsSplitWidget.hideSidebar();
     SDK.targetManager.addEventListener(SDK.TargetManager.Events.SuspendStateChanged, this._onSuspendStateChanged, this);
 
     /** @type {!SDK.TracingModel.Event}|undefined */
@@ -204,6 +218,11 @@
       this.select(null);
   }
 
+  _onMainViewChanged() {
+    this._viewModeSetting.set(this._tabbedPane.selectedTabId);
+    this._onModeChanged();
+  }
+
   /**
    * @param {!Common.Event} event
    */
@@ -463,13 +482,38 @@
 
     // Set up the main view.
     this._removeAllModeViews();
-    this._flameChart = new Timeline.TimelineFlameChartView(
-        this, this._model, this._frameModel, this._irModel, this._extensionTracingModels, this._filters);
-    this._addModeView(this._flameChart);
 
-    if (showMemory) {
-      this._addModeView(
-          new Timeline.MemoryCountersGraph(this, this._model, [Timeline.TimelineUIUtils.visibleEventsFilter()]));
+    var viewMode = Timeline.TimelinePanel.ViewMode.FlameChart;
+    this._flameChart = null;
+    if (Runtime.experiments.isEnabled('timelineMultipleMainViews')) {
+      viewMode = this._tabbedPane.selectedTabId;
+      this._stackView.detach();
+      this._stackView.show(this._tabbedPane.visibleView.element);
+    }
+    if (viewMode === Timeline.TimelinePanel.ViewMode.FlameChart) {
+      this._flameChart = new Timeline.TimelineFlameChartView(
+          this, this._model, this._frameModel, this._filmStripModel, this._irModel, this._extensionTracingModels,
+          this._filters);
+      this._addModeView(this._flameChart);
+      if (showMemory) {
+        this._addModeView(
+            new Timeline.MemoryCountersGraph(this, this._model, [Timeline.TimelineUIUtils.visibleEventsFilter()]));
+      }
+    } else {
+      var innerView;
+      switch (viewMode) {
+        case Timeline.TimelinePanel.ViewMode.CallTree:
+          innerView = new Timeline.CallTreeTimelineTreeView(this._model, this._filters);
+          break;
+        case Timeline.TimelinePanel.ViewMode.EventLog:
+          innerView = new Timeline.EventsTimelineTreeView(this._model, this._filters, this);
+          break;
+        default:
+          innerView = new Timeline.BottomUpTimelineTreeView(this._model, this._filters);
+          break;
+      }
+      const treeView = new Timeline.TimelineTreeModeView(this, innerView);
+      this._addModeView(treeView);
     }
 
     this.doResize();
@@ -761,7 +805,8 @@
     for (let entry of this._extensionTracingModels)
       entry.model.adjustTime(this._model.minimumRecordTime() + (entry.timeOffset / 1000) - this._recordingStartTime);
 
-    this._flameChart.resizeToPreferredHeights();
+    if (this._flameChart)
+      this._flameChart.resizeToPreferredHeights();
     this._overviewPane.reset();
     this._overviewPane.setBounds(this._model.minimumRecordTime(), this._model.maximumRecordTime());
     this._setAutoWindowTimes();
@@ -771,7 +816,8 @@
     this._setMarkers();
     this._overviewPane.scheduleUpdate();
     this._updateSearchHighlight(false, true);
-    this._detailsSplitWidget.showBoth();
+    if (this._detailsSplitWidget)
+      this._detailsSplitWidget.showBoth();
   }
 
   _showRecordingStarted() {
@@ -1005,11 +1051,12 @@
     if (!selection)
       selection = Timeline.TimelineSelection.fromRange(this._windowStartTime, this._windowEndTime);
     this._selection = selection;
-    if (preferredTab)
+    if (preferredTab && this._detailsView)
       this._detailsView.setPreferredTab(preferredTab);
     for (var view of this._currentViews)
       view.setSelection(selection);
-    this._detailsView.setSelection(selection);
+    if (this._detailsView)
+      this._detailsView.setSelection(selection);
   }
 
   /**
@@ -1133,6 +1180,16 @@
   Loading: Symbol('Loading')
 };
 
+/**
+ * @enum {string}
+ */
+Timeline.TimelinePanel.ViewMode = {
+  FlameChart: 'FlameChart',
+  BottomUp: 'BottomUp',
+  CallTree: 'CallTree',
+  EventLog: 'EventLog'
+};
+
 // Define row and header height, should be in sync with styles for timeline graphs.
 Timeline.TimelinePanel.rowHeight = 18;
 Timeline.TimelinePanel.headerHeight = 20;
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeModeView.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeModeView.js
new file mode 100644
index 0000000..a5c37425
--- /dev/null
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeModeView.js
@@ -0,0 +1,86 @@
+// 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.
+
+/**
+ * @implements {Timeline.TimelineModeView}
+ */
+Timeline.TimelineTreeModeView = class extends UI.VBox {
+  /**
+   * @param {!Timeline.TimelineModeViewDelegate} delegate
+   * @param {!Timeline.TimelineTreeView} innerTreeView
+   */
+  constructor(delegate, innerTreeView) {
+    super();
+    this._treeView = innerTreeView;
+    this._treeView.show(this.element);
+  }
+
+  /**
+   * @override
+   */
+  dispose() {
+  }
+
+  /**
+   * @override
+   * @return {?Element}
+   */
+  resizerElement() {
+    return null;
+  }
+
+  /**
+   * @override
+   */
+  highlightSearchResult() {
+  }
+
+  /**
+   * @override
+   * @param {?SDK.TracingModel.Event} event
+   */
+  highlightEvent(event) {
+  }
+
+  /**
+   * @override
+   */
+  refreshRecords() {
+  }
+
+  /**
+   * @override
+   */
+  extensionDataAdded() {
+  }
+
+  /**
+   * @override
+   */
+  reset() {
+  }
+
+  /**
+   * @override
+   */
+  setSelection() {
+  }
+
+  /**
+   * @override
+   * @param {number} startTime
+   * @param {number} endTime
+   */
+  setWindowTimes(startTime, endTime) {
+    this._treeView.setRange(startTime, endTime);
+  }
+
+  /**
+   * @override
+   * @return {!UI.Widget}
+   */
+  view() {
+    return this;
+  }
+};
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/module.json b/third_party/WebKit/Source/devtools/front_end/timeline/module.json
index ce3a79ce..05328fb 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/module.json
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/module.json
@@ -149,6 +149,7 @@
         "TimelineFlameChartView.js",
         "TimelineFlameChart.js",
         "TimelineNetworkFlameChart.js",
+        "TimelineTreeModeView.js",
         "TimelineTreeView.js",
         "TimelineUIUtils.js",
         "TimelineLayersView.js",
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/searchableView.css b/third_party/WebKit/Source/devtools/front_end/ui/searchableView.css
index cf02aaf..b59ad77bf 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/searchableView.css
+++ b/third_party/WebKit/Source/devtools/front_end/ui/searchableView.css
@@ -129,7 +129,6 @@
 .search-results-matches {
     display: inline-block;
     text-align: right;
-    font-size: 11px;
     padding: 0 4px;
     color: rgb(165, 165, 165);
 }
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/tooltip.css b/third_party/WebKit/Source/devtools/front_end/ui/tooltip.css
index 4a796cdf..e1440b9 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/tooltip.css
+++ b/third_party/WebKit/Source/devtools/front_end/ui/tooltip.css
@@ -9,7 +9,6 @@
     border-radius: 2px;
     color: hsl(0, 0%, 20%);
     padding: 5px 8px;
-    font-size: 11px;
     line-height: 14px;
     display: flex;
     align-items: center;
diff --git a/third_party/WebKit/Source/modules/accessibility/AXARIAGrid.cpp b/third_party/WebKit/Source/modules/accessibility/AXARIAGrid.cpp
index 8a8389b0..63467c0 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXARIAGrid.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXARIAGrid.cpp
@@ -70,7 +70,7 @@
   else
     m_children.appendVector(row->children());
 
-  appendedRows.add(row);
+  appendedRows.insert(row);
   return true;
 }
 
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
index fe84d52..6c8431c2 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
@@ -321,7 +321,7 @@
 static ARIAWidgetSet* createARIARoleWidgetSet() {
   ARIAWidgetSet* widgetSet = new HashSet<String, CaseFoldingHash>();
   for (size_t i = 0; i < WTF_ARRAY_LENGTH(ariaWidgets); ++i)
-    widgetSet->add(String(ariaWidgets[i]));
+    widgetSet->insert(String(ariaWidgets[i]));
   return widgetSet;
 }
 
@@ -744,7 +744,7 @@
                                      bool* foundTextAlternative) const {
   String textAlternative;
   bool alreadyVisited = visited.contains(this);
-  visited.add(this);
+  visited.insert(this);
 
   // Step 2A from: http://www.w3.org/TR/accname-aam-1.1
   // If you change this logic, update AXNodeObject::nameFromLabelElement, too.
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp b/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
index a79d0b6..8f1db79 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
@@ -542,7 +542,7 @@
 
   objID = platformGenerateAXID();
 
-  m_idsInUse.add(objID);
+  m_idsInUse.insert(objID);
   obj->setAXObjectID(objID);
 
   return objID;
@@ -712,7 +712,7 @@
   HashSet<String> newIds;
   bool idsChanged = false;
   for (const String& id : idVector) {
-    newIds.add(id);
+    newIds.insert(id);
     if (!currentIds.contains(id)) {
       idsChanged = true;
       HashSet<AXID>* owners = m_idToAriaOwnersMapping.get(id);
@@ -720,7 +720,7 @@
         owners = new HashSet<AXID>();
         m_idToAriaOwnersMapping.set(id, WTF::wrapUnique(owners));
       }
-      owners->add(owner->axObjectID());
+      owners->insert(owner->axObjectID());
     }
   }
   for (const String& id : currentIds) {
diff --git a/third_party/WebKit/Source/modules/accessibility/AXTable.cpp b/third_party/WebKit/Source/modules/accessibility/AXTable.cpp
index af68f1a4..1952d30 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXTable.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXTable.cpp
@@ -419,7 +419,7 @@
       m_rows.push_back(row);
       if (!row->accessibilityIsIgnored())
         m_children.push_back(row);
-      appendedRows.add(row);
+      appendedRows.insert(row);
     }
 
     tableSection = table->sectionBelow(tableSection, SkipEmptySections);
diff --git a/third_party/WebKit/Source/modules/background_sync/OWNERS b/third_party/WebKit/Source/modules/background_sync/OWNERS
index c60b9f9..a97cadfa 100644
--- a/third_party/WebKit/Source/modules/background_sync/OWNERS
+++ b/third_party/WebKit/Source/modules/background_sync/OWNERS
@@ -1,2 +1,4 @@
 iclelland@chromium.org
 jkarlin@chromium.org
+
+# COMPONENT: Blink>BackgroundSync
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.cpp
index 942ad9e8..34717ac 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.cpp
@@ -38,7 +38,7 @@
 
 void BluetoothRemoteGATTServer::AddToActiveAlgorithms(
     ScriptPromiseResolver* resolver) {
-  auto result = m_activeAlgorithms.add(resolver);
+  auto result = m_activeAlgorithms.insert(resolver);
   CHECK(result.isNewEntry);
 }
 
diff --git a/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.cpp b/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.cpp
index 357f53f..47af02e 100644
--- a/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.cpp
+++ b/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.cpp
@@ -212,7 +212,7 @@
       m_pendingGenerators.add(name, nullptr).storedValue->value;
   if (!set)
     set = new GeneratorHashSet;
-  set->add(generator);
+  set->insert(generator);
 }
 
 DEFINE_TRACE(PaintWorkletGlobalScope) {
diff --git a/third_party/WebKit/Source/modules/fetch/FetchManager.cpp b/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
index 6da72cf7..344f905 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
@@ -918,7 +918,7 @@
   Loader* loader =
       Loader::create(getExecutionContext(), this, resolver, request,
                      scriptState->world().isIsolatedWorld());
-  m_loaders.add(loader);
+  m_loaders.insert(loader);
   loader->start();
   return promise;
 }
diff --git a/third_party/WebKit/Source/modules/fetch/FetchResponseData.cpp b/third_party/WebKit/Source/modules/fetch/FetchResponseData.cpp
index a9d937e..6509cae 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchResponseData.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FetchResponseData.cpp
@@ -126,7 +126,7 @@
         (explicitlyExposed &&
          !FetchUtils::isForbiddenResponseHeaderName(name))) {
       if (explicitlyExposed)
-        response->m_corsExposedHeaderNames.add(name);
+        response->m_corsExposedHeaderNames.insert(name);
       response->m_headerList->append(name, header->second);
     }
   }
diff --git a/third_party/WebKit/Source/modules/fetch/FetchResponseDataTest.cpp b/third_party/WebKit/Source/modules/fetch/FetchResponseDataTest.cpp
index 13a40a8..b81076e 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchResponseDataTest.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FetchResponseDataTest.cpp
@@ -171,8 +171,8 @@
 TEST_F(FetchResponseDataTest, CORSFilterWithExplicitHeaderSet) {
   FetchResponseData* internalResponse = createInternalResponse();
   HTTPHeaderSet exposedHeaders;
-  exposedHeaders.add("set-cookie");
-  exposedHeaders.add("bar");
+  exposedHeaders.insert("set-cookie");
+  exposedHeaders.insert("bar");
 
   FetchResponseData* corsResponseData =
       internalResponse->createCORSFilteredResponse(exposedHeaders);
diff --git a/third_party/WebKit/Source/modules/fetch/Response.cpp b/third_party/WebKit/Source/modules/fetch/Response.cpp
index 63bc3bd..fc32fe8 100644
--- a/third_party/WebKit/Source/modules/fetch/Response.cpp
+++ b/third_party/WebKit/Source/modules/fetch/Response.cpp
@@ -73,7 +73,7 @@
     case WebServiceWorkerResponseTypeCORS: {
       HTTPHeaderSet headerNames;
       for (const auto& header : webResponse.corsExposedHeaderNames())
-        headerNames.add(String(header));
+        headerNames.insert(String(header));
       response = response->createCORSFilteredResponse(headerNames);
       break;
     }
diff --git a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
index 95f543b9..846e17b 100644
--- a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
+++ b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
@@ -171,7 +171,7 @@
       GeoNotifier::create(this, successCallback, errorCallback, options);
   startRequest(notifier);
 
-  m_oneShots.add(notifier);
+  m_oneShots.insert(notifier);
 }
 
 int Geolocation::watchPosition(PositionCallback* successCallback,
@@ -216,7 +216,7 @@
   else if (!isAllowed()) {
     // If we don't yet have permission, request for permission before calling
     // startUpdating()
-    m_pendingForPermissionNotifiers.add(notifier);
+    m_pendingForPermissionNotifiers.insert(notifier);
     requestPermission();
   } else {
     startUpdating(notifier);
@@ -375,7 +375,7 @@
 void Geolocation::copyToSet(const GeoNotifierVector& src,
                             GeoNotifierSet& dest) {
   for (GeoNotifier* notifier : src)
-    dest.add(notifier);
+    dest.insert(notifier);
 }
 
 void Geolocation::handleError(PositionError* error) {
diff --git a/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp b/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
index c1bb1e86..b69ab6b 100644
--- a/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
+++ b/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
@@ -107,7 +107,7 @@
     return promise;
   }
 
-  m_serviceRequests.add(resolver);
+  m_serviceRequests.insert(resolver);
 
   // m_streamTrack->component()->source()->id() is the renderer "name" of the
   // camera;
@@ -138,7 +138,7 @@
     return promise;
   }
 
-  m_serviceRequests.add(resolver);
+  m_serviceRequests.insert(resolver);
 
   // TODO(mcasas): should be using a mojo::StructTraits instead.
   media::mojom::blink::PhotoSettingsPtr settings =
@@ -223,7 +223,7 @@
     return promise;
   }
 
-  m_serviceRequests.add(resolver);
+  m_serviceRequests.insert(resolver);
 
   // m_streamTrack->component()->source()->id() is the renderer "name" of the
   // camera;
diff --git a/third_party/WebKit/Source/modules/imagecapture/OWNERS b/third_party/WebKit/Source/modules/imagecapture/OWNERS
index 22ef8b81..6cc0c4e 100644
--- a/third_party/WebKit/Source/modules/imagecapture/OWNERS
+++ b/third_party/WebKit/Source/modules/imagecapture/OWNERS
@@ -1,2 +1,4 @@
 mcasas@chromium.org
 reillyg@chromium.org
+
+# COMPONENT: Blink>ImageCapture
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
index cd44122..1eac532 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
@@ -193,7 +193,7 @@
         const std::pair<int64_t, std::vector<int64_t>>& obs_txn = it->second;
         HashSet<String> stores;
         for (int64_t store_id : obs_txn.second) {
-          stores.add(m_metadata.objectStores.get(store_id)->name);
+          stores.insert(m_metadata.objectStores.get(store_id)->name);
         }
 
         transaction = IDBTransaction::createObserver(
@@ -361,14 +361,14 @@
 
   HashSet<String> scope;
   if (storeNames.isString()) {
-    scope.add(storeNames.getAsString());
+    scope.insert(storeNames.getAsString());
   } else if (storeNames.isStringSequence()) {
     for (const String& name : storeNames.getAsStringSequence())
-      scope.add(name);
+      scope.insert(name);
   } else if (storeNames.isDOMStringList()) {
     const Vector<String>& list = *storeNames.getAsDOMStringList();
     for (const String& name : list)
-      scope.add(name);
+      scope.insert(name);
   } else {
     NOTREACHED();
   }
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBTransactionTest.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBTransactionTest.cpp
index d04f320..e169f4e5 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBTransactionTest.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBTransactionTest.cpp
@@ -73,13 +73,13 @@
 
   const int64_t transactionId = 1234;
   HashSet<String> transactionScope = HashSet<String>();
-  transactionScope.add("test-store-name");
+  transactionScope.insert("test-store-name");
   Persistent<IDBTransaction> transaction =
       IDBTransaction::createNonVersionChange(
           scope.getScriptState(), transactionId, transactionScope,
           WebIDBTransactionModeReadOnly, db.get());
   PersistentHeapHashSet<WeakMember<IDBTransaction>> set;
-  set.add(transaction);
+  set.insert(transaction);
 
   ThreadState::current()->collectAllGarbage();
   EXPECT_EQ(1u, set.size());
@@ -113,13 +113,13 @@
                           FakeIDBDatabaseCallbacks::create());
 
   HashSet<String> transactionScope = HashSet<String>();
-  transactionScope.add("test-store-name");
+  transactionScope.insert("test-store-name");
   Persistent<IDBTransaction> transaction =
       IDBTransaction::createNonVersionChange(
           scope.getScriptState(), transactionId, transactionScope,
           WebIDBTransactionModeReadOnly, db.get());
   PersistentHeapHashSet<WeakMember<IDBTransaction>> set;
-  set.add(transaction);
+  set.insert(transaction);
 
   ThreadState::current()->collectAllGarbage();
   EXPECT_EQ(1u, set.size());
diff --git a/third_party/WebKit/Source/modules/mediacapturefromelement/OWNERS b/third_party/WebKit/Source/modules/mediacapturefromelement/OWNERS
index 6d18c2b2..14affd71 100644
--- a/third_party/WebKit/Source/modules/mediacapturefromelement/OWNERS
+++ b/third_party/WebKit/Source/modules/mediacapturefromelement/OWNERS
@@ -1,2 +1,5 @@
 emircan@chromium.org
 mcasas@chromium.org
+
+# TEAM: media-capture-and-streams@grotations.appspotmail.com
+# COMPONENT: Blink>MediaStream>CaptureFromElement
diff --git a/third_party/WebKit/Source/modules/mediarecorder/OWNERS b/third_party/WebKit/Source/modules/mediarecorder/OWNERS
index ad30158..cd2027e 100644
--- a/third_party/WebKit/Source/modules/mediarecorder/OWNERS
+++ b/third_party/WebKit/Source/modules/mediarecorder/OWNERS
@@ -1,2 +1,4 @@
 mcasas@chromium.org
 peter@chromium.org
+
+# COMPONENT: Blink>MediaRecording
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp
index 2b5595fd..93c48d7 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp
@@ -313,7 +313,7 @@
 void MediaStreamTrack::registerMediaStream(MediaStream* mediaStream) {
   CHECK(!m_isIteratingRegisteredMediaStreams);
   CHECK(!m_registeredMediaStreams.contains(mediaStream));
-  m_registeredMediaStreams.add(mediaStream);
+  m_registeredMediaStreams.insert(mediaStream);
 }
 
 void MediaStreamTrack::unregisterMediaStream(MediaStream* mediaStream) {
diff --git a/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp b/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
index 099ab4b..3ab2553a 100644
--- a/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
+++ b/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
@@ -47,7 +47,7 @@
       "ssh",     "tel",  "urn",  "webcal",      "wtai", "xmpp",
   };
   for (size_t i = 0; i < WTF_ARRAY_LENGTH(schemes); ++i)
-    schemeWhitelist->add(schemes[i]);
+    schemeWhitelist->insert(schemes[i]);
 }
 
 static bool verifyCustomHandlerURL(const Document& document,
diff --git a/third_party/WebKit/Source/modules/netinfo/OWNERS b/third_party/WebKit/Source/modules/netinfo/OWNERS
index 1e6deee..2f1bdfc 100644
--- a/third_party/WebKit/Source/modules/netinfo/OWNERS
+++ b/third_party/WebKit/Source/modules/netinfo/OWNERS
@@ -1 +1,3 @@
 jkarlin@chromium.org
+
+# COMPONENT: Internals>Network>NetInfo
diff --git a/third_party/WebKit/Source/modules/nfc/NFC.cpp b/third_party/WebKit/Source/modules/nfc/NFC.cpp
index 5a07ae7..7125180 100644
--- a/third_party/WebKit/Source/modules/nfc/NFC.cpp
+++ b/third_party/WebKit/Source/modules/nfc/NFC.cpp
@@ -636,7 +636,7 @@
   }
 
   ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
-  m_requests.add(resolver);
+  m_requests.insert(resolver);
   auto callback = convertToBaseCallback(WTF::bind(&NFC::OnRequestCompleted,
                                                   wrapPersistent(this),
                                                   wrapPersistent(resolver)));
@@ -654,7 +654,7 @@
     return promise;
 
   ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
-  m_requests.add(resolver);
+  m_requests.insert(resolver);
   auto callback = convertToBaseCallback(WTF::bind(&NFC::OnRequestCompleted,
                                                   wrapPersistent(this),
                                                   wrapPersistent(resolver)));
@@ -674,7 +674,7 @@
 
   callback->setScriptState(scriptState);
   ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
-  m_requests.add(resolver);
+  m_requests.insert(resolver);
   auto watchCallback = convertToBaseCallback(
       WTF::bind(&NFC::OnWatchRegistered, wrapPersistent(this),
                 wrapPersistent(callback), wrapPersistent(resolver)));
@@ -697,7 +697,7 @@
   }
 
   ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
-  m_requests.add(resolver);
+  m_requests.insert(resolver);
   m_nfc->CancelWatch(id, convertToBaseCallback(WTF::bind(
                              &NFC::OnRequestCompleted, wrapPersistent(this),
                              wrapPersistent(resolver))));
@@ -713,7 +713,7 @@
 
   m_callbacks.clear();
   ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
-  m_requests.add(resolver);
+  m_requests.insert(resolver);
   m_nfc->CancelAllWatches(convertToBaseCallback(
       WTF::bind(&NFC::OnRequestCompleted, wrapPersistent(this),
                 wrapPersistent(resolver))));
diff --git a/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp b/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp
index 1f48093..a868e620c 100644
--- a/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp
+++ b/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp
@@ -176,7 +176,7 @@
       WTF::bind(&ServiceWorkerRegistrationNotifications::didLoadResources,
                 wrapWeakPersistent(this), origin.release(), data,
                 WTF::passed(std::move(callbacks))));
-  m_loaders.add(loader);
+  m_loaders.insert(loader);
   loader->start(getExecutionContext(), data);
 }
 
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
index 8db8b26..dad864d 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
@@ -196,7 +196,7 @@
       return;
     }
 
-    uniqueIds.add(option.id());
+    uniqueIds.insert(option.id());
 
     validateShippingOptionOrPaymentItem(option, exceptionState);
     if (exceptionState.hadException())
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationController.cpp b/third_party/WebKit/Source/modules/presentation/PresentationController.cpp
index f661e7b..8f1646e6 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationController.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationController.cpp
@@ -132,7 +132,7 @@
 
 void PresentationController::registerConnection(
     PresentationConnection* connection) {
-  m_connections.add(connection);
+  m_connections.insert(connection);
 }
 
 void PresentationController::contextDestroyed(ExecutionContext*) {
diff --git a/third_party/WebKit/Source/modules/sensor/SensorProviderProxy.cpp b/third_party/WebKit/Source/modules/sensor/SensorProviderProxy.cpp
index 911c21c..5ba08f6 100644
--- a/third_party/WebKit/Source/modules/sensor/SensorProviderProxy.cpp
+++ b/third_party/WebKit/Source/modules/sensor/SensorProviderProxy.cpp
@@ -59,7 +59,7 @@
 
   SensorProxy* sensor =
       new SensorProxy(type, this, document, std::move(readingFactory));
-  m_sensorProxies.add(sensor);
+  m_sensorProxies.insert(sensor);
 
   return sensor;
 }
diff --git a/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp b/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp
index ca953a0a..084fec8 100644
--- a/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp
+++ b/third_party/WebKit/Source/modules/sensor/SensorProxy.cpp
@@ -48,7 +48,7 @@
 
 void SensorProxy::addObserver(Observer* observer) {
   if (!m_observers.contains(observer))
-    m_observers.add(observer);
+    m_observers.insert(observer);
 }
 
 void SensorProxy::removeObserver(Observer* observer) {
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchRespondWithObserver.cpp b/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchRespondWithObserver.cpp
index 1d4af48..92e64564 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchRespondWithObserver.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchRespondWithObserver.cpp
@@ -69,7 +69,7 @@
     HTTPHeaderSet headers;
     if (foreignFetchResponse.hasHeaders()) {
       for (const String& header : foreignFetchResponse.headers())
-        headers.add(header);
+        headers.insert(header);
       if (response->response()->getType() == FetchResponseData::CORSType) {
         const HTTPHeaderSet& existingHeaders =
             response->response()->corsExposedHeaderNames();
@@ -77,7 +77,7 @@
         for (HTTPHeaderSet::iterator it = headers.begin(); it != headers.end();
              ++it) {
           if (!existingHeaders.contains(*it))
-            headersToRemove.add(*it);
+            headersToRemove.insert(*it);
         }
         headers.removeAll(headersToRemove);
       }
diff --git a/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp b/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp
index 0f238a7..9f8beca 100644
--- a/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp
+++ b/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp
@@ -37,7 +37,7 @@
         NotSupportedError, "Barcode detection service unavailable."));
     return promise;
   }
-  m_barcodeServiceRequests.add(resolver);
+  m_barcodeServiceRequests.insert(resolver);
   m_barcodeService->Detect(
       std::move(sharedBufferHandle), imageWidth, imageHeight,
       convertToBaseCallback(WTF::bind(&BarcodeDetector::onDetectBarcodes,
diff --git a/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp b/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp
index 1a57df4..ccda92a 100644
--- a/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp
+++ b/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp
@@ -46,7 +46,7 @@
         NotSupportedError, "Face detection service unavailable."));
     return promise;
   }
-  m_faceServiceRequests.add(resolver);
+  m_faceServiceRequests.insert(resolver);
   m_faceService->Detect(std::move(sharedBufferHandle), imageWidth, imageHeight,
                         convertToBaseCallback(WTF::bind(
                             &FaceDetector::onDetectFaces, wrapPersistent(this),
diff --git a/third_party/WebKit/Source/modules/shapedetection/TextDetector.cpp b/third_party/WebKit/Source/modules/shapedetection/TextDetector.cpp
index 61c0d83..d887f9db 100644
--- a/third_party/WebKit/Source/modules/shapedetection/TextDetector.cpp
+++ b/third_party/WebKit/Source/modules/shapedetection/TextDetector.cpp
@@ -35,7 +35,7 @@
         NotSupportedError, "Text detection service unavailable."));
     return promise;
   }
-  m_textServiceRequests.add(resolver);
+  m_textServiceRequests.insert(resolver);
   m_textService->Detect(std::move(sharedBufferHandle), imageWidth, imageHeight,
                         convertToBaseCallback(WTF::bind(
                             &TextDetector::onDetectText, wrapPersistent(this),
diff --git a/third_party/WebKit/Source/modules/time_zone_monitor/TimeZoneMonitorClient.cpp b/third_party/WebKit/Source/modules/time_zone_monitor/TimeZoneMonitorClient.cpp
index a383c046..decda185 100644
--- a/third_party/WebKit/Source/modules/time_zone_monitor/TimeZoneMonitorClient.cpp
+++ b/third_party/WebKit/Source/modules/time_zone_monitor/TimeZoneMonitorClient.cpp
@@ -73,7 +73,7 @@
     thread->postTask(BLINK_FROM_HERE,
                      crossThreadBind(&NotifyTimezoneChangeOnWorkerThread,
                                      WTF::crossThreadUnretained(thread)));
-    posted.add(&thread->workerBackingThread());
+    posted.insert(&thread->workerBackingThread());
   }
 }
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioListener.cpp b/third_party/WebKit/Source/modules/webaudio/AudioListener.cpp
index 9ef06112..7475302 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioListener.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioListener.cpp
@@ -86,7 +86,7 @@
 
 void AudioListener::addPanner(PannerHandler& panner) {
   DCHECK(isMainThread());
-  m_panners.add(&panner);
+  m_panners.insert(&panner);
 }
 
 void AudioListener::removePanner(PannerHandler& panner) {
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
index 5474f282..c2c0dcf4 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
@@ -644,7 +644,7 @@
       .connect(handler().output(outputIndex));
   if (!m_connectedNodes[outputIndex])
     m_connectedNodes[outputIndex] = new HeapHashSet<Member<AudioNode>>();
-  m_connectedNodes[outputIndex]->add(destination);
+  m_connectedNodes[outputIndex]->insert(destination);
 
   // Let context know that a connection has been made.
   context()->incrementConnectionCount();
@@ -687,7 +687,7 @@
   param->handler().connect(handler().output(outputIndex));
   if (!m_connectedParams[outputIndex])
     m_connectedParams[outputIndex] = new HeapHashSet<Member<AudioParam>>();
-  m_connectedParams[outputIndex]->add(param);
+  m_connectedParams[outputIndex]->insert(param);
 }
 
 void AudioNode::disconnectAllFromOutput(unsigned outputIndex) {
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.cpp b/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.cpp
index 116766e..d6ee8a8c 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.cpp
@@ -51,7 +51,7 @@
     return;
 
   output.addInput(*this);
-  m_outputs.add(&output);
+  m_outputs.insert(&output);
   changedOutputs();
 }
 
@@ -84,7 +84,7 @@
   ASSERT(deferredTaskHandler().isGraphOwner());
   DCHECK(m_outputs.contains(&output));
 
-  m_disabledOutputs.add(&output);
+  m_disabledOutputs.insert(&output);
   m_outputs.remove(&output);
   changedOutputs();
 
@@ -96,7 +96,7 @@
   ASSERT(deferredTaskHandler().isGraphOwner());
 
   // Move output from disabled list to active list.
-  m_outputs.add(&output);
+  m_outputs.insert(&output);
   if (m_disabledOutputs.size() > 0) {
     DCHECK(m_disabledOutputs.contains(&output));
     m_disabledOutputs.remove(&output);
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.cpp b/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.cpp
index 7125c51..c008f6c 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.cpp
@@ -161,7 +161,7 @@
 
 void AudioNodeOutput::addInput(AudioNodeInput& input) {
   ASSERT(deferredTaskHandler().isGraphOwner());
-  m_inputs.add(&input);
+  m_inputs.insert(&input);
   input.handler().makeConnection();
 }
 
@@ -193,7 +193,7 @@
 
 void AudioNodeOutput::addParam(AudioParamHandler& param) {
   ASSERT(deferredTaskHandler().isGraphOwner());
-  m_params.add(&param);
+  m_params.insert(&param);
 }
 
 void AudioNodeOutput::removeParam(AudioParamHandler& param) {
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp b/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp
index 4ae77b7..10621463 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp
@@ -294,7 +294,7 @@
     return;
 
   output.addParam(*this);
-  m_outputs.add(&output);
+  m_outputs.insert(&output);
   changedOutputs();
 }
 
diff --git a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp
index 29b44660..43971019 100644
--- a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp
@@ -288,7 +288,7 @@
 
   DCHECK_GT(rate, 0);
 
-  m_decodeAudioResolvers.add(resolver);
+  m_decodeAudioResolvers.insert(resolver);
   m_audioDecoder.decodeAsync(audioData, rate, successCallback, errorCallback,
                              resolver, this);
 
@@ -668,7 +668,7 @@
         continue;
       if (handler == &node->handler()) {
         handler->breakConnection();
-        m_finishedSourceNodes.add(node);
+        m_finishedSourceNodes.insert(node);
         didRemove = true;
         break;
       }
diff --git a/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp b/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp
index 4522c2e6..f4ecbda4 100644
--- a/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp
@@ -88,7 +88,7 @@
 void DeferredTaskHandler::markSummingJunctionDirty(
     AudioSummingJunction* summingJunction) {
   ASSERT(isGraphOwner());
-  m_dirtySummingJunctions.add(summingJunction);
+  m_dirtySummingJunctions.insert(summingJunction);
 }
 
 void DeferredTaskHandler::removeMarkedSummingJunction(
@@ -101,7 +101,7 @@
 void DeferredTaskHandler::markAudioNodeOutputDirty(AudioNodeOutput* output) {
   ASSERT(isGraphOwner());
   DCHECK(isMainThread());
-  m_dirtyAudioNodeOutputs.add(output);
+  m_dirtyAudioNodeOutputs.insert(output);
 }
 
 void DeferredTaskHandler::removeMarkedAudioNodeOutput(AudioNodeOutput* output) {
@@ -135,7 +135,7 @@
   ASSERT(isGraphOwner());
 
   if (!m_automaticPullNodes.contains(node)) {
-    m_automaticPullNodes.add(node);
+    m_automaticPullNodes.insert(node);
     m_automaticPullNodesNeedUpdating = true;
   }
 }
@@ -168,7 +168,7 @@
 void DeferredTaskHandler::addChangedChannelCountMode(AudioHandler* node) {
   ASSERT(isGraphOwner());
   DCHECK(isMainThread());
-  m_deferredCountModeChange.add(node);
+  m_deferredCountModeChange.insert(node);
 }
 
 void DeferredTaskHandler::removeChangedChannelCountMode(AudioHandler* node) {
@@ -180,7 +180,7 @@
 void DeferredTaskHandler::addChangedChannelInterpretation(AudioHandler* node) {
   ASSERT(isGraphOwner());
   DCHECK(isMainThread());
-  m_deferredChannelInterpretationChange.add(node);
+  m_deferredChannelInterpretationChange.insert(node);
 }
 
 void DeferredTaskHandler::removeChangedChannelInterpretation(
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp
index c928b635..19f8b088 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp
@@ -132,7 +132,7 @@
   ASSERT(!m_openDatabaseSet.contains(database));
   MutexLocker lock(m_terminationRequestedMutex);
   if (!m_terminationRequested)
-    m_openDatabaseSet.add(database);
+    m_openDatabaseSet.insert(database);
 }
 
 void DatabaseThread::recordDatabaseClosed(Database* database) {
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseTracker.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseTracker.cpp
index c85da9c..2eeb8c7a 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseTracker.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseTracker.cpp
@@ -111,7 +111,7 @@
     nameMap->set(name, databaseSet);
   }
 
-  databaseSet->add(database);
+  databaseSet->insert(database);
 }
 
 void DatabaseTracker::removeOpenDatabase(Database* database) {
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionCoordinator.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionCoordinator.cpp
index 0ce9efb..30248b2d 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionCoordinator.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionCoordinator.cpp
@@ -57,7 +57,7 @@
   if (firstPendingTransaction->isReadOnly()) {
     do {
       firstPendingTransaction = info.pendingTransactions.takeFirst();
-      info.activeReadTransactions.add(firstPendingTransaction);
+      info.activeReadTransactions.insert(firstPendingTransaction);
       firstPendingTransaction->lockAcquired();
     } while (!info.pendingTransactions.isEmpty() &&
              info.pendingTransactions.first()->isReadOnly());
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
index cdc1908..7222013 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -401,7 +401,7 @@
 
 void WebGL2RenderingContextBase::registerGetBufferSubDataAsyncCallback(
     WebGLGetBufferSubDataAsyncCallback* callback) {
-  m_getBufferSubDataAsyncCallbacks.add(callback);
+  m_getBufferSubDataAsyncCallbacks.insert(callback);
 }
 
 void WebGL2RenderingContextBase::unregisterGetBufferSubDataAsyncCallback(
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLContextGroup.cpp b/third_party/WebKit/Source/modules/webgl/WebGLContextGroup.cpp
index 5d88165..db5e0cf 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLContextGroup.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLContextGroup.cpp
@@ -35,7 +35,8 @@
 }
 
 void WebGLContextGroup::addContext(WebGLRenderingContextBase* context) {
-  m_contexts.add(TraceWrapperMember<WebGLRenderingContextBase>(this, context));
+  m_contexts.insert(
+      TraceWrapperMember<WebGLRenderingContextBase>(this, context));
 }
 
 void WebGLContextGroup::loseContextGroup(
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
index e4a0bf4..24795897 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -223,7 +223,7 @@
   }
 
   ASSERT(!context->isContextLost());
-  activeContexts().add(context);
+  activeContexts().insert(context);
 }
 
 void WebGLRenderingContextBase::deactivateContext(
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDIAccess.cpp b/third_party/WebKit/Source/modules/webmidi/MIDIAccess.cpp
index 6cca9d5b..1916824 100644
--- a/third_party/WebKit/Source/modules/webmidi/MIDIAccess.cpp
+++ b/third_party/WebKit/Source/modules/webmidi/MIDIAccess.cpp
@@ -110,7 +110,7 @@
     MIDIInput* input = m_inputs[i];
     if (input->getState() != PortState::DISCONNECTED) {
       inputs.push_back(input);
-      ids.add(input->id());
+      ids.insert(input->id());
     }
   }
   if (inputs.size() != ids.size()) {
@@ -127,7 +127,7 @@
     MIDIOutput* output = m_outputs[i];
     if (output->getState() != PortState::DISCONNECTED) {
       outputs.push_back(output);
-      ids.add(output->id());
+      ids.insert(output->id());
     }
   }
   if (outputs.size() != ids.size()) {
diff --git a/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp b/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp
index de92c36a..5216a08 100644
--- a/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp
+++ b/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp
@@ -108,7 +108,7 @@
 
   ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
   ShareClientImpl* client = new ShareClientImpl(this, resolver);
-  m_clients.add(client);
+  m_clients.insert(client);
   ScriptPromise promise = resolver->promise();
 
   m_service->Share(shareData.hasTitle() ? shareData.title() : emptyString(),
diff --git a/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp b/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp
index d1702a21..1ed6912aa 100644
--- a/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp
+++ b/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp
@@ -364,7 +364,7 @@
   // Fail if there're duplicated elements in |protocols|.
   HashSet<String> visited;
   for (size_t i = 0; i < protocols.size(); ++i) {
-    if (!visited.add(protocols[i]).isNewEntry) {
+    if (!visited.insert(protocols[i]).isNewEntry) {
       m_state = kClosed;
       exceptionState.throwDOMException(
           SyntaxError, "The subprotocol '" +
diff --git a/third_party/WebKit/Source/modules/webusb/USB.cpp b/third_party/WebKit/Source/modules/webusb/USB.cpp
index 2348217..be32f16 100644
--- a/third_party/WebKit/Source/modules/webusb/USB.cpp
+++ b/third_party/WebKit/Source/modules/webusb/USB.cpp
@@ -88,7 +88,7 @@
     if (!executionContext->isSecureContext(errorMessage)) {
       resolver->reject(DOMException::create(SecurityError, errorMessage));
     } else {
-      m_deviceManagerRequests.add(resolver);
+      m_deviceManagerRequests.insert(resolver);
       m_deviceManager->GetDevices(
           nullptr, convertToBaseCallback(WTF::bind(&USB::onGetDevices,
                                                    wrapPersistent(this),
@@ -135,7 +135,7 @@
       for (const auto& filter : options.filters())
         filters.push_back(convertDeviceFilter(filter));
     }
-    m_chooserServiceRequests.add(resolver);
+    m_chooserServiceRequests.insert(resolver);
     m_chooserService->GetPermission(
         std::move(filters), convertToBaseCallback(WTF::bind(
                                 &USB::onGetPermission, wrapPersistent(this),
diff --git a/third_party/WebKit/Source/modules/webusb/USBDevice.cpp b/third_party/WebKit/Source/modules/webusb/USBDevice.cpp
index 214fd14..81f2840 100644
--- a/third_party/WebKit/Source/modules/webusb/USBDevice.cpp
+++ b/third_party/WebKit/Source/modules/webusb/USBDevice.cpp
@@ -154,7 +154,7 @@
       resolver->resolve();
     } else {
       m_deviceStateChangeInProgress = true;
-      m_deviceRequests.add(resolver);
+      m_deviceRequests.insert(resolver);
       m_device->Open(convertToBaseCallback(
           WTF::bind(&USBDevice::asyncOpen, wrapPersistent(this),
                     wrapPersistent(resolver))));
@@ -174,7 +174,7 @@
       resolver->resolve();
     } else {
       m_deviceStateChangeInProgress = true;
-      m_deviceRequests.add(resolver);
+      m_deviceRequests.insert(resolver);
       m_device->Close(convertToBaseCallback(
           WTF::bind(&USBDevice::asyncClose, wrapPersistent(this),
                     wrapPersistent(resolver))));
@@ -204,7 +204,7 @@
         resolver->resolve();
       } else {
         m_deviceStateChangeInProgress = true;
-        m_deviceRequests.add(resolver);
+        m_deviceRequests.insert(resolver);
         m_device->SetConfiguration(
             configurationValue,
             convertToBaseCallback(WTF::bind(
@@ -234,7 +234,7 @@
       resolver->resolve();
     } else {
       m_interfaceStateChangeInProgress.set(interfaceIndex);
-      m_deviceRequests.add(resolver);
+      m_deviceRequests.insert(resolver);
       m_device->ClaimInterface(
           interfaceNumber,
           convertToBaseCallback(WTF::bind(&USBDevice::asyncClaimInterface,
@@ -269,7 +269,7 @@
       // changing.
       setEndpointsForInterface(interfaceIndex, false);
       m_interfaceStateChangeInProgress.set(interfaceIndex);
-      m_deviceRequests.add(resolver);
+      m_deviceRequests.insert(resolver);
       m_device->ReleaseInterface(
           interfaceNumber,
           convertToBaseCallback(WTF::bind(&USBDevice::asyncReleaseInterface,
@@ -303,7 +303,7 @@
       // the change is in progress.
       setEndpointsForInterface(interfaceIndex, false);
       m_interfaceStateChangeInProgress.set(interfaceIndex);
-      m_deviceRequests.add(resolver);
+      m_deviceRequests.insert(resolver);
       m_device->SetInterfaceAlternateSetting(
           interfaceNumber, alternateSetting,
           convertToBaseCallback(WTF::bind(
@@ -326,7 +326,7 @@
   if (ensureDeviceConfigured(resolver)) {
     auto parameters = convertControlTransferParameters(setup, resolver);
     if (parameters) {
-      m_deviceRequests.add(resolver);
+      m_deviceRequests.insert(resolver);
       m_device->ControlTransferIn(
           std::move(parameters), length, 0,
           convertToBaseCallback(WTF::bind(&USBDevice::asyncControlTransferIn,
@@ -348,7 +348,7 @@
   if (ensureDeviceConfigured(resolver)) {
     auto parameters = convertControlTransferParameters(setup, resolver);
     if (parameters) {
-      m_deviceRequests.add(resolver);
+      m_deviceRequests.insert(resolver);
       m_device->ControlTransferOut(
           std::move(parameters), Vector<uint8_t>(), 0,
           convertToBaseCallback(WTF::bind(&USBDevice::asyncControlTransferOut,
@@ -373,7 +373,7 @@
     if (parameters) {
       Vector<uint8_t> buffer = convertBufferSource(data);
       unsigned transferLength = buffer.size();
-      m_deviceRequests.add(resolver);
+      m_deviceRequests.insert(resolver);
       m_device->ControlTransferOut(
           std::move(parameters), buffer, 0,
           convertToBaseCallback(WTF::bind(&USBDevice::asyncControlTransferOut,
@@ -393,7 +393,7 @@
   ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
   ScriptPromise promise = resolver->promise();
   if (ensureEndpointAvailable(direction == "in", endpointNumber, resolver)) {
-    m_deviceRequests.add(resolver);
+    m_deviceRequests.insert(resolver);
     m_device->ClearHalt(endpointNumber,
                         convertToBaseCallback(WTF::bind(
                             &USBDevice::asyncClearHalt, wrapPersistent(this),
@@ -411,7 +411,7 @@
   ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
   ScriptPromise promise = resolver->promise();
   if (ensureEndpointAvailable(true /* in */, endpointNumber, resolver)) {
-    m_deviceRequests.add(resolver);
+    m_deviceRequests.insert(resolver);
     m_device->GenericTransferIn(
         endpointNumber, length, 0,
         convertToBaseCallback(WTF::bind(&USBDevice::asyncTransferIn,
@@ -432,7 +432,7 @@
   if (ensureEndpointAvailable(false /* out */, endpointNumber, resolver)) {
     Vector<uint8_t> buffer = convertBufferSource(data);
     unsigned transferLength = buffer.size();
-    m_deviceRequests.add(resolver);
+    m_deviceRequests.insert(resolver);
     m_device->GenericTransferOut(
         endpointNumber, buffer, 0,
         convertToBaseCallback(WTF::bind(&USBDevice::asyncTransferOut,
@@ -451,7 +451,7 @@
   ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
   ScriptPromise promise = resolver->promise();
   if (ensureEndpointAvailable(true /* in */, endpointNumber, resolver)) {
-    m_deviceRequests.add(resolver);
+    m_deviceRequests.insert(resolver);
     m_device->IsochronousTransferIn(
         endpointNumber, packetLengths, 0,
         convertToBaseCallback(WTF::bind(&USBDevice::asyncIsochronousTransferIn,
@@ -472,7 +472,7 @@
   ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
   ScriptPromise promise = resolver->promise();
   if (ensureEndpointAvailable(false /* out */, endpointNumber, resolver)) {
-    m_deviceRequests.add(resolver);
+    m_deviceRequests.insert(resolver);
     m_device->IsochronousTransferOut(
         endpointNumber, convertBufferSource(data), packetLengths, 0,
         convertToBaseCallback(WTF::bind(&USBDevice::asyncIsochronousTransferOut,
@@ -492,7 +492,7 @@
     if (!m_opened) {
       resolver->reject(DOMException::create(InvalidStateError, kOpenRequired));
     } else {
-      m_deviceRequests.add(resolver);
+      m_deviceRequests.insert(resolver);
       m_device->Reset(convertToBaseCallback(
           WTF::bind(&USBDevice::asyncReset, wrapPersistent(this),
                     wrapPersistent(resolver))));
diff --git a/third_party/WebKit/Source/platform/LifecycleNotifier.h b/third_party/WebKit/Source/platform/LifecycleNotifier.h
index f6b7412..cf1480e 100644
--- a/third_party/WebKit/Source/platform/LifecycleNotifier.h
+++ b/third_party/WebKit/Source/platform/LifecycleNotifier.h
@@ -145,7 +145,7 @@
 template <typename T, typename Observer>
 inline void LifecycleNotifier<T, Observer>::addObserver(Observer* observer) {
   RELEASE_ASSERT(m_iterationState & AllowingAddition);
-  m_observers.add(observer);
+  m_observers.insert(observer);
 }
 
 template <typename T, typename Observer>
@@ -153,7 +153,7 @@
   // If immediate removal isn't currently allowed,
   // |observer| is recorded for pending removal.
   if (m_iterationState & AllowPendingRemoval) {
-    m_observers.add(observer);
+    m_observers.insert(observer);
     return;
   }
   RELEASE_ASSERT(m_iterationState & AllowingRemoval);
diff --git a/third_party/WebKit/Source/platform/MemoryCoordinator.cpp b/third_party/WebKit/Source/platform/MemoryCoordinator.cpp
index c116f3e..4882b3d 100644
--- a/third_party/WebKit/Source/platform/MemoryCoordinator.cpp
+++ b/third_party/WebKit/Source/platform/MemoryCoordinator.cpp
@@ -45,7 +45,7 @@
   DCHECK(isMainThread());
   DCHECK(client);
   DCHECK(!m_clients.contains(client));
-  m_clients.add(client);
+  m_clients.insert(client);
 }
 
 void MemoryCoordinator::unregisterClient(MemoryCoordinatorClient* client) {
diff --git a/third_party/WebKit/Source/platform/fonts/FontCache.cpp b/third_party/WebKit/Source/platform/fonts/FontCache.cpp
index 9ef8d237..54fc72a7 100644
--- a/third_party/WebKit/Source/platform/fonts/FontCache.cpp
+++ b/third_party/WebKit/Source/platform/fonts/FontCache.cpp
@@ -416,7 +416,7 @@
 
 void FontCache::addClient(FontCacheClient* client) {
   ASSERT(!fontCacheClients().contains(client));
-  fontCacheClients().add(client);
+  fontCacheClients().insert(client);
 }
 
 static unsigned short gGeneration = 0;
diff --git a/third_party/WebKit/Source/platform/fonts/FontFallbackIterator.cpp b/third_party/WebKit/Source/platform/fonts/FontFallbackIterator.cpp
index bd621c954..d082f33a 100644
--- a/third_party/WebKit/Source/platform/fonts/FontFallbackIterator.cpp
+++ b/third_party/WebKit/Source/platform/fonts/FontFallbackIterator.cpp
@@ -78,7 +78,7 @@
   // We don't want to skip subsetted ranges because HarfBuzzShaper's behavior
   // depends on the subsetting.
   if (candidate->isEntireRange())
-    m_uniqueFontDataForRangeSetsReturned.add(candidateId);
+    m_uniqueFontDataForRangeSetsReturned.insert(candidateId);
   return candidate;
 }
 
@@ -234,7 +234,7 @@
 
   if (!hint || m_previouslyAskedForHint.contains(hint))
     return nullptr;
-  m_previouslyAskedForHint.add(hint);
+  m_previouslyAskedForHint.insert(hint);
   return fontCache->fallbackFontForCharacter(
       m_fontDescription, hint,
       m_fontFallbackList->primarySimpleFontData(m_fontDescription));
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
index 3ed44c8..c844454 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
@@ -230,7 +230,7 @@
         m_runs[i]->m_fontData != m_primaryFont &&
         !m_runs[i]->m_fontData->isTextOrientationFallbackOf(
             m_primaryFont.get())) {
-      fallback->add(m_runs[i]->m_fontData.get());
+      fallback->insert(m_runs[i]->m_fontData.get());
     }
   }
 }
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
index ce29c2d..2ec75d5 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
@@ -409,7 +409,7 @@
     s_registeredLayerSet = new HashSet<int>;
   if (s_registeredLayerSet->contains(layer->id()))
     CRASH();
-  s_registeredLayerSet->add(layer->id());
+  s_registeredLayerSet->insert(layer->id());
 }
 
 void GraphicsLayer::unregisterContentsLayer(WebLayer* layer) {
diff --git a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
index 984731a..6e8a5cd 100644
--- a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
+++ b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
@@ -258,7 +258,7 @@
       crossThreadBind(updatePlaceholderImage, this->createWeakPtr(),
                       WTF::passed(std::move(dispatcherTaskRunner)),
                       m_placeholderCanvasId, std::move(image), resource.id));
-  m_spareResourceLocks.add(m_nextResourceId);
+  m_spareResourceLocks.insert(m_nextResourceId);
 
   commitTypeHistogram.count(commitType);
 
diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PropertyTreeManager.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PropertyTreeManager.cpp
index 739e484..0fde7ce 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PropertyTreeManager.cpp
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PropertyTreeManager.cpp
@@ -354,7 +354,7 @@
   DCHECK(!m_effectNodesConverted.contains(nextEffect))
       << "Malformed paint artifact. Paint chunks under the same effect should "
          "be contiguous.";
-  m_effectNodesConverted.add(nextEffect);
+  m_effectNodesConverted.insert(nextEffect);
 #endif
 
   // An effect node can't omit render surface if it has child with exotic
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.cpp b/third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.cpp
index a883ec8..c15baff 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.cpp
@@ -18,7 +18,7 @@
   Vector<String> substrings;
   str.split(' ', substrings);
   for (size_t i = 0; i < substrings.size(); ++i)
-    set.add(substrings[i]);
+    set.insert(substrings[i]);
 }
 
 }  // anonymous namespace
diff --git a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemClient.cpp b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemClient.cpp
index 7cb29a56..a6a9372 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemClient.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemClient.cpp
@@ -28,7 +28,7 @@
   }
   if (!liveDisplayItemClients)
     liveDisplayItemClients = new HashSet<const DisplayItemClient*>();
-  liveDisplayItemClients->add(this);
+  liveDisplayItemClients->insert(this);
 }
 
 DisplayItemClient::~DisplayItemClient() {
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
index d016713..f53f15c 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
@@ -732,7 +732,7 @@
       clientToInvalidate = &oldItem.client();
     }
     if (clientToInvalidate &&
-        invalidatedClientsInOldChunk.add(clientToInvalidate).isNewEntry) {
+        invalidatedClientsInOldChunk.insert(clientToInvalidate).isNewEntry) {
       addRasterInvalidationInfo(
           isPotentiallyInvalidClient ? nullptr : clientToInvalidate, newChunk,
           FloatRect(m_currentPaintArtifact.getDisplayItemList().visualRect(
@@ -745,7 +745,7 @@
        ++newIndex) {
     const DisplayItem& newItem = m_newDisplayItemList[newIndex];
     if (newItem.drawsContent() && !clientCacheIsValid(newItem.client()) &&
-        invalidatedClientsInNewChunk.add(&newItem.client()).isNewEntry) {
+        invalidatedClientsInNewChunk.insert(&newItem.client()).isNewEntry) {
       addRasterInvalidationInfo(&newItem.client(), newChunk,
                                 FloatRect(newItem.client().visualRect()));
     }
diff --git a/third_party/WebKit/Source/platform/heap/Heap.cpp b/third_party/WebKit/Source/platform/heap/Heap.cpp
index 7dd5529..6de39b9 100644
--- a/third_party/WebKit/Source/platform/heap/Heap.cpp
+++ b/third_party/WebKit/Source/platform/heap/Heap.cpp
@@ -215,7 +215,7 @@
     s_mainThreadHeap = this;
 
   MutexLocker locker(ThreadHeap::allHeapsMutex());
-  allHeaps().add(this);
+  allHeaps().insert(this);
 }
 
 ThreadHeap::~ThreadHeap() {
@@ -235,7 +235,7 @@
 
 void ThreadHeap::attach(ThreadState* thread) {
   MutexLocker locker(m_threadAttachMutex);
-  m_threads.add(thread);
+  m_threads.insert(thread);
 }
 
 void ThreadHeap::detach(ThreadState* thread) {
diff --git a/third_party/WebKit/Source/platform/heap/HeapCompact.cpp b/third_party/WebKit/Source/platform/heap/HeapCompact.cpp
index 76b9ed8..2b68cd2 100644
--- a/third_party/WebKit/Source/platform/heap/HeapCompact.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapCompact.cpp
@@ -37,7 +37,7 @@
   // can move (independently from the reference the slot points to.)
   void addCompactingPage(BasePage* page) {
     DCHECK(!page->isLargeObjectPage());
-    m_relocatablePages.add(page);
+    m_relocatablePages.insert(page);
   }
 
   void addInteriorFixup(MovableReference* slot) {
diff --git a/third_party/WebKit/Source/platform/heap/HeapCompactTest.cpp b/third_party/WebKit/Source/platform/heap/HeapCompactTest.cpp
index ebdae68..ab637f0 100644
--- a/third_party/WebKit/Source/platform/heap/HeapCompactTest.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapCompactTest.cpp
@@ -406,7 +406,7 @@
   for (int i = 0; i < 13; ++i) {
     IntWrapper* value = IntWrapper::create(i);
     Inner* inner = new Inner;
-    inner->add(value);
+    inner->insert(value);
     set->add(inner);
   }
   EXPECT_EQ(13u, set->size());
diff --git a/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.cpp b/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.cpp
index e833f35..a9edb4d 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.cpp
@@ -399,7 +399,7 @@
   for (unsigned headerCount = 0; headerCount < headers.size(); headerCount++) {
     String strippedHeader = headers[headerCount].stripWhiteSpace();
     if (!strippedHeader.isEmpty())
-      headerSet.add(strippedHeader);
+      headerSet.insert(strippedHeader);
   }
 }
 
@@ -412,7 +412,7 @@
   // header.
   if (response.wasFetchedViaServiceWorker()) {
     for (const auto& header : response.corsExposedHeaderNames())
-      headerSet.add(header);
+      headerSet.insert(header);
     return;
   }
   parseAccessControlExposeHeadersAllowList(
diff --git a/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp b/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp
index c2a3782..201eea4 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp
@@ -279,7 +279,7 @@
                 BLINK_FROM_HERE,
                 WTF::bind(&ResourceCallback::runTask, WTF::unretained(this)));
   }
-  m_resourcesWithPendingClients.add(resource);
+  m_resourcesWithPendingClients.insert(resource);
 }
 
 void Resource::ResourceCallback::cancel(Resource* resource) {
diff --git a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
index 690a6ed..04a0f36 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
@@ -320,7 +320,7 @@
   if (m_validatedURLs.size() >= kMaxValidatedURLsSize) {
     m_validatedURLs.clear();
   }
-  m_validatedURLs.add(request.resourceRequest().url());
+  m_validatedURLs.insert(request.resourceRequest().url());
 }
 
 static std::unique_ptr<TracedValue> urlForTraceEvent(const KURL& url) {
@@ -423,7 +423,7 @@
       m_nonBlockingLoaders.contains(resource->loader()) &&
       resource->isLinkPreload() && !request.forPreload()) {
     m_nonBlockingLoaders.remove(resource->loader());
-    m_loaders.add(resource->loader());
+    m_loaders.insert(resource->loader());
   }
 }
 
@@ -1031,7 +1031,7 @@
   m_preloads->add(resource);
 
   if (m_preloadedURLsForTest)
-    m_preloadedURLsForTest->add(resource->url().getString());
+    m_preloadedURLsForTest->insert(resource->url().getString());
 }
 
 void ResourceFetcher::enableIsPreloadedForTest() {
@@ -1041,7 +1041,7 @@
 
   if (m_preloads) {
     for (const auto& resource : *m_preloads)
-      m_preloadedURLsForTest->add(resource->url().getString());
+      m_preloadedURLsForTest->insert(resource->url().getString());
   }
 }
 
@@ -1185,7 +1185,7 @@
   DCHECK(loader);
   // TODO(yoav): Convert CHECK to DCHECK if no crash reports come in.
   CHECK(m_loaders.contains(loader));
-  m_nonBlockingLoaders.add(loader);
+  m_nonBlockingLoaders.insert(loader);
   m_loaders.remove(loader);
 }
 
@@ -1217,9 +1217,9 @@
 
   ResourceLoader* loader = ResourceLoader::create(this, resource);
   if (resource->shouldBlockLoadEvent())
-    m_loaders.add(loader);
+    m_loaders.insert(loader);
   else
-    m_nonBlockingLoaders.add(loader);
+    m_nonBlockingLoaders.insert(loader);
 
   storePerformanceTimingInitiatorInformation(resource);
   resource->setFetcherSecurityOrigin(sourceOrigin);
diff --git a/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.cpp b/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.cpp
index 0375fbdc..439779d0 100644
--- a/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.cpp
+++ b/third_party/WebKit/Source/platform/mediastream/MediaStreamSource.cpp
@@ -69,13 +69,13 @@
 }
 
 void MediaStreamSource::addObserver(MediaStreamSource::Observer* observer) {
-  m_observers.add(observer);
+  m_observers.insert(observer);
 }
 
 void MediaStreamSource::addAudioConsumer(AudioDestinationConsumer* consumer) {
   ASSERT(m_requiresConsumer);
   MutexLocker locker(m_audioConsumersLock);
-  m_audioConsumers.add(consumer);
+  m_audioConsumers.insert(consumer);
 }
 
 bool MediaStreamSource::removeAudioConsumer(
diff --git a/third_party/WebKit/Source/platform/network/HTTPParsers.cpp b/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
index 3ca4b69..7ed28d65 100644
--- a/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
+++ b/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
@@ -764,7 +764,7 @@
   Vector<String> results;
   headerValue.split(",", results);
   for (auto& value : results)
-    headerSet.add(value.stripWhiteSpace(isWhitespace));
+    headerSet.insert(value.stripWhiteSpace(isWhitespace));
 }
 
 bool parseSuboriginHeader(const String& header,
diff --git a/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp b/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp
index 8e251f4..2ce08eaa 100644
--- a/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp
@@ -47,13 +47,13 @@
         fetchAPISchemes({"http", "https"}),
         allowedInReferrerSchemes({"http", "https"}) {
     for (auto& scheme : url::GetLocalSchemes())
-      localSchemes.add(scheme.c_str());
+      localSchemes.insert(scheme.c_str());
     for (auto& scheme : url::GetSecureSchemes())
-      secureSchemes.add(scheme.c_str());
+      secureSchemes.insert(scheme.c_str());
     for (auto& scheme : url::GetNoAccessSchemes())
-      schemesWithUniqueOrigins.add(scheme.c_str());
+      schemesWithUniqueOrigins.insert(scheme.c_str());
     for (auto& scheme : url::GetCORSEnabledSchemes())
-      CORSEnabledSchemes.add(scheme.c_str());
+      CORSEnabledSchemes.insert(scheme.c_str());
   }
   ~URLSchemesRegistry() = default;
 
@@ -104,7 +104,7 @@
 
 void SchemeRegistry::registerURLSchemeAsLocal(const String& scheme) {
   DCHECK_EQ(scheme, scheme.lower());
-  getMutableURLSchemesRegistry().localSchemes.add(scheme);
+  getMutableURLSchemesRegistry().localSchemes.insert(scheme);
 }
 
 bool SchemeRegistry::shouldTreatURLSchemeAsLocal(const String& scheme) {
@@ -116,7 +116,7 @@
 
 void SchemeRegistry::registerURLSchemeAsNoAccess(const String& scheme) {
   DCHECK_EQ(scheme, scheme.lower());
-  getMutableURLSchemesRegistry().schemesWithUniqueOrigins.add(scheme);
+  getMutableURLSchemesRegistry().schemesWithUniqueOrigins.insert(scheme);
 }
 
 bool SchemeRegistry::shouldTreatURLSchemeAsNoAccess(const String& scheme) {
@@ -128,7 +128,7 @@
 
 void SchemeRegistry::registerURLSchemeAsDisplayIsolated(const String& scheme) {
   DCHECK_EQ(scheme, scheme.lower());
-  getMutableURLSchemesRegistry().displayIsolatedURLSchemes.add(scheme);
+  getMutableURLSchemesRegistry().displayIsolatedURLSchemes.insert(scheme);
 }
 
 bool SchemeRegistry::shouldTreatURLSchemeAsDisplayIsolated(
@@ -147,7 +147,7 @@
 
 void SchemeRegistry::registerURLSchemeAsSecure(const String& scheme) {
   DCHECK_EQ(scheme, scheme.lower());
-  getMutableURLSchemesRegistry().secureSchemes.add(scheme);
+  getMutableURLSchemesRegistry().secureSchemes.insert(scheme);
 }
 
 bool SchemeRegistry::shouldTreatURLSchemeAsSecure(const String& scheme) {
@@ -159,7 +159,7 @@
 
 void SchemeRegistry::registerURLSchemeAsEmptyDocument(const String& scheme) {
   DCHECK_EQ(scheme, scheme.lower());
-  getMutableURLSchemesRegistry().emptyDocumentSchemes.add(scheme);
+  getMutableURLSchemesRegistry().emptyDocumentSchemes.insert(scheme);
 }
 
 bool SchemeRegistry::shouldLoadURLSchemeAsEmptyDocument(const String& scheme) {
@@ -177,7 +177,7 @@
     return;
 
   if (forbidden) {
-    getMutableURLSchemesRegistry().schemesForbiddenFromDomainRelaxation.add(
+    getMutableURLSchemesRegistry().schemesForbiddenFromDomainRelaxation.insert(
         scheme);
   } else {
     getMutableURLSchemesRegistry().schemesForbiddenFromDomainRelaxation.remove(
@@ -202,7 +202,8 @@
 void SchemeRegistry::registerURLSchemeAsNotAllowingJavascriptURLs(
     const String& scheme) {
   DCHECK_EQ(scheme, scheme.lower());
-  getMutableURLSchemesRegistry().notAllowingJavascriptURLsSchemes.add(scheme);
+  getMutableURLSchemesRegistry().notAllowingJavascriptURLsSchemes.insert(
+      scheme);
 }
 
 bool SchemeRegistry::shouldTreatURLSchemeAsNotAllowingJavascriptURLs(
@@ -216,7 +217,7 @@
 
 void SchemeRegistry::registerURLSchemeAsCORSEnabled(const String& scheme) {
   DCHECK_EQ(scheme, scheme.lower());
-  getMutableURLSchemesRegistry().CORSEnabledSchemes.add(scheme);
+  getMutableURLSchemesRegistry().CORSEnabledSchemes.insert(scheme);
 }
 
 bool SchemeRegistry::shouldTreatURLSchemeAsCORSEnabled(const String& scheme) {
@@ -259,7 +260,7 @@
 void SchemeRegistry::registerURLSchemeAsAllowingServiceWorkers(
     const String& scheme) {
   DCHECK_EQ(scheme, scheme.lower());
-  getMutableURLSchemesRegistry().serviceWorkerSchemes.add(scheme);
+  getMutableURLSchemesRegistry().serviceWorkerSchemes.insert(scheme);
 }
 
 bool SchemeRegistry::shouldTreatURLSchemeAsAllowingServiceWorkers(
@@ -273,7 +274,7 @@
 void SchemeRegistry::registerURLSchemeAsSupportingFetchAPI(
     const String& scheme) {
   DCHECK_EQ(scheme, scheme.lower());
-  getMutableURLSchemesRegistry().fetchAPISchemes.add(scheme);
+  getMutableURLSchemesRegistry().fetchAPISchemes.insert(scheme);
 }
 
 bool SchemeRegistry::shouldTreatURLSchemeAsSupportingFetchAPI(
@@ -287,7 +288,7 @@
 void SchemeRegistry::registerURLSchemeAsFirstPartyWhenTopLevel(
     const String& scheme) {
   DCHECK_EQ(scheme, scheme.lower());
-  getMutableURLSchemesRegistry().firstPartyWhenTopLevelSchemes.add(scheme);
+  getMutableURLSchemesRegistry().firstPartyWhenTopLevelSchemes.insert(scheme);
 }
 
 void SchemeRegistry::removeURLSchemeAsFirstPartyWhenTopLevel(
@@ -307,7 +308,7 @@
 void SchemeRegistry::registerURLSchemeAsAllowedForReferrer(
     const String& scheme) {
   DCHECK_EQ(scheme, scheme.lower());
-  getMutableURLSchemesRegistry().allowedInReferrerSchemes.add(scheme);
+  getMutableURLSchemesRegistry().allowedInReferrerSchemes.insert(scheme);
 }
 
 void SchemeRegistry::removeURLSchemeAsAllowedForReferrer(const String& scheme) {
@@ -354,7 +355,7 @@
 void SchemeRegistry::registerURLSchemeBypassingSecureContextCheck(
     const String& scheme) {
   DCHECK_EQ(scheme, scheme.lower());
-  getMutableURLSchemesRegistry().secureContextBypassingSchemes.add(scheme);
+  getMutableURLSchemesRegistry().secureContextBypassingSchemes.insert(scheme);
 }
 
 bool SchemeRegistry::schemeShouldBypassSecureContextCheck(
diff --git a/third_party/WebKit/Source/platform/weborigin/SecurityPolicy.cpp b/third_party/WebKit/Source/platform/weborigin/SecurityPolicy.cpp
index afb296a..e7a5f51 100644
--- a/third_party/WebKit/Source/platform/weborigin/SecurityPolicy.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/SecurityPolicy.cpp
@@ -199,7 +199,7 @@
 #endif
   if (origin->isUnique())
     return;
-  trustworthyOriginSet().add(origin->toRawString());
+  trustworthyOriginSet().insert(origin->toRawString());
 }
 
 bool SecurityPolicy::isOriginWhiteListedTrustworthy(
diff --git a/third_party/WebKit/Source/web/CompositorMutatorImpl.cpp b/third_party/WebKit/Source/web/CompositorMutatorImpl.cpp
index a3a64ea..867cc4b1a 100644
--- a/third_party/WebKit/Source/web/CompositorMutatorImpl.cpp
+++ b/third_party/WebKit/Source/web/CompositorMutatorImpl.cpp
@@ -78,7 +78,7 @@
     CompositorProxyClientImpl* client) {
   TRACE_EVENT0("compositor-worker", "CompositorMutatorImpl::registerClient");
   DCHECK(!m_proxyClients.contains(client));
-  m_proxyClients.add(client);
+  m_proxyClients.insert(client);
   setNeedsMutate();
 }
 
diff --git a/third_party/WebKit/Source/web/CompositorProxyClientImpl.cpp b/third_party/WebKit/Source/web/CompositorProxyClientImpl.cpp
index 07275554..b9c3e9b 100644
--- a/third_party/WebKit/Source/web/CompositorProxyClientImpl.cpp
+++ b/third_party/WebKit/Source/web/CompositorProxyClientImpl.cpp
@@ -109,7 +109,7 @@
 
 void CompositorProxyClientImpl::registerCompositorProxy(
     CompositorProxy* proxy) {
-  m_proxies.add(proxy);
+  m_proxies.insert(proxy);
 }
 
 void CompositorProxyClientImpl::unregisterCompositorProxy(
diff --git a/third_party/WebKit/Source/web/OpenedFrameTracker.cpp b/third_party/WebKit/Source/web/OpenedFrameTracker.cpp
index 1cb1f9c..c01fc7b 100644
--- a/third_party/WebKit/Source/web/OpenedFrameTracker.cpp
+++ b/third_party/WebKit/Source/web/OpenedFrameTracker.cpp
@@ -18,7 +18,7 @@
 }
 
 void OpenedFrameTracker::add(WebFrame* frame) {
-  m_openedFrames.add(frame);
+  m_openedFrames.insert(frame);
 }
 
 void OpenedFrameTracker::remove(WebFrame* frame) {
diff --git a/third_party/WebKit/Source/web/WebAssociatedURLLoaderImpl.cpp b/third_party/WebKit/Source/web/WebAssociatedURLLoaderImpl.cpp
index 655baed..fdc51d5 100644
--- a/third_party/WebKit/Source/web/WebAssociatedURLLoaderImpl.cpp
+++ b/third_party/WebKit/Source/web/WebAssociatedURLLoaderImpl.cpp
@@ -221,7 +221,7 @@
     if (FetchUtils::isForbiddenResponseHeaderName(header.key) ||
         (!isOnAccessControlResponseHeaderWhitelist(header.key) &&
          !exposedHeaders.contains(header.key)))
-      blockedHeaders.add(header.key);
+      blockedHeaders.insert(header.key);
   }
 
   if (blockedHeaders.isEmpty()) {
diff --git a/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
index f4246ad..6d1fe16b 100644
--- a/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
@@ -101,7 +101,7 @@
       m_askedToTerminate(false),
       m_pauseAfterDownloadState(DontPauseAfterDownload),
       m_waitingForDebuggerState(NotWaitingForDebugger) {
-  runningWorkerInstances().add(this);
+  runningWorkerInstances().insert(this);
 }
 
 WebEmbeddedWorkerImpl::~WebEmbeddedWorkerImpl() {
diff --git a/third_party/WebKit/Source/web/WebHistoryItem.cpp b/third_party/WebKit/Source/web/WebHistoryItem.cpp
index 6897417..bdd4bf7 100644
--- a/third_party/WebKit/Source/web/WebHistoryItem.cpp
+++ b/third_party/WebKit/Source/web/WebHistoryItem.cpp
@@ -184,14 +184,14 @@
     for (size_t i = 0; i < formData->elements().size(); ++i) {
       const FormDataElement& element = formData->elements()[i];
       if (element.m_type == FormDataElement::encodedFile)
-        filePaths.add(element.m_filename);
+        filePaths.insert(element.m_filename);
     }
   }
 
   const Vector<String>& referencedFilePaths =
       m_private->getReferencedFilePaths();
   for (size_t i = 0; i < referencedFilePaths.size(); ++i)
-    filePaths.add(referencedFilePaths[i]);
+    filePaths.insert(referencedFilePaths[i]);
 
   Vector<String> results;
   copyToVector(filePaths, results);
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index 293a096..0a5b5e9 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -417,7 +417,7 @@
 
   m_devToolsEmulator = DevToolsEmulator::create(this);
 
-  allInstances().add(this);
+  allInstances().insert(this);
 
   m_pageImportanceSignals.setObserver(client);
   m_resizeViewportAnchor = new ResizeViewportAnchor(*m_page);
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
index 25e59a6bd..cceac88 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -11146,7 +11146,7 @@
   HashSet<AtomicString> names;
   for (Frame* frame = mainFrame->tree().firstChild(); frame;
        frame = frame->tree().traverseNext()) {
-    EXPECT_TRUE(names.add(frame->tree().uniqueName()).isNewEntry);
+    EXPECT_TRUE(names.insert(frame->tree().uniqueName()).isNewEntry);
   }
   EXPECT_EQ(10u, names.size());
 }
diff --git a/third_party/WebKit/Source/wtf/HashSet.h b/third_party/WebKit/Source/wtf/HashSet.h
index 310116a..68a02dd7 100644
--- a/third_party/WebKit/Source/wtf/HashSet.h
+++ b/third_party/WebKit/Source/wtf/HashSet.h
@@ -106,6 +106,8 @@
   // The return value is a pair of an iterator to the new value's location,
   // and a bool that is true if an new entry was added.
   template <typename IncomingValueType>
+  AddResult insert(IncomingValueType&&);
+  template <typename IncomingValueType>
   AddResult add(IncomingValueType&&);
 
   // An alternate version of add() that finds the object by hashing and
@@ -173,7 +175,7 @@
   if (elements.size())
     m_impl.reserveCapacityForSize(elements.size());
   for (const ValueType& element : elements)
-    add(element);
+    insert(element);
 }
 
 template <typename Value,
@@ -251,6 +253,15 @@
 
 template <typename T, typename U, typename V, typename W>
 template <typename IncomingValueType>
+inline typename HashSet<T, U, V, W>::AddResult HashSet<T, U, V, W>::insert(
+    IncomingValueType&& value) {
+  return m_impl.add(std::forward<IncomingValueType>(value));
+}
+
+// TODO(pilgrim) remove this method once all references and subclasses
+// have been migrated to insert() method
+template <typename T, typename U, typename V, typename W>
+template <typename IncomingValueType>
 inline typename HashSet<T, U, V, W>::AddResult HashSet<T, U, V, W>::add(
     IncomingValueType&& value) {
   return m_impl.add(std::forward<IncomingValueType>(value));
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
index 3ef668d..716476b 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
@@ -282,7 +282,7 @@
                 test_expectations.NEEDS_MANUAL_REBASELINE in expectations)
 
     def _test_is_slow(self, test_file):
-        return test_expectations.SLOW in self._expectations.model().get_expectations(test_file)
+        return test_expectations.SLOW in self._expectations.model().get_expectations(test_file) or self._port.is_slow_wpt_test(test_file)
 
     def _needs_servers(self, test_names):
         return any(self._test_requires_lock(test_name) for test_name in test_names)
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py
index 80a92d76..b739d1dc 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py
@@ -762,6 +762,20 @@
             return items['testharness'][path_in_wpt]
         return None
 
+    @staticmethod
+    def _get_extras_from_manifest_item(item):
+        return item[-1]
+
+    def is_slow_wpt_test(self, test_file):
+        match = re.match(r'external/wpt/(.*)', test_file)
+        if not match:
+            return False
+        items = self._manifest_items_for_path(match.group(1))
+        if not items:
+            return False
+        extras = Port._get_extras_from_manifest_item(items[0])
+        return 'timeout' in extras and extras['timeout'] == 'long'
+
     ALL_TEST_TYPES = ['audio', 'harness', 'pixel', 'ref', 'text', 'unknown']
 
     def test_type(self, test_name):
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py
index d7b4232..f995367 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py
@@ -251,13 +251,29 @@
                     'dom/ranges/Range-attributes.html': [
                         ['/dom/ranges/Range-attributes.html', {}]
                     ],
+                    'dom/ranges/Range-attributes-slow.html': [
+                        ['/dom/ranges/Range-attributes.html', {'timeout': 'long'}]
+                    ],
                     'console/console-is-a-namespace.any.js': [
                         ['/console/console-is-a-namespace.any.html', {}],
                         ['/console/console-is-a-namespace.any.worker.html', {}],
                     ],
                 },
                 'manual': {},
-                'reftest': {},
+                'reftest': {
+                    'html/dom/elements/global-attributes/dir_auto-EN-L.html': [
+                        [
+                            '/html/dom/elements/global-attributes/dir_auto-EN-L.html',
+                            [
+                                [
+                                    '/html/dom/elements/global-attributes/dir_auto-EN-L-ref.html',
+                                    '=='
+                                ]
+                            ],
+                            {'timeout': 'long'}
+                        ]
+                    ],
+                },
             }}))
         filesystem.write_text_file(LAYOUT_TEST_DIR + '/external/wpt/dom/ranges/Range-attributes.html', '')
         filesystem.write_text_file(LAYOUT_TEST_DIR + '/external/wpt/console/console-is-a-namespace.any.js', '')
@@ -321,6 +337,16 @@
         # A file in external/wpt_automation.
         self.assertTrue(port.is_test_file(filesystem, LAYOUT_TEST_DIR + '/external/wpt_automation', 'foo.html'))
 
+    def test_is_slow_wpt_test(self):
+        port = self.make_port(with_tests=True)
+        filesystem = port.host.filesystem
+        PortTest._add_manifest_to_mock_file_system(filesystem)
+
+        self.assertFalse(port.is_slow_wpt_test('external/wpt/dom/ranges/Range-attributes.html'))
+        self.assertFalse(port.is_slow_wpt_test('dom/ranges/Range-attributes.html'))
+        self.assertTrue(port.is_slow_wpt_test('external/wpt/dom/ranges/Range-attributes-slow.html'))
+        self.assertTrue(port.is_slow_wpt_test('external/wpt/html/dom/elements/global-attributes/dir_auto-EN-L.html'))
+
     def test_parse_reftest_list(self):
         port = self.make_port(with_tests=True)
         port.host.filesystem.files['bar/reftest.list'] = "\n".join(["== test.html test-ref.html",
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py
deleted file mode 100644
index 4340bf5..0000000
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py
+++ /dev/null
@@ -1,459 +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.
-
-"""Fetches a copy of the latest state of a W3C test repository and commits.
-
-If this script is given the argument --auto-update, it will also:
- 1. Upload a CL.
- 2. Trigger try jobs and wait for them to complete.
- 3. Make any changes that are required for new failing tests.
- 4. Commit the CL.
-
-If this script is given the argument --auto-update, it will also attempt to
-upload a CL, trigger try jobs, and make any changes that are required for
-new failing tests before committing.
-"""
-
-import argparse
-import json
-import logging
-import re
-
-from webkitpy.common.net.git_cl import GitCL
-from webkitpy.common.webkit_finder import WebKitFinder
-from webkitpy.layout_tests.models.test_expectations import TestExpectations, TestExpectationParser
-from webkitpy.w3c.common import WPT_REPO_URL, CSS_REPO_URL, WPT_DEST_NAME, CSS_DEST_NAME
-from webkitpy.w3c.directory_owners_extractor import DirectoryOwnersExtractor
-from webkitpy.w3c.test_importer import TestImporter
-from webkitpy.w3c.update_w3c_test_expectations import W3CExpectationsLineAdder
-
-
-# Settings for how often to check try job results and how long to wait.
-POLL_DELAY_SECONDS = 2 * 60
-TIMEOUT_SECONDS = 180 * 60
-
-_log = logging.getLogger(__file__)
-
-
-class DepsUpdater(object):
-
-    def __init__(self, host):
-        self.host = host
-        self.executive = host.executive
-        self.fs = host.filesystem
-        self.finder = WebKitFinder(self.fs)
-        self.verbose = False
-        self.git_cl = None
-
-    def main(self, argv=None):
-        options = self.parse_args(argv)
-        self.verbose = options.verbose
-        log_level = logging.DEBUG if self.verbose else logging.INFO
-        logging.basicConfig(level=log_level, format='%(message)s')
-
-        if not self.checkout_is_okay(options.allow_local_commits):
-            return 1
-
-        self.git_cl = GitCL(self.host, auth_refresh_token_json=options.auth_refresh_token_json)
-
-        _log.info('Noting the current Chromium commit.')
-        _, show_ref_output = self.run(['git', 'show-ref', 'HEAD'])
-        chromium_commit = show_ref_output.split()[0]
-
-        if options.target == 'wpt':
-            import_commit = self.update(WPT_DEST_NAME, WPT_REPO_URL, options.keep_w3c_repos_around, options.revision)
-            self._copy_resources()
-        elif options.target == 'css':
-            import_commit = self.update(CSS_DEST_NAME, CSS_REPO_URL, options.keep_w3c_repos_around, options.revision)
-        else:
-            raise AssertionError("Unsupported target %s" % options.target)
-
-        has_changes = self._has_changes()
-        if not has_changes:
-            _log.info('Done: no changes to import.')
-            return 0
-
-        commit_message = self._commit_message(chromium_commit, import_commit)
-        self._commit_changes(commit_message)
-        _log.info('Done: changes imported and committed.')
-
-        if options.auto_update:
-            commit_successful = self.do_auto_update()
-            if not commit_successful:
-                return 1
-        return 0
-
-    def parse_args(self, argv):
-        parser = argparse.ArgumentParser()
-        parser.description = __doc__
-        parser.add_argument('-v', '--verbose', action='store_true',
-                            help='log what we are doing')
-        parser.add_argument('--allow-local-commits', action='store_true',
-                            help='allow script to run even if we have local commits')
-        parser.add_argument('--keep-w3c-repos-around', action='store_true',
-                            help='leave the w3c repos around that were imported previously.')
-        parser.add_argument('-r', dest='revision', action='store',
-                            help='Target revision.')
-        parser.add_argument('target', choices=['css', 'wpt'],
-                            help='Target repository.  "css" for csswg-test, "wpt" for web-platform-tests.')
-        parser.add_argument('--auto-update', action='store_true',
-                            help='uploads CL and initiates commit queue.')
-        parser.add_argument('--auth-refresh-token-json',
-                            help='Rietveld auth refresh JSON token.')
-        return parser.parse_args(argv)
-
-    def checkout_is_okay(self, allow_local_commits):
-        git_diff_retcode, _ = self.run(['git', 'diff', '--quiet', 'HEAD'], exit_on_failure=False)
-        if git_diff_retcode:
-            _log.warning('Checkout is dirty; aborting.')
-            return False
-
-        local_commits = self.run(['git', 'log', '--oneline', 'origin/master..HEAD'])[1]
-        if local_commits and not allow_local_commits:
-            _log.warning('Checkout has local commits; aborting. Use --allow-local-commits to allow this.')
-            return False
-
-        if self.fs.exists(self.path_from_webkit_base(WPT_DEST_NAME)):
-            _log.warning('WebKit/%s exists; aborting.', WPT_DEST_NAME)
-            return False
-
-        if self.fs.exists(self.path_from_webkit_base(CSS_DEST_NAME)):
-            _log.warning('WebKit/%s repo exists; aborting.', CSS_DEST_NAME)
-            return False
-
-        return True
-
-    def _copy_resources(self):
-        """Copies resources from wpt to LayoutTests/resources.
-
-        We copy idlharness.js and testharness.js in wpt to LayoutTests/resources
-        in order to use them in non-imported tests.
-
-        If this method is changed, the lists of files expected to be identical
-        in LayoutTests/PRESUBMIT.py should also be changed.
-        """
-        resources_to_copy_from_wpt = [
-            ('idlharness.js', 'resources'),
-            ('testharness.js', 'resources'),
-        ]
-        for filename, wpt_subdir in resources_to_copy_from_wpt:
-            source = self.path_from_webkit_base('LayoutTests', 'external', WPT_DEST_NAME, wpt_subdir, filename)
-            destination = self.path_from_webkit_base('LayoutTests', 'resources', filename)
-            self.copyfile(source, destination)
-            self.run(['git', 'add', destination])
-
-    def _generate_manifest(self, dest_path):
-        """Generates MANIFEST.json for imported tests.
-
-        Args:
-            dest_path: Path to the destination WPT directory.
-
-        Runs the (newly-updated) manifest command if it's found, and then
-        stages the generated MANIFEST.json in the git index, ready to commit.
-        """
-        manifest_command = self.finder.path_from_webkit_base('Tools', 'Scripts', 'webkitpy', 'thirdparty', 'wpt', 'wpt', 'manifest')
-        if 'css' in dest_path:
-            # Do nothing for csswg-test.
-            return
-        _log.info('Generating MANIFEST.json')
-        self.run([manifest_command, '--work', '--tests-root', dest_path])
-        self.run(['git', 'add', self.fs.join(dest_path, 'MANIFEST.json')])
-
-    def update(self, dest_dir_name, url, keep_w3c_repos_around, revision):
-        """Updates an imported repository.
-
-        Args:
-            dest_dir_name: The destination directory name.
-            url: URL of the git repository.
-            revision: Commit hash or None.
-
-        Returns:
-            A string for the commit description "<destination>@<commitish>".
-        """
-        temp_repo_path = self.path_from_webkit_base(dest_dir_name)
-        _log.info('Cloning %s into %s.', url, temp_repo_path)
-        self.run(['git', 'clone', url, temp_repo_path])
-
-        if revision is not None:
-            _log.info('Checking out %s', revision)
-            self.run(['git', 'checkout', revision], cwd=temp_repo_path)
-
-        self.run(['git', 'submodule', 'update', '--init', '--recursive'], cwd=temp_repo_path)
-
-        _log.info('Noting the revision we are importing.')
-        _, show_ref_output = self.run(['git', 'show-ref', 'origin/master'], cwd=temp_repo_path)
-        master_commitish = show_ref_output.split()[0]
-
-        _log.info('Cleaning out tests from LayoutTests/external/%s.', dest_dir_name)
-        dest_path = self.path_from_webkit_base('LayoutTests', 'external', dest_dir_name)
-        is_not_baseline_filter = lambda fs, dirname, basename: not self.is_baseline(basename)
-        files_to_delete = self.fs.files_under(dest_path, file_filter=is_not_baseline_filter)
-        for subpath in files_to_delete:
-            self.remove('LayoutTests', 'external', subpath)
-
-        _log.info('Importing the tests.')
-        test_importer = TestImporter(self.host, temp_repo_path)
-        test_importer.do_import()
-
-        self.run(['git', 'add', '--all', 'LayoutTests/external/%s' % dest_dir_name])
-
-        _log.info('Deleting any orphaned baselines.')
-
-        is_baseline_filter = lambda fs, dirname, basename: self.is_baseline(basename)
-        previous_baselines = self.fs.files_under(dest_path, file_filter=is_baseline_filter)
-
-        for subpath in previous_baselines:
-            full_path = self.fs.join(dest_path, subpath)
-            if self.fs.glob(full_path.replace('-expected.txt', '*')) == [full_path]:
-                self.fs.remove(full_path)
-
-        self._generate_manifest(dest_path)
-
-        if not keep_w3c_repos_around:
-            _log.info('Deleting temp repo directory %s.', temp_repo_path)
-            self.rmtree(temp_repo_path)
-
-        _log.info('Updating TestExpectations for any removed or renamed tests.')
-        self.update_all_test_expectations_files(self._list_deleted_tests(), self._list_renamed_tests())
-
-        return '%s@%s' % (dest_dir_name, master_commitish)
-
-    def _commit_changes(self, commit_message):
-        _log.info('Committing changes.')
-        self.run(['git', 'commit', '--all', '-F', '-'], stdin=commit_message)
-
-    def _has_changes(self):
-        return_code, _ = self.run(['git', 'diff', '--quiet', 'HEAD'], exit_on_failure=False)
-        return return_code == 1
-
-    def _commit_message(self, chromium_commit, import_commit):
-        return ('Import %s\n\n'
-                'Using wpt-import in Chromium %s.\n\n'
-                'NOEXPORT=true' %
-                (import_commit, chromium_commit))
-
-    @staticmethod
-    def is_baseline(basename):
-        # TODO(qyearsley): Find a better, centralized place for this.
-        return basename.endswith('-expected.txt')
-
-    def run(self, cmd, exit_on_failure=True, cwd=None, stdin=''):
-        _log.debug('Running command: %s', ' '.join(cmd))
-
-        cwd = cwd or self.finder.webkit_base()
-        proc = self.executive.popen(cmd, stdout=self.executive.PIPE, stderr=self.executive.PIPE, stdin=self.executive.PIPE, cwd=cwd)
-        out, err = proc.communicate(stdin)
-        if proc.returncode or self.verbose:
-            _log.info('# ret> %d', proc.returncode)
-            if out:
-                for line in out.splitlines():
-                    _log.info('# out> %s', line)
-            if err:
-                for line in err.splitlines():
-                    _log.info('# err> %s', line)
-        if exit_on_failure and proc.returncode:
-            self.host.exit(proc.returncode)
-        return proc.returncode, out
-
-    def check_run(self, command):
-        return_code, out = self.run(command)
-        if return_code:
-            raise Exception('%s failed with exit code %d.' % ' '.join(command), return_code)
-        return out
-
-    def copyfile(self, source, destination):
-        _log.debug('cp %s %s', source, destination)
-        self.fs.copyfile(source, destination)
-
-    def remove(self, *comps):
-        dest = self.path_from_webkit_base(*comps)
-        _log.debug('rm %s', dest)
-        self.fs.remove(dest)
-
-    def rmtree(self, *comps):
-        dest = self.path_from_webkit_base(*comps)
-        _log.debug('rm -fr %s', dest)
-        self.fs.rmtree(dest)
-
-    def path_from_webkit_base(self, *comps):
-        return self.finder.path_from_webkit_base(*comps)
-
-    def do_auto_update(self):
-        """Attempts to upload a CL, make any required adjustments, and commit.
-
-        This function assumes that the imported repo has already been updated,
-        and that change has been committed. There may be newly-failing tests,
-        so before being able to commit these new changes, we may need to update
-        TestExpectations or download new baselines.
-
-        Returns:
-            True if successfully committed, False otherwise.
-        """
-        self._upload_cl()
-        _log.info('Issue: %s', self.git_cl.run(['issue']).strip())
-
-        # First, try on Blink try bots in order to get any new baselines.
-        _log.info('Triggering try jobs.')
-        for try_bot in self.host.builders.all_try_builder_names():
-            self.git_cl.run(['try', '-b', try_bot])
-        try_results = self.git_cl.wait_for_try_jobs(
-            poll_delay_seconds=POLL_DELAY_SECONDS, timeout_seconds=TIMEOUT_SECONDS)
-
-        if not try_results:
-            self.git_cl.run(['set-close'])
-            return False
-
-        if try_results and self.git_cl.has_failing_try_results(try_results):
-            self.fetch_new_expectations_and_baselines()
-
-        # Wait for CQ try jobs to finish. If there are failures, then abort.
-        self.git_cl.run(['set-commit', '--rietveld'])
-        try_results = self.git_cl.wait_for_try_jobs(
-            poll_delay_seconds=POLL_DELAY_SECONDS, timeout_seconds=TIMEOUT_SECONDS)
-
-        if not try_results:
-            self.git_cl.run(['set-close'])
-            return False
-
-        if self.git_cl.has_failing_try_results(try_results):
-            _log.info('CQ failed; aborting.')
-            self.git_cl.run(['set-close'])
-            return False
-
-        _log.info('Update completed.')
-        return True
-
-    def _upload_cl(self):
-        _log.info('Uploading change list.')
-        cc_list = self.get_directory_owners()
-        description = self._cl_description()
-        self.git_cl.run([
-            'upload',
-            '-f',
-            '--rietveld',
-            '-m',
-            description,
-        ] + ['--cc=' + email for email in cc_list])
-
-    def get_directory_owners(self):
-        """Returns a list of email addresses of owners of changed tests."""
-        _log.info('Gathering directory owners emails to CC.')
-        changed_files = self.host.cwd().changed_files()
-        extractor = DirectoryOwnersExtractor(self.fs)
-        extractor.read_owner_map()
-        return extractor.list_owners(changed_files)
-
-    def _cl_description(self):
-        description = self.check_run(['git', 'log', '-1', '--format=%B'])
-        build_link = self._build_link()
-        if build_link:
-            description += 'Build: %s\n\n' % build_link
-        description += 'TBR=qyearsley@chromium.org\n'
-        # Move any NOEXPORT tag to the end of the description.
-        description = description.replace('NOEXPORT=true', '')
-        description = description.replace('\n\n\n\n', '\n\n')
-        description += 'NOEXPORT=true'
-        return description
-
-    def _build_link(self):
-        """Returns a link to a job, if running on buildbot."""
-        master_name = self.host.environ.get('BUILDBOT_MASTERNAME')
-        builder_name = self.host.environ.get('BUILDBOT_BUILDERNAME')
-        build_number = self.host.environ.get('BUILDBOT_BUILDNUMBER')
-        if not (master_name and builder_name and build_number):
-            return None
-        return 'https://build.chromium.org/p/%s/builders/%s/builds/%s' % (master_name, builder_name, build_number)
-
-    @staticmethod
-    def parse_directory_owners(decoded_data_file):
-        directory_dict = {}
-        for dict_set in decoded_data_file:
-            if dict_set['notification-email']:
-                directory_dict[dict_set['directory']] = dict_set['notification-email']
-        return directory_dict
-
-    def generate_email_list(self, changed_files, directory_to_owner):
-        """Returns a list of email addresses based on the given file list and
-        directory-to-owner mapping.
-
-        Args:
-            changed_files: A list of file paths relative to the repository root.
-            directory_to_owner: A dict mapping layout test directories to emails.
-
-        Returns:
-            A list of the email addresses to be notified for the current import.
-        """
-        email_addresses = set()
-        for file_path in changed_files:
-            test_path = self.finder.layout_test_name(file_path)
-            if test_path is None:
-                continue
-            test_dir = self.fs.dirname(test_path)
-            if test_dir in directory_to_owner:
-                address = directory_to_owner[test_dir]
-                if not re.match(r'\S+@\S+', address):
-                    _log.warning('%s appears not be an email address, skipping.', address)
-                    continue
-                email_addresses.add(address)
-        return sorted(email_addresses)
-
-    def fetch_new_expectations_and_baselines(self):
-        """Adds new expectations and downloads baselines based on try job results, then commits and uploads the change."""
-        _log.info('Adding test expectations lines to LayoutTests/TestExpectations.')
-        line_adder = W3CExpectationsLineAdder(self.host)
-        line_adder.run()
-        message = 'Update test expectations and baselines.'
-        self.check_run(['git', 'commit', '-a', '-m', message])
-        self.git_cl.run(['upload', '-m', message, '--rietveld'])
-
-    def update_all_test_expectations_files(self, deleted_tests, renamed_tests):
-        """Updates all test expectations files for tests that have been deleted or renamed."""
-        port = self.host.port_factory.get()
-        for path, file_contents in port.all_expectations_dict().iteritems():
-            parser = TestExpectationParser(port, all_tests=None, is_lint_mode=False)
-            expectation_lines = parser.parse(path, file_contents)
-            self._update_single_test_expectations_file(path, expectation_lines, deleted_tests, renamed_tests)
-
-    def _update_single_test_expectations_file(self, path, expectation_lines, deleted_tests, renamed_tests):
-        """Updates single test expectations file."""
-        # FIXME: This won't work for removed or renamed directories with test expectations
-        # that are directories rather than individual tests.
-        new_lines = []
-        changed_lines = []
-        for expectation_line in expectation_lines:
-            if expectation_line.name in deleted_tests:
-                continue
-            if expectation_line.name in renamed_tests:
-                expectation_line.name = renamed_tests[expectation_line.name]
-                # Upon parsing the file, a "path does not exist" warning is expected
-                # to be there for tests that have been renamed, and if there are warnings,
-                # then the original string is used. If the warnings are reset, then the
-                # expectation line is re-serialized when output.
-                expectation_line.warnings = []
-                changed_lines.append(expectation_line)
-            new_lines.append(expectation_line)
-        new_file_contents = TestExpectations.list_to_string(new_lines, reconstitute_only_these=changed_lines)
-        self.host.filesystem.write_text_file(path, new_file_contents)
-
-    def _list_deleted_tests(self):
-        """Returns a list of layout tests that have been deleted."""
-        out = self.check_run(['git', 'diff', 'origin/master', '-M100%', '--diff-filter=D', '--name-only'])
-        deleted_tests = []
-        for line in out.splitlines():
-            test = self.finder.layout_test_name(line)
-            if test:
-                deleted_tests.append(test)
-        return deleted_tests
-
-    def _list_renamed_tests(self):
-        """Returns a dict mapping source to dest name for layout tests that have been renamed."""
-        out = self.check_run(['git', 'diff', 'origin/master', '-M100%', '--diff-filter=R', '--name-status'])
-        renamed_tests = {}
-        for line in out.splitlines():
-            _, source_path, dest_path = line.split()
-            source_test = self.finder.layout_test_name(source_path)
-            dest_test = self.finder.layout_test_name(dest_path)
-            if source_test and dest_test:
-                renamed_tests[source_test] = dest_test
-        return renamed_tests
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py
deleted file mode 100644
index 46add4a2..0000000
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py
+++ /dev/null
@@ -1,151 +0,0 @@
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import unittest
-
-from webkitpy.common.host_mock import MockHost
-from webkitpy.common.system.executive_mock import MockExecutive
-from webkitpy.w3c.deps_updater import DepsUpdater
-
-
-class DepsUpdaterTest(unittest.TestCase):
-
-    def test_generate_email_list(self):
-        updater = DepsUpdater(MockHost())
-        changed_files = [
-            'third_party/WebKit/LayoutTests/foo/bar/file.html',
-            'third_party/WebKit/LayoutTests/foo/bar/otherfile.html',
-            'third_party/WebKit/LayoutTests/foo/baz/files.html',
-            'some/non-test.file',
-        ]
-        directory_to_owner = {
-            'foo/bar': 'someone@gmail.com',
-            'foo/baz': 'not an email address',
-            'foo/bat': 'noone@gmail.com',
-        }
-        self.assertEqual(
-            updater.generate_email_list(changed_files, directory_to_owner),
-            ['someone@gmail.com'])
-
-    def test_parse_directory_owners(self):
-        updater = DepsUpdater(MockHost())
-        data_file = [
-            {'notification-email': 'charizard@gmail.com', 'directory': 'foo/bar'},
-            {'notification-email': 'blastoise@gmail.com', 'directory': 'foo/baz'},
-            {'notification-email': '', 'directory': 'gol/bat'},
-        ]
-        self.assertEqual(
-            updater.parse_directory_owners(data_file),
-            {'foo/bar': 'charizard@gmail.com', 'foo/baz': 'blastoise@gmail.com'})
-
-    def test_update_test_expectations(self):
-        host = MockHost()
-        host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/TestExpectations'] = (
-            'Bug(test) some/test/a.html [ Failure ]\n'
-            'Bug(test) some/test/b.html [ Failure ]\n'
-            'Bug(test) some/test/c.html [ Failure ]\n')
-        host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/VirtualTestSuites'] = '[]'
-        host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/new/a.html'] = ''
-        host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/new/b.html'] = ''
-        updater = DepsUpdater(host)
-        deleted_tests = ['some/test/b.html']
-        renamed_test_pairs = {
-            'some/test/a.html': 'new/a.html',
-            'some/test/c.html': 'new/c.html',
-        }
-        updater.update_all_test_expectations_files(deleted_tests, renamed_test_pairs)
-        self.assertMultiLineEqual(
-            host.filesystem.read_text_file('/mock-checkout/third_party/WebKit/LayoutTests/TestExpectations'),
-            ('Bug(test) new/a.html [ Failure ]\n'
-             'Bug(test) new/c.html [ Failure ]\n'))
-
-    # Tests for protected methods - pylint: disable=protected-access
-
-    def test_commit_changes(self):
-        host = MockHost()
-        updater = DepsUpdater(host)
-        updater._has_changes = lambda: True
-        updater._commit_changes('dummy message')
-        self.assertEqual(
-            host.executive.calls,
-            [['git', 'commit', '--all', '-F', '-']])
-
-    def test_commit_message(self):
-        updater = DepsUpdater(MockHost())
-        self.assertEqual(
-            updater._commit_message('aaaa', '1111'),
-            'Import 1111\n\n'
-            'Using wpt-import in Chromium aaaa.\n\n'
-            'NOEXPORT=true')
-
-    def test_cl_description_with_empty_environ(self):
-        host = MockHost()
-        host.executive = MockExecutive(output='Last commit message\n\n')
-        updater = DepsUpdater(host)
-        description = updater._cl_description()
-        self.assertEqual(
-            description,
-            ('Last commit message\n\n'
-             'TBR=qyearsley@chromium.org\n'
-             'NOEXPORT=true'))
-        self.assertEqual(host.executive.calls, [['git', 'log', '-1', '--format=%B']])
-
-    def test_cl_description_with_environ_variables(self):
-        host = MockHost()
-        host.executive = MockExecutive(output='Last commit message\n')
-        updater = DepsUpdater(host)
-        updater.host.environ['BUILDBOT_MASTERNAME'] = 'my.master'
-        updater.host.environ['BUILDBOT_BUILDERNAME'] = 'b'
-        updater.host.environ['BUILDBOT_BUILDNUMBER'] = '123'
-        description = updater._cl_description()
-        self.assertEqual(
-            description,
-            ('Last commit message\n'
-             'Build: https://build.chromium.org/p/my.master/builders/b/builds/123\n\n'
-             'TBR=qyearsley@chromium.org\n'
-             'NOEXPORT=true'))
-        self.assertEqual(host.executive.calls, [['git', 'log', '-1', '--format=%B']])
-
-    def test_cl_description_moves_noexport_tag(self):
-        host = MockHost()
-        host.executive = MockExecutive(output='Summary\n\nNOEXPORT=true\n\n')
-        updater = DepsUpdater(host)
-        description = updater._cl_description()
-        self.assertEqual(
-            description,
-            ('Summary\n\n'
-             'TBR=qyearsley@chromium.org\n'
-             'NOEXPORT=true'))
-
-    def test_generate_manifest_command_not_found(self):
-        # If we're updating csswg-test, then the manifest file won't be found.
-        host = MockHost()
-        host.filesystem.files = {}
-        updater = DepsUpdater(host)
-        updater._generate_manifest(
-            '/mock-checkout/third_party/WebKit/LayoutTests/external/csswg-test')
-        self.assertEqual(host.executive.calls, [])
-
-    def test_generate_manifest_successful_run(self):
-        # This test doesn't test any aspect of the real manifest script, it just
-        # asserts that DepsUpdater._generate_manifest would invoke the script.
-        host = MockHost()
-        updater = DepsUpdater(host)
-        updater._generate_manifest(
-            '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt')
-        self.assertEqual(
-            host.executive.calls,
-            [
-                [
-                    '/mock-checkout/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/manifest',
-                    '--work',
-                    '--tests-root',
-                    '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt'
-                ],
-                [
-                    'git',
-                    'add',
-                    '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt/MANIFEST.json'
-                ]
-            ])
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_copier.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_copier.py
new file mode 100644
index 0000000..1ac7f27
--- /dev/null
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_copier.py
@@ -0,0 +1,356 @@
+# Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above
+#    copyright notice, this list of conditions and the following
+#    disclaimer.
+# 2. 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.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "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 HOLDER 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.
+
+"""Logic for converting and copying files from a W3C repo.
+
+This module is responsible for modifying and copying a subset of the tests from
+a local W3C repository source directory into a destination directory.
+"""
+
+import logging
+import mimetypes
+import os
+import re
+
+from webkitpy.common.webkit_finder import WebKitFinder
+from webkitpy.layout_tests.models.test_expectations import TestExpectationParser
+from webkitpy.w3c.test_parser import TestParser
+from webkitpy.w3c.test_converter import convert_for_webkit
+
+# Maximum length of import path starting from top of source repository.
+# This limit is here because the Windows builders cannot create paths that are
+# longer than the Windows max path length (260). See http://crbug.com/609871.
+MAX_PATH_LENGTH = 140
+
+_log = logging.getLogger(__name__)
+
+
+class TestCopier(object):
+
+    def __init__(self, host, source_repo_path, dest_dir_name='external'):
+        """Initializes variables to prepare for copying and converting files.
+
+        Args:
+            source_repo_path: Path to the local checkout of a WPT
+        """
+        self.host = host
+
+        assert self.host.filesystem.exists(source_repo_path)
+        self.source_repo_path = source_repo_path
+        self.dest_dir_name = dest_dir_name
+
+        self.filesystem = self.host.filesystem
+        self.webkit_finder = WebKitFinder(self.filesystem)
+        self._webkit_root = self.webkit_finder.webkit_base()
+        self.layout_tests_dir = self.webkit_finder.path_from_webkit_base('LayoutTests')
+        self.destination_directory = self.filesystem.normpath(
+            self.filesystem.join(
+                self.layout_tests_dir,
+                dest_dir_name,
+                self.filesystem.basename(self.source_repo_path)))
+        self.import_in_place = (self.source_repo_path == self.destination_directory)
+        self.dir_above_repo = self.filesystem.dirname(self.source_repo_path)
+
+        self.import_list = []
+
+        # This is just a FYI list of CSS properties that still need to be prefixed,
+        # which may be output after importing.
+        self._prefixed_properties = {}
+
+    def do_import(self):
+        _log.info("Importing %s into %s", self.source_repo_path, self.destination_directory)
+        self.find_importable_tests()
+        self.import_tests()
+
+    def find_importable_tests(self):
+        """Walks through the source directory to find what tests should be imported.
+
+        This function sets self.import_list, which contains information about how many
+        tests are being imported, and their source and destination paths.
+        """
+        paths_to_skip = self.find_paths_to_skip()
+
+        for root, dirs, files in self.filesystem.walk(self.source_repo_path):
+            cur_dir = root.replace(self.dir_above_repo + '/', '') + '/'
+            _log.debug('  scanning ' + cur_dir + '...')
+            total_tests = 0
+            reftests = 0
+            jstests = 0
+
+            # Files in 'tools' are not for browser testing, so we skip them.
+            # See: http://testthewebforward.org/docs/test-format-guidelines.html#tools
+            dirs_to_skip = ('.git', 'test-plan', 'tools')
+
+            # We copy all files in 'support', including HTML without metadata.
+            # See: http://testthewebforward.org/docs/test-format-guidelines.html#support-files
+            dirs_to_include = ('resources', 'support')
+
+            if dirs:
+                for name in dirs_to_skip:
+                    if name in dirs:
+                        dirs.remove(name)
+
+                for path in paths_to_skip:
+                    path_base = path.replace(self.dest_dir_name + '/', '')
+                    path_base = path_base.replace(cur_dir, '')
+                    path_full = self.filesystem.join(root, path_base)
+                    if path_base in dirs:
+                        dirs.remove(path_base)
+                        if self.import_in_place:
+                            _log.debug('  pruning %s', path_base)
+                            self.filesystem.rmtree(path_full)
+                        else:
+                            _log.debug('  skipping %s', path_base)
+
+            copy_list = []
+
+            for filename in files:
+                path_full = self.filesystem.join(root, filename)
+                path_base = path_full.replace(self.source_repo_path + '/', '')
+                path_base = self.destination_directory.replace(self.layout_tests_dir + '/', '') + '/' + path_base
+                if path_base in paths_to_skip:
+                    if self.import_in_place:
+                        _log.debug('  pruning %s', path_base)
+                        self.filesystem.remove(path_full)
+                        continue
+                    else:
+                        continue
+                # FIXME: This block should really be a separate function, but the early-continues make that difficult.
+
+                if filename.startswith('.') or filename.endswith('.pl'):
+                    # The w3cs repos may contain perl scripts, which we don't care about.
+                    continue
+                if filename == 'OWNERS' or filename == 'reftest.list':
+                    # These files fail our presubmits.
+                    # See http://crbug.com/584660 and http://crbug.com/582838.
+                    continue
+
+                fullpath = self.filesystem.join(root, filename)
+
+                mimetype = mimetypes.guess_type(fullpath)
+                if ('html' not in str(mimetype[0]) and
+                        'application/xhtml+xml' not in str(mimetype[0]) and
+                        'application/xml' not in str(mimetype[0])):
+                    copy_list.append({'src': fullpath, 'dest': filename})
+                    continue
+
+                if self.filesystem.basename(root) in dirs_to_include:
+                    copy_list.append({'src': fullpath, 'dest': filename})
+                    continue
+
+                test_parser = TestParser(fullpath, self.host)
+                test_info = test_parser.analyze_test()
+                if test_info is None:
+                    copy_list.append({'src': fullpath, 'dest': filename})
+                    continue
+
+                if self.path_too_long(path_full):
+                    _log.warning('%s skipped due to long path. '
+                                 'Max length from repo base %d chars; see http://crbug.com/609871.',
+                                 path_full, MAX_PATH_LENGTH)
+                    continue
+
+                if 'reference' in test_info.keys():
+                    test_basename = self.filesystem.basename(test_info['test'])
+                    # Add the ref file, following WebKit style.
+                    # FIXME: Ideally we'd support reading the metadata
+                    # directly rather than relying on a naming convention.
+                    # Using a naming convention creates duplicate copies of the
+                    # reference files (http://crrev.com/268729).
+                    ref_file = self.filesystem.splitext(test_basename)[0] + '-expected'
+                    # Make sure to use the extension from the *reference*, not
+                    # from the test, because at least flexbox tests use XHTML
+                    # references but HTML tests.
+                    ref_file += self.filesystem.splitext(test_info['reference'])[1]
+
+                    if not self.filesystem.exists(test_info['reference']):
+                        _log.warning('%s skipped because ref file %s was not found.',
+                                     path_full, ref_file)
+                        continue
+
+                    if self.path_too_long(path_full.replace(filename, ref_file)):
+                        _log.warning('%s skipped because path of ref file %s would be too long. '
+                                     'Max length from repo base %d chars; see http://crbug.com/609871.',
+                                     path_full, ref_file, MAX_PATH_LENGTH)
+                        continue
+
+                    reftests += 1
+                    total_tests += 1
+                    copy_list.append({'src': test_info['reference'], 'dest': ref_file,
+                                      'reference_support_info': test_info['reference_support_info']})
+                    copy_list.append({'src': test_info['test'], 'dest': filename})
+
+                elif 'jstest' in test_info.keys():
+                    jstests += 1
+                    total_tests += 1
+                    copy_list.append({'src': fullpath, 'dest': filename, 'is_jstest': True})
+
+            if copy_list:
+                # Only add this directory to the list if there's something to import
+                self.import_list.append({'dirname': root, 'copy_list': copy_list,
+                                         'reftests': reftests, 'jstests': jstests, 'total_tests': total_tests})
+
+    def find_paths_to_skip(self):
+        paths_to_skip = set()
+        port = self.host.port_factory.get()
+        w3c_import_expectations_path = self.webkit_finder.path_from_webkit_base('LayoutTests', 'W3CImportExpectations')
+        w3c_import_expectations = self.filesystem.read_text_file(w3c_import_expectations_path)
+        parser = TestExpectationParser(port, all_tests=(), is_lint_mode=False)
+        expectation_lines = parser.parse(w3c_import_expectations_path, w3c_import_expectations)
+        for line in expectation_lines:
+            if 'SKIP' in line.expectations:
+                if line.specifiers:
+                    _log.warning("W3CImportExpectations:%s should not have any specifiers", line.line_numbers)
+                    continue
+                paths_to_skip.add(line.name)
+        return paths_to_skip
+
+    def import_tests(self):
+        """Reads |self.import_list|, and converts and copies files to their destination."""
+        total_imported_tests = 0
+        total_imported_reftests = 0
+        total_imported_jstests = 0
+
+        for dir_to_copy in self.import_list:
+            total_imported_tests += dir_to_copy['total_tests']
+            total_imported_reftests += dir_to_copy['reftests']
+            total_imported_jstests += dir_to_copy['jstests']
+
+            if not dir_to_copy['copy_list']:
+                continue
+
+            orig_path = dir_to_copy['dirname']
+
+            relative_dir = self.filesystem.relpath(orig_path, self.source_repo_path)
+            dest_dir = self.filesystem.join(self.destination_directory, relative_dir)
+
+            if not self.filesystem.exists(dest_dir):
+                self.filesystem.maybe_make_directory(dest_dir)
+
+            copied_files = []
+
+            for file_to_copy in dir_to_copy['copy_list']:
+                copied_file = self.copy_file(file_to_copy, dest_dir)
+                if copied_file:
+                    copied_files.append(copied_file)
+
+        _log.info('')
+        _log.info('Import complete')
+        _log.info('')
+        _log.info('IMPORTED %d TOTAL TESTS', total_imported_tests)
+        _log.info('Imported %d reftests', total_imported_reftests)
+        _log.info('Imported %d JS tests', total_imported_jstests)
+        _log.info('Imported %d pixel/manual tests', total_imported_tests - total_imported_jstests - total_imported_reftests)
+        _log.info('')
+
+        if self._prefixed_properties:
+            _log.info('Properties needing prefixes (by count):')
+            for prefixed_property in sorted(self._prefixed_properties, key=lambda p: self._prefixed_properties[p]):
+                _log.info('  %s: %s', prefixed_property, self._prefixed_properties[prefixed_property])
+
+    def copy_file(self, file_to_copy, dest_dir):
+        """Converts and copies a file, if it should be copied.
+
+        Args:
+            file_to_copy: A dict in a file copy list constructed by
+                find_importable_tests, which represents one file to copy, including
+                the keys:
+                    "src": Absolute path to the source location of the file.
+                    "destination": File name of the destination file.
+                And possibly also the keys "reference_support_info" or "is_jstest".
+            dest_dir: Path to the directory where the file should be copied.
+
+        Returns:
+            The path to the new file, relative to the Blink root (//third_party/WebKit).
+        """
+        source_path = self.filesystem.normpath(file_to_copy['src'])
+        dest_path = self.filesystem.join(dest_dir, file_to_copy['dest'])
+
+        if self.filesystem.isdir(source_path):
+            _log.error('%s refers to a directory', source_path)
+            return None
+
+        if not self.filesystem.exists(source_path):
+            _log.error('%s not found. Possible error in the test.', source_path)
+            return None
+
+        reference_support_info = file_to_copy.get('reference_support_info') or None
+
+        if not self.filesystem.exists(self.filesystem.dirname(dest_path)):
+            if not self.import_in_place:
+                self.filesystem.maybe_make_directory(self.filesystem.dirname(dest_path))
+
+        relpath = self.filesystem.relpath(dest_path, self.layout_tests_dir)
+        # FIXME: Maybe doing a file diff is in order here for existing files?
+        # In other words, there's no sense in overwriting identical files, but
+        # there's no harm in copying the identical thing.
+        _log.debug('  copying %s', relpath)
+
+        if self.should_try_to_convert(file_to_copy, source_path, dest_dir):
+            converted_file = convert_for_webkit(
+                dest_dir, filename=source_path,
+                reference_support_info=reference_support_info,
+                host=self.host)
+            for prefixed_property in converted_file[0]:
+                self._prefixed_properties.setdefault(prefixed_property, 0)
+                self._prefixed_properties[prefixed_property] += 1
+
+            self.filesystem.write_text_file(dest_path, converted_file[1])
+        else:
+            if not self.import_in_place:
+                self.filesystem.copyfile(source_path, dest_path)
+                if self.filesystem.read_binary_file(source_path)[:2] == '#!':
+                    self.filesystem.make_executable(dest_path)
+
+        return dest_path.replace(self._webkit_root, '')
+
+    @staticmethod
+    def should_try_to_convert(file_to_copy, source_path, dest_dir):
+        """Checks whether we should try to modify the file when importing."""
+        if file_to_copy.get('is_jstest', False):
+            return False
+
+        # Conversion is not necessary for any tests in wpt now; see http://crbug.com/654081.
+        # Note, we want to move away from converting files, see http://crbug.com/663773.
+        if re.search(r'[/\\]external[/\\]wpt[/\\]', dest_dir):
+            return False
+
+        # Only HTML, XHTML and CSS files should be converted.
+        mimetype, _ = mimetypes.guess_type(source_path)
+        return mimetype in ('text/html', 'application/xhtml+xml', 'text/css')
+
+    def path_too_long(self, source_path):
+        """Checks whether a source path is too long to import.
+
+        Args:
+            Absolute path of file to be imported.
+
+        Returns:
+            True if the path is too long to import, False if it's OK.
+        """
+        path_from_repo_base = os.path.relpath(source_path, self.source_repo_path)
+        return len(path_from_repo_base) > MAX_PATH_LENGTH
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_copier_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_copier_unittest.py
new file mode 100644
index 0000000..3967a34
--- /dev/null
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_copier_unittest.py
@@ -0,0 +1,177 @@
+# Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above
+#    copyright notice, this list of conditions and the following
+#    disclaimer.
+# 2. 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.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "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 HOLDER 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.
+
+import unittest
+
+from webkitpy.common.host_mock import MockHost
+from webkitpy.common.system.executive_mock import MockExecutive, ScriptError
+from webkitpy.common.system.filesystem_mock import MockFileSystem
+from webkitpy.w3c.test_copier import TestCopier
+
+
+FAKE_SOURCE_REPO_DIR = '/blink'
+
+FAKE_FILES = {
+    '/mock-checkout/third_party/Webkit/LayoutTests/external/OWNERS': '',
+    '/blink/w3c/dir/has_shebang.txt': '#!',
+    '/blink/w3c/dir/README.txt': '',
+    '/blink/w3c/dir/OWNERS': '',
+    '/blink/w3c/dir/reftest.list': '',
+    '/blink/w3c/dir1/OWNERS': '',
+    '/blink/w3c/dir1/reftest.list': '',
+    '/mock-checkout/third_party/WebKit/LayoutTests/external/README.txt': '',
+    '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectations': '',
+}
+
+
+class TestCopierTest(unittest.TestCase):
+
+    def test_import_dir_with_no_tests(self):
+        host = MockHost()
+        host.executive = MockExecutive(exception=ScriptError('error'))
+        host.filesystem = MockFileSystem(files=FAKE_FILES)
+        copier = TestCopier(host, FAKE_SOURCE_REPO_DIR, 'destination')
+        copier.do_import()  # No exception raised.
+
+    def test_path_too_long_true(self):
+        host = MockHost()
+        host.filesystem = MockFileSystem(files=FAKE_FILES)
+        copier = TestCopier(host, FAKE_SOURCE_REPO_DIR)
+        self.assertTrue(copier.path_too_long(FAKE_SOURCE_REPO_DIR + '/' + ('x' * 150) + '.html'))
+
+    def test_path_too_long_false(self):
+        host = MockHost()
+        host.filesystem = MockFileSystem(files=FAKE_FILES)
+        copier = TestCopier(host, FAKE_SOURCE_REPO_DIR)
+        self.assertFalse(copier.path_too_long(FAKE_SOURCE_REPO_DIR + '/x.html'))
+
+    def test_does_not_import_owner_files(self):
+        host = MockHost()
+        host.filesystem = MockFileSystem(files=FAKE_FILES)
+        copier = TestCopier(host, FAKE_SOURCE_REPO_DIR)
+        copier.find_importable_tests()
+        self.assertEqual(
+            copier.import_list,
+            [
+                {
+                    'copy_list': [
+                        {'dest': 'has_shebang.txt', 'src': '/blink/w3c/dir/has_shebang.txt'},
+                        {'dest': 'README.txt', 'src': '/blink/w3c/dir/README.txt'}
+                    ],
+                    'dirname': '/blink/w3c/dir',
+                    'jstests': 0,
+                    'reftests': 0,
+                    'total_tests': 0,
+                }
+            ])
+
+    def test_does_not_import_reftestlist_file(self):
+        host = MockHost()
+        host.filesystem = MockFileSystem(files=FAKE_FILES)
+        copier = TestCopier(host, FAKE_SOURCE_REPO_DIR)
+        copier.find_importable_tests()
+        self.assertEqual(
+            copier.import_list,
+            [
+                {
+                    'copy_list': [
+                        {'dest': 'has_shebang.txt', 'src': '/blink/w3c/dir/has_shebang.txt'},
+                        {'dest': 'README.txt', 'src': '/blink/w3c/dir/README.txt'}
+                    ],
+                    'dirname': '/blink/w3c/dir',
+                    'jstests': 0,
+                    'reftests': 0,
+                    'total_tests': 0,
+                }
+            ])
+
+    def test_files_with_shebang_are_made_executable(self):
+        host = MockHost()
+        host.filesystem = MockFileSystem(files=FAKE_FILES)
+        copier = TestCopier(host, FAKE_SOURCE_REPO_DIR)
+        copier.do_import()
+        self.assertEqual(
+            host.filesystem.executable_files,
+            set(['/mock-checkout/third_party/WebKit/LayoutTests/external/blink/w3c/dir/has_shebang.txt']))
+
+    def test_ref_test_with_ref_is_copied(self):
+        host = MockHost()
+        host.filesystem = MockFileSystem(files={
+            '/blink/w3c/dir1/my-ref-test.html': '<html><head><link rel="match" href="ref-file.html" />test</head></html>',
+            '/blink/w3c/dir1/ref-file.html': '<html><head>test</head></html>',
+            '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectations': '',
+            '/mock-checkout/third_party/WebKit/Source/core/css/CSSProperties.in': '',
+        })
+        copier = TestCopier(host, FAKE_SOURCE_REPO_DIR)
+        copier.find_importable_tests()
+        self.assertEqual(
+            copier.import_list,
+            [
+                {
+                    'copy_list': [
+                        {'src': '/blink/w3c/dir1/ref-file.html', 'dest': 'ref-file.html'},
+                        {'src': '/blink/w3c/dir1/ref-file.html', 'dest': 'my-ref-test-expected.html', 'reference_support_info': {}},
+                        {'src': '/blink/w3c/dir1/my-ref-test.html', 'dest': 'my-ref-test.html'}
+                    ],
+                    'dirname': '/blink/w3c/dir1',
+                    'jstests': 0,
+                    'reftests': 1,
+                    'total_tests': 1
+                }
+            ])
+
+    def test_ref_test_without_ref_is_skipped(self):
+        host = MockHost()
+        host.filesystem = MockFileSystem(files={
+            '/blink/w3c/dir1/my-ref-test.html': '<html><head><link rel="match" href="not-here.html" /></head></html>',
+            '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectations': '',
+            '/mock-checkout/third_party/WebKit/Source/core/css/CSSProperties.in': '',
+        })
+        copier = TestCopier(host, FAKE_SOURCE_REPO_DIR)
+        copier.find_importable_tests()
+        self.assertEqual(copier.import_list, [])
+
+    def test_should_try_to_convert_positive_cases(self):
+        self.assertTrue(TestCopier.should_try_to_convert({}, 'foo.css', 'LayoutTests/external/csswg-test/x'))
+        self.assertTrue(TestCopier.should_try_to_convert({}, 'foo.htm', 'LayoutTests/external/csswg-test/x'))
+        self.assertTrue(TestCopier.should_try_to_convert({}, 'foo.html', 'LayoutTests/external/csswg-test/x'))
+        self.assertTrue(TestCopier.should_try_to_convert({}, 'foo.xht', 'LayoutTests/external/csswg-test/x'))
+        self.assertTrue(TestCopier.should_try_to_convert({}, 'foo.xhtml', 'LayoutTests/external/csswg-test/x'))
+
+    def test_should_not_try_to_convert_js_test(self):
+        self.assertFalse(TestCopier.should_try_to_convert({'is_jstest': True}, 'foo.html', 'LayoutTests/external/csswg-test/x'))
+
+    def test_should_not_try_to_convert_test_in_wpt(self):
+        self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.html', 'LayoutTests/external/wpt/foo'))
+
+    def test_should_not_try_to_convert_other_file_types(self):
+        self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.bar', 'LayoutTests/external/csswg-test/x'))
+        self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.js', 'LayoutTests/external/csswg-test/x'))
+        self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.md', 'LayoutTests/external/csswg-test/x'))
+        self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.png', 'LayoutTests/external/csswg-test/x'))
+        self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.svg', 'LayoutTests/external/csswg-test/x'))
+        self.assertFalse(TestCopier.should_try_to_convert({}, 'foo.svgz', 'LayoutTests/external/csswg-test/x'))
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
index 3943fe8..1011896 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
@@ -1,356 +1,460 @@
-# Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above
-#    copyright notice, this list of conditions and the following
-#    disclaimer.
-# 2. 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.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "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 HOLDER 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.
+# 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.
 
-"""Logic for converting and copying files from a W3C repo.
+"""Fetches a copy of the latest state of a W3C test repository and commits.
 
-This module is responsible for modifying and copying a subset of the tests from
-a local W3C repository source directory into a destination directory.
+If this script is given the argument --auto-update, it will also:
+ 1. Upload a CL.
+ 2. Trigger try jobs and wait for them to complete.
+ 3. Make any changes that are required for new failing tests.
+ 4. Commit the CL.
+
+If this script is given the argument --auto-update, it will also attempt to
+upload a CL, trigger try jobs, and make any changes that are required for
+new failing tests before committing.
 """
 
+import argparse
+import json
 import logging
-import mimetypes
-import os
 import re
 
+from webkitpy.common.net.git_cl import GitCL
 from webkitpy.common.webkit_finder import WebKitFinder
-from webkitpy.layout_tests.models.test_expectations import TestExpectationParser
-from webkitpy.w3c.test_parser import TestParser
-from webkitpy.w3c.test_converter import convert_for_webkit
+from webkitpy.layout_tests.models.test_expectations import TestExpectations, TestExpectationParser
+from webkitpy.w3c.update_w3c_test_expectations import W3CExpectationsLineAdder
+from webkitpy.w3c.test_copier import TestCopier
+from webkitpy.w3c.common import WPT_REPO_URL, CSS_REPO_URL, WPT_DEST_NAME, CSS_DEST_NAME
 
-# Maximum length of import path starting from top of source repository.
-# This limit is here because the Windows builders cannot create paths that are
-# longer than the Windows max path length (260). See http://crbug.com/609871.
-MAX_PATH_LENGTH = 140
+# Settings for how often to check try job results and how long to wait.
+POLL_DELAY_SECONDS = 2 * 60
+TIMEOUT_SECONDS = 180 * 60
 
-_log = logging.getLogger(__name__)
+_log = logging.getLogger(__file__)
 
 
 class TestImporter(object):
 
-    def __init__(self, host, source_repo_path, dest_dir_name='external'):
-        """Initializes variables to prepare for copying and converting files.
-
-        Args:
-            source_repo_path: Path to the local checkout of a WPT
-        """
+    def __init__(self, host):
         self.host = host
+        self.executive = host.executive
+        self.fs = host.filesystem
+        self.finder = WebKitFinder(self.fs)
+        self.verbose = False
+        self.git_cl = None
 
-        assert self.host.filesystem.exists(source_repo_path)
-        self.source_repo_path = source_repo_path
-        self.dest_dir_name = dest_dir_name
+    def main(self, argv=None):
+        options = self.parse_args(argv)
+        self.verbose = options.verbose
+        log_level = logging.DEBUG if self.verbose else logging.INFO
+        logging.basicConfig(level=log_level, format='%(message)s')
 
-        self.filesystem = self.host.filesystem
-        self.webkit_finder = WebKitFinder(self.filesystem)
-        self._webkit_root = self.webkit_finder.webkit_base()
-        self.layout_tests_dir = self.webkit_finder.path_from_webkit_base('LayoutTests')
-        self.destination_directory = self.filesystem.normpath(
-            self.filesystem.join(
-                self.layout_tests_dir,
-                dest_dir_name,
-                self.filesystem.basename(self.source_repo_path)))
-        self.import_in_place = (self.source_repo_path == self.destination_directory)
-        self.dir_above_repo = self.filesystem.dirname(self.source_repo_path)
+        if not self.checkout_is_okay(options.allow_local_commits):
+            return 1
 
-        self.import_list = []
+        self.git_cl = GitCL(self.host, auth_refresh_token_json=options.auth_refresh_token_json)
 
-        # This is just a FYI list of CSS properties that still need to be prefixed,
-        # which may be output after importing.
-        self._prefixed_properties = {}
+        _log.info('Noting the current Chromium commit.')
+        _, show_ref_output = self.run(['git', 'show-ref', 'HEAD'])
+        chromium_commit = show_ref_output.split()[0]
 
-    def do_import(self):
-        _log.info("Importing %s into %s", self.source_repo_path, self.destination_directory)
-        self.find_importable_tests()
-        self.import_tests()
+        if options.target == 'wpt':
+            import_commit = self.update(WPT_DEST_NAME, WPT_REPO_URL, options.keep_w3c_repos_around, options.revision)
+            self._copy_resources()
+        elif options.target == 'css':
+            import_commit = self.update(CSS_DEST_NAME, CSS_REPO_URL, options.keep_w3c_repos_around, options.revision)
+        else:
+            raise AssertionError("Unsupported target %s" % options.target)
 
-    def find_importable_tests(self):
-        """Walks through the source directory to find what tests should be imported.
+        has_changes = self._has_changes()
+        if not has_changes:
+            _log.info('Done: no changes to import.')
+            return 0
 
-        This function sets self.import_list, which contains information about how many
-        tests are being imported, and their source and destination paths.
+        commit_message = self._commit_message(chromium_commit, import_commit)
+        self._commit_changes(commit_message)
+        _log.info('Done: changes imported and committed.')
+
+        if options.auto_update:
+            commit_successful = self.do_auto_update()
+            if not commit_successful:
+                return 1
+        return 0
+
+    def parse_args(self, argv):
+        parser = argparse.ArgumentParser()
+        parser.description = __doc__
+        parser.add_argument('-v', '--verbose', action='store_true',
+                            help='log what we are doing')
+        parser.add_argument('--allow-local-commits', action='store_true',
+                            help='allow script to run even if we have local commits')
+        parser.add_argument('--keep-w3c-repos-around', action='store_true',
+                            help='leave the w3c repos around that were imported previously.')
+        parser.add_argument('-r', dest='revision', action='store',
+                            help='Target revision.')
+        parser.add_argument('target', choices=['css', 'wpt'],
+                            help='Target repository.  "css" for csswg-test, "wpt" for web-platform-tests.')
+        parser.add_argument('--auto-update', action='store_true',
+                            help='uploads CL and initiates commit queue.')
+        parser.add_argument('--auth-refresh-token-json',
+                            help='Rietveld auth refresh JSON token.')
+        return parser.parse_args(argv)
+
+    def checkout_is_okay(self, allow_local_commits):
+        git_diff_retcode, _ = self.run(['git', 'diff', '--quiet', 'HEAD'], exit_on_failure=False)
+        if git_diff_retcode:
+            _log.warning('Checkout is dirty; aborting.')
+            return False
+
+        local_commits = self.run(['git', 'log', '--oneline', 'origin/master..HEAD'])[1]
+        if local_commits and not allow_local_commits:
+            _log.warning('Checkout has local commits; aborting. Use --allow-local-commits to allow this.')
+            return False
+
+        if self.fs.exists(self.path_from_webkit_base(WPT_DEST_NAME)):
+            _log.warning('WebKit/%s exists; aborting.', WPT_DEST_NAME)
+            return False
+
+        if self.fs.exists(self.path_from_webkit_base(CSS_DEST_NAME)):
+            _log.warning('WebKit/%s repo exists; aborting.', CSS_DEST_NAME)
+            return False
+
+        return True
+
+    def _copy_resources(self):
+        """Copies resources from wpt to LayoutTests/resources.
+
+        We copy idlharness.js and testharness.js in wpt to LayoutTests/resources
+        in order to use them in non-imported tests.
+
+        If this method is changed, the lists of files expected to be identical
+        in LayoutTests/PRESUBMIT.py should also be changed.
         """
-        paths_to_skip = self.find_paths_to_skip()
+        resources_to_copy_from_wpt = [
+            ('idlharness.js', 'resources'),
+            ('testharness.js', 'resources'),
+        ]
+        for filename, wpt_subdir in resources_to_copy_from_wpt:
+            source = self.path_from_webkit_base('LayoutTests', 'external', WPT_DEST_NAME, wpt_subdir, filename)
+            destination = self.path_from_webkit_base('LayoutTests', 'resources', filename)
+            self.copyfile(source, destination)
+            self.run(['git', 'add', destination])
 
-        for root, dirs, files in self.filesystem.walk(self.source_repo_path):
-            cur_dir = root.replace(self.dir_above_repo + '/', '') + '/'
-            _log.debug('  scanning ' + cur_dir + '...')
-            total_tests = 0
-            reftests = 0
-            jstests = 0
-
-            # Files in 'tools' are not for browser testing, so we skip them.
-            # See: http://testthewebforward.org/docs/test-format-guidelines.html#tools
-            dirs_to_skip = ('.git', 'test-plan', 'tools')
-
-            # We copy all files in 'support', including HTML without metadata.
-            # See: http://testthewebforward.org/docs/test-format-guidelines.html#support-files
-            dirs_to_include = ('resources', 'support')
-
-            if dirs:
-                for name in dirs_to_skip:
-                    if name in dirs:
-                        dirs.remove(name)
-
-                for path in paths_to_skip:
-                    path_base = path.replace(self.dest_dir_name + '/', '')
-                    path_base = path_base.replace(cur_dir, '')
-                    path_full = self.filesystem.join(root, path_base)
-                    if path_base in dirs:
-                        dirs.remove(path_base)
-                        if self.import_in_place:
-                            _log.debug('  pruning %s', path_base)
-                            self.filesystem.rmtree(path_full)
-                        else:
-                            _log.debug('  skipping %s', path_base)
-
-            copy_list = []
-
-            for filename in files:
-                path_full = self.filesystem.join(root, filename)
-                path_base = path_full.replace(self.source_repo_path + '/', '')
-                path_base = self.destination_directory.replace(self.layout_tests_dir + '/', '') + '/' + path_base
-                if path_base in paths_to_skip:
-                    if self.import_in_place:
-                        _log.debug('  pruning %s', path_base)
-                        self.filesystem.remove(path_full)
-                        continue
-                    else:
-                        continue
-                # FIXME: This block should really be a separate function, but the early-continues make that difficult.
-
-                if filename.startswith('.') or filename.endswith('.pl'):
-                    # The w3cs repos may contain perl scripts, which we don't care about.
-                    continue
-                if filename == 'OWNERS' or filename == 'reftest.list':
-                    # These files fail our presubmits.
-                    # See http://crbug.com/584660 and http://crbug.com/582838.
-                    continue
-
-                fullpath = self.filesystem.join(root, filename)
-
-                mimetype = mimetypes.guess_type(fullpath)
-                if ('html' not in str(mimetype[0]) and
-                        'application/xhtml+xml' not in str(mimetype[0]) and
-                        'application/xml' not in str(mimetype[0])):
-                    copy_list.append({'src': fullpath, 'dest': filename})
-                    continue
-
-                if self.filesystem.basename(root) in dirs_to_include:
-                    copy_list.append({'src': fullpath, 'dest': filename})
-                    continue
-
-                test_parser = TestParser(fullpath, self.host)
-                test_info = test_parser.analyze_test()
-                if test_info is None:
-                    copy_list.append({'src': fullpath, 'dest': filename})
-                    continue
-
-                if self.path_too_long(path_full):
-                    _log.warning('%s skipped due to long path. '
-                                 'Max length from repo base %d chars; see http://crbug.com/609871.',
-                                 path_full, MAX_PATH_LENGTH)
-                    continue
-
-                if 'reference' in test_info.keys():
-                    test_basename = self.filesystem.basename(test_info['test'])
-                    # Add the ref file, following WebKit style.
-                    # FIXME: Ideally we'd support reading the metadata
-                    # directly rather than relying on a naming convention.
-                    # Using a naming convention creates duplicate copies of the
-                    # reference files (http://crrev.com/268729).
-                    ref_file = self.filesystem.splitext(test_basename)[0] + '-expected'
-                    # Make sure to use the extension from the *reference*, not
-                    # from the test, because at least flexbox tests use XHTML
-                    # references but HTML tests.
-                    ref_file += self.filesystem.splitext(test_info['reference'])[1]
-
-                    if not self.filesystem.exists(test_info['reference']):
-                        _log.warning('%s skipped because ref file %s was not found.',
-                                     path_full, ref_file)
-                        continue
-
-                    if self.path_too_long(path_full.replace(filename, ref_file)):
-                        _log.warning('%s skipped because path of ref file %s would be too long. '
-                                     'Max length from repo base %d chars; see http://crbug.com/609871.',
-                                     path_full, ref_file, MAX_PATH_LENGTH)
-                        continue
-
-                    reftests += 1
-                    total_tests += 1
-                    copy_list.append({'src': test_info['reference'], 'dest': ref_file,
-                                      'reference_support_info': test_info['reference_support_info']})
-                    copy_list.append({'src': test_info['test'], 'dest': filename})
-
-                elif 'jstest' in test_info.keys():
-                    jstests += 1
-                    total_tests += 1
-                    copy_list.append({'src': fullpath, 'dest': filename, 'is_jstest': True})
-
-            if copy_list:
-                # Only add this directory to the list if there's something to import
-                self.import_list.append({'dirname': root, 'copy_list': copy_list,
-                                         'reftests': reftests, 'jstests': jstests, 'total_tests': total_tests})
-
-    def find_paths_to_skip(self):
-        paths_to_skip = set()
-        port = self.host.port_factory.get()
-        w3c_import_expectations_path = self.webkit_finder.path_from_webkit_base('LayoutTests', 'W3CImportExpectations')
-        w3c_import_expectations = self.filesystem.read_text_file(w3c_import_expectations_path)
-        parser = TestExpectationParser(port, all_tests=(), is_lint_mode=False)
-        expectation_lines = parser.parse(w3c_import_expectations_path, w3c_import_expectations)
-        for line in expectation_lines:
-            if 'SKIP' in line.expectations:
-                if line.specifiers:
-                    _log.warning("W3CImportExpectations:%s should not have any specifiers", line.line_numbers)
-                    continue
-                paths_to_skip.add(line.name)
-        return paths_to_skip
-
-    def import_tests(self):
-        """Reads |self.import_list|, and converts and copies files to their destination."""
-        total_imported_tests = 0
-        total_imported_reftests = 0
-        total_imported_jstests = 0
-
-        for dir_to_copy in self.import_list:
-            total_imported_tests += dir_to_copy['total_tests']
-            total_imported_reftests += dir_to_copy['reftests']
-            total_imported_jstests += dir_to_copy['jstests']
-
-            if not dir_to_copy['copy_list']:
-                continue
-
-            orig_path = dir_to_copy['dirname']
-
-            relative_dir = self.filesystem.relpath(orig_path, self.source_repo_path)
-            dest_dir = self.filesystem.join(self.destination_directory, relative_dir)
-
-            if not self.filesystem.exists(dest_dir):
-                self.filesystem.maybe_make_directory(dest_dir)
-
-            copied_files = []
-
-            for file_to_copy in dir_to_copy['copy_list']:
-                copied_file = self.copy_file(file_to_copy, dest_dir)
-                if copied_file:
-                    copied_files.append(copied_file)
-
-        _log.info('')
-        _log.info('Import complete')
-        _log.info('')
-        _log.info('IMPORTED %d TOTAL TESTS', total_imported_tests)
-        _log.info('Imported %d reftests', total_imported_reftests)
-        _log.info('Imported %d JS tests', total_imported_jstests)
-        _log.info('Imported %d pixel/manual tests', total_imported_tests - total_imported_jstests - total_imported_reftests)
-        _log.info('')
-
-        if self._prefixed_properties:
-            _log.info('Properties needing prefixes (by count):')
-            for prefixed_property in sorted(self._prefixed_properties, key=lambda p: self._prefixed_properties[p]):
-                _log.info('  %s: %s', prefixed_property, self._prefixed_properties[prefixed_property])
-
-    def copy_file(self, file_to_copy, dest_dir):
-        """Converts and copies a file, if it should be copied.
+    def _generate_manifest(self, dest_path):
+        """Generates MANIFEST.json for imported tests.
 
         Args:
-            file_to_copy: A dict in a file copy list constructed by
-                find_importable_tests, which represents one file to copy, including
-                the keys:
-                    "src": Absolute path to the source location of the file.
-                    "destination": File name of the destination file.
-                And possibly also the keys "reference_support_info" or "is_jstest".
-            dest_dir: Path to the directory where the file should be copied.
+            dest_path: Path to the destination WPT directory.
+
+        Runs the (newly-updated) manifest command if it's found, and then
+        stages the generated MANIFEST.json in the git index, ready to commit.
+        """
+        manifest_command = self.finder.path_from_webkit_base('Tools', 'Scripts', 'webkitpy', 'thirdparty', 'wpt', 'wpt', 'manifest')
+        if 'css' in dest_path:
+            # Do nothing for csswg-test.
+            return
+        _log.info('Generating MANIFEST.json')
+        self.run([manifest_command, '--work', '--tests-root', dest_path])
+        self.run(['git', 'add', self.fs.join(dest_path, 'MANIFEST.json')])
+
+    def update(self, dest_dir_name, url, keep_w3c_repos_around, revision):
+        """Updates an imported repository.
+
+        Args:
+            dest_dir_name: The destination directory name.
+            url: URL of the git repository.
+            revision: Commit hash or None.
 
         Returns:
-            The path to the new file, relative to the Blink root (//third_party/WebKit).
+            A string for the commit description "<destination>@<commitish>".
         """
-        source_path = self.filesystem.normpath(file_to_copy['src'])
-        dest_path = self.filesystem.join(dest_dir, file_to_copy['dest'])
+        temp_repo_path = self.path_from_webkit_base(dest_dir_name)
+        _log.info('Cloning %s into %s.', url, temp_repo_path)
+        self.run(['git', 'clone', url, temp_repo_path])
 
-        if self.filesystem.isdir(source_path):
-            _log.error('%s refers to a directory', source_path)
-            return None
+        if revision is not None:
+            _log.info('Checking out %s', revision)
+            self.run(['git', 'checkout', revision], cwd=temp_repo_path)
 
-        if not self.filesystem.exists(source_path):
-            _log.error('%s not found. Possible error in the test.', source_path)
-            return None
+        self.run(['git', 'submodule', 'update', '--init', '--recursive'], cwd=temp_repo_path)
 
-        reference_support_info = file_to_copy.get('reference_support_info') or None
+        _log.info('Noting the revision we are importing.')
+        _, show_ref_output = self.run(['git', 'show-ref', 'origin/master'], cwd=temp_repo_path)
+        master_commitish = show_ref_output.split()[0]
 
-        if not self.filesystem.exists(self.filesystem.dirname(dest_path)):
-            if not self.import_in_place:
-                self.filesystem.maybe_make_directory(self.filesystem.dirname(dest_path))
+        _log.info('Cleaning out tests from LayoutTests/external/%s.', dest_dir_name)
+        dest_path = self.path_from_webkit_base('LayoutTests', 'external', dest_dir_name)
+        is_not_baseline_filter = lambda fs, dirname, basename: not self.is_baseline(basename)
+        files_to_delete = self.fs.files_under(dest_path, file_filter=is_not_baseline_filter)
+        for subpath in files_to_delete:
+            self.remove('LayoutTests', 'external', subpath)
 
-        relpath = self.filesystem.relpath(dest_path, self.layout_tests_dir)
-        # FIXME: Maybe doing a file diff is in order here for existing files?
-        # In other words, there's no sense in overwriting identical files, but
-        # there's no harm in copying the identical thing.
-        _log.debug('  copying %s', relpath)
+        _log.info('Importing the tests.')
+        test_copier = TestCopier(self.host, temp_repo_path)
+        test_copier.do_import()
 
-        if self.should_try_to_convert(file_to_copy, source_path, dest_dir):
-            converted_file = convert_for_webkit(
-                dest_dir, filename=source_path,
-                reference_support_info=reference_support_info,
-                host=self.host)
-            for prefixed_property in converted_file[0]:
-                self._prefixed_properties.setdefault(prefixed_property, 0)
-                self._prefixed_properties[prefixed_property] += 1
+        self.run(['git', 'add', '--all', 'LayoutTests/external/%s' % dest_dir_name])
 
-            self.filesystem.write_text_file(dest_path, converted_file[1])
-        else:
-            if not self.import_in_place:
-                self.filesystem.copyfile(source_path, dest_path)
-                if self.filesystem.read_binary_file(source_path)[:2] == '#!':
-                    self.filesystem.make_executable(dest_path)
+        _log.info('Deleting any orphaned baselines.')
 
-        return dest_path.replace(self._webkit_root, '')
+        is_baseline_filter = lambda fs, dirname, basename: self.is_baseline(basename)
+        previous_baselines = self.fs.files_under(dest_path, file_filter=is_baseline_filter)
+
+        for subpath in previous_baselines:
+            full_path = self.fs.join(dest_path, subpath)
+            if self.fs.glob(full_path.replace('-expected.txt', '*')) == [full_path]:
+                self.fs.remove(full_path)
+
+        self._generate_manifest(dest_path)
+
+        if not keep_w3c_repos_around:
+            _log.info('Deleting temp repo directory %s.', temp_repo_path)
+            self.rmtree(temp_repo_path)
+
+        _log.info('Updating TestExpectations for any removed or renamed tests.')
+        self.update_all_test_expectations_files(self._list_deleted_tests(), self._list_renamed_tests())
+
+        return '%s@%s' % (dest_dir_name, master_commitish)
+
+    def _commit_changes(self, commit_message):
+        _log.info('Committing changes.')
+        self.run(['git', 'commit', '--all', '-F', '-'], stdin=commit_message)
+
+    def _has_changes(self):
+        return_code, _ = self.run(['git', 'diff', '--quiet', 'HEAD'], exit_on_failure=False)
+        return return_code == 1
+
+    def _commit_message(self, chromium_commit, import_commit):
+        return ('Import %s\n\n'
+                'Using wpt-import in Chromium %s.\n\n'
+                'NOEXPORT=true' %
+                (import_commit, chromium_commit))
 
     @staticmethod
-    def should_try_to_convert(file_to_copy, source_path, dest_dir):
-        """Checks whether we should try to modify the file when importing."""
-        if file_to_copy.get('is_jstest', False):
-            return False
+    def is_baseline(basename):
+        # TODO(qyearsley): Find a better, centralized place for this.
+        return basename.endswith('-expected.txt')
 
-        # Conversion is not necessary for any tests in wpt now; see http://crbug.com/654081.
-        # Note, we want to move away from converting files, see http://crbug.com/663773.
-        if re.search(r'[/\\]external[/\\]wpt[/\\]', dest_dir):
-            return False
+    def run(self, cmd, exit_on_failure=True, cwd=None, stdin=''):
+        _log.debug('Running command: %s', ' '.join(cmd))
 
-        # Only HTML, XHTML and CSS files should be converted.
-        mimetype, _ = mimetypes.guess_type(source_path)
-        return mimetype in ('text/html', 'application/xhtml+xml', 'text/css')
+        cwd = cwd or self.finder.webkit_base()
+        proc = self.executive.popen(cmd, stdout=self.executive.PIPE, stderr=self.executive.PIPE, stdin=self.executive.PIPE, cwd=cwd)
+        out, err = proc.communicate(stdin)
+        if proc.returncode or self.verbose:
+            _log.info('# ret> %d', proc.returncode)
+            if out:
+                for line in out.splitlines():
+                    _log.info('# out> %s', line)
+            if err:
+                for line in err.splitlines():
+                    _log.info('# err> %s', line)
+        if exit_on_failure and proc.returncode:
+            self.host.exit(proc.returncode)
+        return proc.returncode, out
 
-    def path_too_long(self, source_path):
-        """Checks whether a source path is too long to import.
+    def check_run(self, command):
+        return_code, out = self.run(command)
+        if return_code:
+            raise Exception('%s failed with exit code %d.' % ' '.join(command), return_code)
+        return out
 
-        Args:
-            Absolute path of file to be imported.
+    def copyfile(self, source, destination):
+        _log.debug('cp %s %s', source, destination)
+        self.fs.copyfile(source, destination)
+
+    def remove(self, *comps):
+        dest = self.path_from_webkit_base(*comps)
+        _log.debug('rm %s', dest)
+        self.fs.remove(dest)
+
+    def rmtree(self, *comps):
+        dest = self.path_from_webkit_base(*comps)
+        _log.debug('rm -fr %s', dest)
+        self.fs.rmtree(dest)
+
+    def path_from_webkit_base(self, *comps):
+        return self.finder.path_from_webkit_base(*comps)
+
+    def do_auto_update(self):
+        """Attempts to upload a CL, make any required adjustments, and commit.
+
+        This function assumes that the imported repo has already been updated,
+        and that change has been committed. There may be newly-failing tests,
+        so before being able to commit these new changes, we may need to update
+        TestExpectations or download new baselines.
 
         Returns:
-            True if the path is too long to import, False if it's OK.
+            True if successfully committed, False otherwise.
         """
-        path_from_repo_base = os.path.relpath(source_path, self.source_repo_path)
-        return len(path_from_repo_base) > MAX_PATH_LENGTH
+        self._upload_cl()
+        _log.info('Issue: %s', self.git_cl.run(['issue']).strip())
+
+        # First, try on Blink try bots in order to get any new baselines.
+        _log.info('Triggering try jobs.')
+        for try_bot in self.host.builders.all_try_builder_names():
+            self.git_cl.run(['try', '-b', try_bot])
+        try_results = self.git_cl.wait_for_try_jobs(
+            poll_delay_seconds=POLL_DELAY_SECONDS, timeout_seconds=TIMEOUT_SECONDS)
+
+        if not try_results:
+            self.git_cl.run(['set-close'])
+            return False
+
+        if try_results and self.git_cl.has_failing_try_results(try_results):
+            self.fetch_new_expectations_and_baselines()
+
+        # Wait for CQ try jobs to finish. If there are failures, then abort.
+        self.git_cl.run(['set-commit', '--rietveld'])
+        try_results = self.git_cl.wait_for_try_jobs(
+            poll_delay_seconds=POLL_DELAY_SECONDS, timeout_seconds=TIMEOUT_SECONDS)
+
+        if not try_results:
+            self.git_cl.run(['set-close'])
+            return False
+
+        if self.git_cl.has_failing_try_results(try_results):
+            _log.info('CQ failed; aborting.')
+            self.git_cl.run(['set-close'])
+            return False
+
+        _log.info('Update completed.')
+        return True
+
+    def _upload_cl(self):
+        _log.info('Uploading change list.')
+        cc_list = self.get_directory_owners_to_cc()
+        description = self._cl_description()
+        self.git_cl.run([
+            'upload',
+            '-f',
+            '--rietveld',
+            '-m',
+            description,
+        ] + ['--cc=' + email for email in cc_list])
+
+    def _cl_description(self):
+        description = self.check_run(['git', 'log', '-1', '--format=%B'])
+        build_link = self._build_link()
+        if build_link:
+            description += 'Build: %s\n\n' % build_link
+        description += 'TBR=qyearsley@chromium.org\n'
+        # Move any NOEXPORT tag to the end of the description.
+        description = description.replace('NOEXPORT=true', '')
+        description = description.replace('\n\n\n\n', '\n\n')
+        description += 'NOEXPORT=true'
+        return description
+
+    def _build_link(self):
+        """Returns a link to a job, if running on buildbot."""
+        master_name = self.host.environ.get('BUILDBOT_MASTERNAME')
+        builder_name = self.host.environ.get('BUILDBOT_BUILDERNAME')
+        build_number = self.host.environ.get('BUILDBOT_BUILDNUMBER')
+        if not (master_name and builder_name and build_number):
+            return None
+        return 'https://build.chromium.org/p/%s/builders/%s/builds/%s' % (master_name, builder_name, build_number)
+
+    def get_directory_owners_to_cc(self):
+        """Returns a list of email addresses to CC for the current import."""
+        _log.info('Gathering directory owners emails to CC.')
+        directory_owners_file_path = self.finder.path_from_webkit_base(
+            'Tools', 'Scripts', 'webkitpy', 'w3c', 'directory_owners.json')
+        with open(directory_owners_file_path) as data_file:
+            directory_to_owner = self.parse_directory_owners(json.load(data_file))
+        out = self.check_run(['git', 'diff', 'origin/master', '--name-only'])
+        changed_files = out.splitlines()
+        return self.generate_email_list(changed_files, directory_to_owner)
+
+    @staticmethod
+    def parse_directory_owners(decoded_data_file):
+        directory_dict = {}
+        for dict_set in decoded_data_file:
+            if dict_set['notification-email']:
+                directory_dict[dict_set['directory']] = dict_set['notification-email']
+        return directory_dict
+
+    def generate_email_list(self, changed_files, directory_to_owner):
+        """Returns a list of email addresses based on the given file list and
+        directory-to-owner mapping.
+
+        Args:
+            changed_files: A list of file paths relative to the repository root.
+            directory_to_owner: A dict mapping layout test directories to emails.
+
+        Returns:
+            A list of the email addresses to be notified for the current import.
+        """
+        email_addresses = set()
+        for file_path in changed_files:
+            test_path = self.finder.layout_test_name(file_path)
+            if test_path is None:
+                continue
+            test_dir = self.fs.dirname(test_path)
+            if test_dir in directory_to_owner:
+                address = directory_to_owner[test_dir]
+                if not re.match(r'\S+@\S+', address):
+                    _log.warning('%s appears not be an email address, skipping.', address)
+                    continue
+                email_addresses.add(address)
+        return sorted(email_addresses)
+
+    def fetch_new_expectations_and_baselines(self):
+        """Adds new expectations and downloads baselines based on try job results, then commits and uploads the change."""
+        _log.info('Adding test expectations lines to LayoutTests/TestExpectations.')
+        line_adder = W3CExpectationsLineAdder(self.host)
+        line_adder.run()
+        message = 'Update test expectations and baselines.'
+        self.check_run(['git', 'commit', '-a', '-m', message])
+        self.git_cl.run(['upload', '-m', message, '--rietveld'])
+
+    def update_all_test_expectations_files(self, deleted_tests, renamed_tests):
+        """Updates all test expectations files for tests that have been deleted or renamed."""
+        port = self.host.port_factory.get()
+        for path, file_contents in port.all_expectations_dict().iteritems():
+            parser = TestExpectationParser(port, all_tests=None, is_lint_mode=False)
+            expectation_lines = parser.parse(path, file_contents)
+            self._update_single_test_expectations_file(path, expectation_lines, deleted_tests, renamed_tests)
+
+    def _update_single_test_expectations_file(self, path, expectation_lines, deleted_tests, renamed_tests):
+        """Updates single test expectations file."""
+        # FIXME: This won't work for removed or renamed directories with test expectations
+        # that are directories rather than individual tests.
+        new_lines = []
+        changed_lines = []
+        for expectation_line in expectation_lines:
+            if expectation_line.name in deleted_tests:
+                continue
+            if expectation_line.name in renamed_tests:
+                expectation_line.name = renamed_tests[expectation_line.name]
+                # Upon parsing the file, a "path does not exist" warning is expected
+                # to be there for tests that have been renamed, and if there are warnings,
+                # then the original string is used. If the warnings are reset, then the
+                # expectation line is re-serialized when output.
+                expectation_line.warnings = []
+                changed_lines.append(expectation_line)
+            new_lines.append(expectation_line)
+        new_file_contents = TestExpectations.list_to_string(new_lines, reconstitute_only_these=changed_lines)
+        self.host.filesystem.write_text_file(path, new_file_contents)
+
+    def _list_deleted_tests(self):
+        """Returns a list of layout tests that have been deleted."""
+        out = self.check_run(['git', 'diff', 'origin/master', '-M100%', '--diff-filter=D', '--name-only'])
+        deleted_tests = []
+        for line in out.splitlines():
+            test = self.finder.layout_test_name(line)
+            if test:
+                deleted_tests.append(test)
+        return deleted_tests
+
+    def _list_renamed_tests(self):
+        """Returns a dict mapping source to dest name for layout tests that have been renamed."""
+        out = self.check_run(['git', 'diff', 'origin/master', '-M100%', '--diff-filter=R', '--name-status'])
+        renamed_tests = {}
+        for line in out.splitlines():
+            _, source_path, dest_path = line.split()
+            source_test = self.finder.layout_test_name(source_path)
+            dest_test = self.finder.layout_test_name(dest_path)
+            if source_test and dest_test:
+                renamed_tests[source_test] = dest_test
+        return renamed_tests
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
index ba022f7..9e5fc35 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
@@ -1,177 +1,151 @@
-# Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above
-#    copyright notice, this list of conditions and the following
-#    disclaimer.
-# 2. 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.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "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 HOLDER 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.
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
 
 import unittest
 
 from webkitpy.common.host_mock import MockHost
-from webkitpy.common.system.executive_mock import MockExecutive, ScriptError
-from webkitpy.common.system.filesystem_mock import MockFileSystem
+from webkitpy.common.system.executive_mock import MockExecutive
 from webkitpy.w3c.test_importer import TestImporter
 
 
-FAKE_SOURCE_REPO_DIR = '/blink'
-
-FAKE_FILES = {
-    '/mock-checkout/third_party/Webkit/LayoutTests/external/OWNERS': '',
-    '/blink/w3c/dir/has_shebang.txt': '#!',
-    '/blink/w3c/dir/README.txt': '',
-    '/blink/w3c/dir/OWNERS': '',
-    '/blink/w3c/dir/reftest.list': '',
-    '/blink/w3c/dir1/OWNERS': '',
-    '/blink/w3c/dir1/reftest.list': '',
-    '/mock-checkout/third_party/WebKit/LayoutTests/external/README.txt': '',
-    '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectations': '',
-}
-
-
 class TestImporterTest(unittest.TestCase):
 
-    def test_import_dir_with_no_tests(self):
-        host = MockHost()
-        host.executive = MockExecutive(exception=ScriptError('error'))
-        host.filesystem = MockFileSystem(files=FAKE_FILES)
-        importer = TestImporter(host, FAKE_SOURCE_REPO_DIR, 'destination')
-        importer.do_import()  # No exception raised.
-
-    def test_path_too_long_true(self):
-        host = MockHost()
-        host.filesystem = MockFileSystem(files=FAKE_FILES)
-        importer = TestImporter(host, FAKE_SOURCE_REPO_DIR)
-        self.assertTrue(importer.path_too_long(FAKE_SOURCE_REPO_DIR + '/' + ('x' * 150) + '.html'))
-
-    def test_path_too_long_false(self):
-        host = MockHost()
-        host.filesystem = MockFileSystem(files=FAKE_FILES)
-        importer = TestImporter(host, FAKE_SOURCE_REPO_DIR)
-        self.assertFalse(importer.path_too_long(FAKE_SOURCE_REPO_DIR + '/x.html'))
-
-    def test_does_not_import_owner_files(self):
-        host = MockHost()
-        host.filesystem = MockFileSystem(files=FAKE_FILES)
-        importer = TestImporter(host, FAKE_SOURCE_REPO_DIR)
-        importer.find_importable_tests()
+    def test_generate_email_list(self):
+        importer = TestImporter(MockHost())
+        changed_files = [
+            'third_party/WebKit/LayoutTests/foo/bar/file.html',
+            'third_party/WebKit/LayoutTests/foo/bar/otherfile.html',
+            'third_party/WebKit/LayoutTests/foo/baz/files.html',
+            'some/non-test.file',
+        ]
+        directory_to_owner = {
+            'foo/bar': 'someone@gmail.com',
+            'foo/baz': 'not an email address',
+            'foo/bat': 'noone@gmail.com',
+        }
         self.assertEqual(
-            importer.import_list,
+            importer.generate_email_list(changed_files, directory_to_owner),
+            ['someone@gmail.com'])
+
+    def test_parse_directory_owners(self):
+        importer = TestImporter(MockHost())
+        data_file = [
+            {'notification-email': 'charizard@gmail.com', 'directory': 'foo/bar'},
+            {'notification-email': 'blastoise@gmail.com', 'directory': 'foo/baz'},
+            {'notification-email': '', 'directory': 'gol/bat'},
+        ]
+        self.assertEqual(
+            importer.parse_directory_owners(data_file),
+            {'foo/bar': 'charizard@gmail.com', 'foo/baz': 'blastoise@gmail.com'})
+
+    def test_update_test_expectations(self):
+        host = MockHost()
+        host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/TestExpectations'] = (
+            'Bug(test) some/test/a.html [ Failure ]\n'
+            'Bug(test) some/test/b.html [ Failure ]\n'
+            'Bug(test) some/test/c.html [ Failure ]\n')
+        host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/VirtualTestSuites'] = '[]'
+        host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/new/a.html'] = ''
+        host.filesystem.files['/mock-checkout/third_party/WebKit/LayoutTests/new/b.html'] = ''
+        importer = TestImporter(host)
+        deleted_tests = ['some/test/b.html']
+        renamed_test_pairs = {
+            'some/test/a.html': 'new/a.html',
+            'some/test/c.html': 'new/c.html',
+        }
+        importer.update_all_test_expectations_files(deleted_tests, renamed_test_pairs)
+        self.assertMultiLineEqual(
+            host.filesystem.read_text_file('/mock-checkout/third_party/WebKit/LayoutTests/TestExpectations'),
+            ('Bug(test) new/a.html [ Failure ]\n'
+             'Bug(test) new/c.html [ Failure ]\n'))
+
+    # Tests for protected methods - pylint: disable=protected-access
+
+    def test_commit_changes(self):
+        host = MockHost()
+        importer = TestImporter(host)
+        importer._has_changes = lambda: True
+        importer._commit_changes('dummy message')
+        self.assertEqual(
+            host.executive.calls,
+            [['git', 'commit', '--all', '-F', '-']])
+
+    def test_commit_message(self):
+        importer = TestImporter(MockHost())
+        self.assertEqual(
+            importer._commit_message('aaaa', '1111'),
+            'Import 1111\n\n'
+            'Using wpt-import in Chromium aaaa.\n\n'
+            'NOEXPORT=true')
+
+    def test_cl_description_with_empty_environ(self):
+        host = MockHost()
+        host.executive = MockExecutive(output='Last commit message\n\n')
+        importer = TestImporter(host)
+        description = importer._cl_description()
+        self.assertEqual(
+            description,
+            ('Last commit message\n\n'
+             'TBR=qyearsley@chromium.org\n'
+             'NOEXPORT=true'))
+        self.assertEqual(host.executive.calls, [['git', 'log', '-1', '--format=%B']])
+
+    def test_cl_description_with_environ_variables(self):
+        host = MockHost()
+        host.executive = MockExecutive(output='Last commit message\n')
+        importer = TestImporter(host)
+        importer.host.environ['BUILDBOT_MASTERNAME'] = 'my.master'
+        importer.host.environ['BUILDBOT_BUILDERNAME'] = 'b'
+        importer.host.environ['BUILDBOT_BUILDNUMBER'] = '123'
+        description = importer._cl_description()
+        self.assertEqual(
+            description,
+            ('Last commit message\n'
+             'Build: https://build.chromium.org/p/my.master/builders/b/builds/123\n\n'
+             'TBR=qyearsley@chromium.org\n'
+             'NOEXPORT=true'))
+        self.assertEqual(host.executive.calls, [['git', 'log', '-1', '--format=%B']])
+
+    def test_cl_description_moves_noexport_tag(self):
+        host = MockHost()
+        host.executive = MockExecutive(output='Summary\n\nNOEXPORT=true\n\n')
+        importer = TestImporter(host)
+        description = importer._cl_description()
+        self.assertEqual(
+            description,
+            ('Summary\n\n'
+             'TBR=qyearsley@chromium.org\n'
+             'NOEXPORT=true'))
+
+    def test_generate_manifest_command_not_found(self):
+        # If we're updating csswg-test, then the manifest file won't be found.
+        host = MockHost()
+        host.filesystem.files = {}
+        importer = TestImporter(host)
+        importer._generate_manifest(
+            '/mock-checkout/third_party/WebKit/LayoutTests/external/csswg-test')
+        self.assertEqual(host.executive.calls, [])
+
+    def test_generate_manifest_successful_run(self):
+        # This test doesn't test any aspect of the real manifest script, it just
+        # asserts that TestImporter._generate_manifest would invoke the script.
+        host = MockHost()
+        importer = TestImporter(host)
+        importer._generate_manifest(
+            '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt')
+        self.assertEqual(
+            host.executive.calls,
             [
-                {
-                    'copy_list': [
-                        {'dest': 'has_shebang.txt', 'src': '/blink/w3c/dir/has_shebang.txt'},
-                        {'dest': 'README.txt', 'src': '/blink/w3c/dir/README.txt'}
-                    ],
-                    'dirname': '/blink/w3c/dir',
-                    'jstests': 0,
-                    'reftests': 0,
-                    'total_tests': 0,
-                }
+                [
+                    '/mock-checkout/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/manifest',
+                    '--work',
+                    '--tests-root',
+                    '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt'
+                ],
+                [
+                    'git',
+                    'add',
+                    '/mock-checkout/third_party/WebKit/LayoutTests/external/wpt/MANIFEST.json'
+                ]
             ])
-
-    def test_does_not_import_reftestlist_file(self):
-        host = MockHost()
-        host.filesystem = MockFileSystem(files=FAKE_FILES)
-        importer = TestImporter(host, FAKE_SOURCE_REPO_DIR)
-        importer.find_importable_tests()
-        self.assertEqual(
-            importer.import_list,
-            [
-                {
-                    'copy_list': [
-                        {'dest': 'has_shebang.txt', 'src': '/blink/w3c/dir/has_shebang.txt'},
-                        {'dest': 'README.txt', 'src': '/blink/w3c/dir/README.txt'}
-                    ],
-                    'dirname': '/blink/w3c/dir',
-                    'jstests': 0,
-                    'reftests': 0,
-                    'total_tests': 0,
-                }
-            ])
-
-    def test_files_with_shebang_are_made_executable(self):
-        host = MockHost()
-        host.filesystem = MockFileSystem(files=FAKE_FILES)
-        importer = TestImporter(host, FAKE_SOURCE_REPO_DIR)
-        importer.do_import()
-        self.assertEqual(
-            host.filesystem.executable_files,
-            set(['/mock-checkout/third_party/WebKit/LayoutTests/external/blink/w3c/dir/has_shebang.txt']))
-
-    def test_ref_test_with_ref_is_copied(self):
-        host = MockHost()
-        host.filesystem = MockFileSystem(files={
-            '/blink/w3c/dir1/my-ref-test.html': '<html><head><link rel="match" href="ref-file.html" />test</head></html>',
-            '/blink/w3c/dir1/ref-file.html': '<html><head>test</head></html>',
-            '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectations': '',
-            '/mock-checkout/third_party/WebKit/Source/core/css/CSSProperties.in': '',
-        })
-        importer = TestImporter(host, FAKE_SOURCE_REPO_DIR)
-        importer.find_importable_tests()
-        self.assertEqual(
-            importer.import_list,
-            [
-                {
-                    'copy_list': [
-                        {'src': '/blink/w3c/dir1/ref-file.html', 'dest': 'ref-file.html'},
-                        {'src': '/blink/w3c/dir1/ref-file.html', 'dest': 'my-ref-test-expected.html', 'reference_support_info': {}},
-                        {'src': '/blink/w3c/dir1/my-ref-test.html', 'dest': 'my-ref-test.html'}
-                    ],
-                    'dirname': '/blink/w3c/dir1',
-                    'jstests': 0,
-                    'reftests': 1,
-                    'total_tests': 1
-                }
-            ])
-
-    def test_ref_test_without_ref_is_skipped(self):
-        host = MockHost()
-        host.filesystem = MockFileSystem(files={
-            '/blink/w3c/dir1/my-ref-test.html': '<html><head><link rel="match" href="not-here.html" /></head></html>',
-            '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectations': '',
-            '/mock-checkout/third_party/WebKit/Source/core/css/CSSProperties.in': '',
-        })
-        importer = TestImporter(host, FAKE_SOURCE_REPO_DIR)
-        importer.find_importable_tests()
-        self.assertEqual(importer.import_list, [])
-
-    def test_should_try_to_convert_positive_cases(self):
-        self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.css', 'LayoutTests/external/csswg-test/x'))
-        self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.htm', 'LayoutTests/external/csswg-test/x'))
-        self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.html', 'LayoutTests/external/csswg-test/x'))
-        self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.xht', 'LayoutTests/external/csswg-test/x'))
-        self.assertTrue(TestImporter.should_try_to_convert({}, 'foo.xhtml', 'LayoutTests/external/csswg-test/x'))
-
-    def test_should_not_try_to_convert_js_test(self):
-        self.assertFalse(TestImporter.should_try_to_convert({'is_jstest': True}, 'foo.html', 'LayoutTests/external/csswg-test/x'))
-
-    def test_should_not_try_to_convert_test_in_wpt(self):
-        self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.html', 'LayoutTests/external/wpt/foo'))
-
-    def test_should_not_try_to_convert_other_file_types(self):
-        self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.bar', 'LayoutTests/external/csswg-test/x'))
-        self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.js', 'LayoutTests/external/csswg-test/x'))
-        self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.md', 'LayoutTests/external/csswg-test/x'))
-        self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.png', 'LayoutTests/external/csswg-test/x'))
-        self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.svg', 'LayoutTests/external/csswg-test/x'))
-        self.assertFalse(TestImporter.should_try_to_convert({}, 'foo.svgz', 'LayoutTests/external/csswg-test/x'))
diff --git a/third_party/WebKit/Tools/Scripts/wpt-import b/third_party/WebKit/Tools/Scripts/wpt-import
index 2737db2..78850d7 100755
--- a/third_party/WebKit/Tools/Scripts/wpt-import
+++ b/third_party/WebKit/Tools/Scripts/wpt-import
@@ -3,18 +3,18 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
-"""Pull latest revisions of the W3C test repos and update our DEPS entries."""
+"""Pulls the latest revisions of the web-platform-tests or csswg-test repos."""
 
 from webkitpy.common import version_check
 from webkitpy.common.host import Host
-from webkitpy.w3c.deps_updater import DepsUpdater
+from webkitpy.w3c.test_importer import TestImporter
 
 
 if __name__ == '__main__':
     host = Host()
-    updater = DepsUpdater(host)
+    importer = TestImporter(host)
     try:
-        host.exit(updater.main())
+        host.exit(importer.main())
     except KeyboardInterrupt:
         host.print_("Interrupted, exiting")
         host.exit(130)
diff --git a/third_party/WebKit/public/platform/modules/background_sync/OWNERS b/third_party/WebKit/public/platform/modules/background_sync/OWNERS
index 1812c22..256ecaa 100644
--- a/third_party/WebKit/public/platform/modules/background_sync/OWNERS
+++ b/third_party/WebKit/public/platform/modules/background_sync/OWNERS
@@ -3,3 +3,5 @@
 
 per-file *.mojom=set noparent
 per-file *.mojom=file://ipc/SECURITY_OWNERS
+
+# COMPONENT: Blink>BackgroundSync
diff --git a/third_party/decklink/OWNERS b/third_party/decklink/OWNERS
index a476319b..21362ba 100644
--- a/third_party/decklink/OWNERS
+++ b/third_party/decklink/OWNERS
@@ -1,3 +1,6 @@
 magjed@chromium.org
 mcasas@chromium.org
 tommi@chromium.org
+
+# TEAM: media-capture-and-streams@grotations.appspotmail.com
+# COMPONENT: Blink>GetUserMedia
diff --git a/third_party/libwebm/OWNERS b/third_party/libwebm/OWNERS
index 28e25ab..43542744 100644
--- a/third_party/libwebm/OWNERS
+++ b/third_party/libwebm/OWNERS
@@ -5,3 +5,5 @@
 
 # The following OWNER refer to libwebm content.
 tomfinegan@chromium.org
+
+# COMPONENT: Blink>MediaRecording
diff --git a/ui/aura/client/aura_constants.cc b/ui/aura/client/aura_constants.cc
index cf6b224..386e50f 100644
--- a/ui/aura/client/aura_constants.cc
+++ b/ui/aura/client/aura_constants.cc
@@ -35,6 +35,7 @@
 DEFINE_WINDOW_PROPERTY_KEY(int, kAppType, 0);
 DEFINE_WINDOW_PROPERTY_KEY(bool, kConstrainedWindowKey, false);
 DEFINE_WINDOW_PROPERTY_KEY(bool, kDrawAttentionKey, false);
+DEFINE_WINDOW_PROPERTY_KEY(bool, kImmersiveFullscreenKey, false);
 DEFINE_WINDOW_PROPERTY_KEY(bool, kMirroringEnabledKey, false);
 DEFINE_WINDOW_PROPERTY_KEY(Window*, kHostWindowKey, nullptr);
 DEFINE_WINDOW_PROPERTY_KEY(ui::ModalType, kModalKey, ui::MODAL_TYPE_NONE);
diff --git a/ui/aura/client/aura_constants.h b/ui/aura/client/aura_constants.h
index 71df937..65879c0 100644
--- a/ui/aura/client/aura_constants.h
+++ b/ui/aura/client/aura_constants.h
@@ -53,6 +53,13 @@
 // attention.
 AURA_EXPORT extern const aura::WindowProperty<bool>* const kDrawAttentionKey;
 
+// A property key to indicate that a window should be in immersive mode when the
+// window enters the fullscreen mode. The immersive fullscreen mode is slightly
+// different from the normal fullscreen mode by allowing the user to reveal the
+// top portion of the window through a touch / mouse gesture.
+AURA_EXPORT extern const aura::WindowProperty<bool>* const
+    kImmersiveFullscreenKey;
+
 // A property key to indicate that a window is being "mirrored" and its contents
 // should render regardless of its actual visibility state.
 AURA_EXPORT extern const aura::WindowProperty<bool>* const kMirroringEnabledKey;
diff --git a/ui/aura/mus/property_converter.cc b/ui/aura/mus/property_converter.cc
index 47fe11b2..9872296 100644
--- a/ui/aura/mus/property_converter.cc
+++ b/ui/aura/mus/property_converter.cc
@@ -37,6 +37,8 @@
                    ui::mojom::WindowManager::kAppIcon_Property);
   RegisterProperty(client::kAppIdKey,
                    ui::mojom::WindowManager::kAppID_Property);
+  RegisterProperty(client::kImmersiveFullscreenKey,
+                   ui::mojom::WindowManager::kImmersiveFullscreen_Property);
   RegisterProperty(client::kNameKey, ui::mojom::WindowManager::kName_Property);
   RegisterProperty(client::kPreferredSize,
                    ui::mojom::WindowManager::kPreferredSize_Property);
diff --git a/ui/display/BUILD.gn b/ui/display/BUILD.gn
index 7bbfa0d..643971c 100644
--- a/ui/display/BUILD.gn
+++ b/ui/display/BUILD.gn
@@ -56,6 +56,7 @@
 
   deps = [
     "//base",
+    "//mojo/public/cpp/bindings:struct_traits",
     "//third_party/re2",
     "//ui/display/util",
     "//ui/gfx",
@@ -147,6 +148,7 @@
     "manager/chromeos/update_display_configuration_task_unittest.cc",
     "manager/display_manager_utilities_unittest.cc",
     "manager/managed_display_info_unittest.cc",
+    "mojo/display_struct_traits_unittest.cc",
     "screen_unittest.cc",
     "util/display_util_unittest.cc",
     "util/edid_parser_unittest.cc",
@@ -159,11 +161,12 @@
     ":display_manager_test_api",
     ":test_support",
     "//base",
-    "//base/test:run_all_unittests",
     "//base/test:test_support",
+    "//mojo/edk/test:run_all_unittests",
     "//testing/gmock",
     "//testing/gtest",
     "//ui/display/manager",
+    "//ui/display/mojo:test_interfaces",
     "//ui/display/types",
     "//ui/display/util",
     "//ui/events/devices",
diff --git a/ui/display/display.h b/ui/display/display.h
index 3c430e7..c529085 100644
--- a/ui/display/display.h
+++ b/ui/display/display.h
@@ -8,22 +8,17 @@
 #include <stdint.h>
 
 #include "base/compiler_specific.h"
+#include "mojo/public/cpp/bindings/struct_traits.h"
 #include "ui/display/display_export.h"
 #include "ui/display/types/display_constants.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/icc_profile.h"
 
-#if !defined(OS_IOS)
-#include "mojo/public/cpp/bindings/struct_traits.h"  // nogncheck
-#endif
-
 namespace display {
 
-#if !defined(OS_IOS)
 namespace mojom {
 class DisplayDataView;
 }
-#endif
 
 // This class typically, but does not always, correspond to a physical display
 // connected to the system. A fake Display may exist on a headless system, or a
@@ -194,6 +189,8 @@
   }
 
  private:
+  friend struct mojo::StructTraits<mojom::DisplayDataView, Display>;
+
   int64_t id_;
   gfx::Rect bounds_;
   // If non-empty, then should be same size as |bounds_|. Used to avoid rounding
@@ -208,10 +205,6 @@
   int color_depth_;
   int depth_per_component_;
   bool is_monochrome_ = false;
-
-#if !defined(OS_IOS)
-  friend struct mojo::StructTraits<mojom::DisplayDataView, Display>;
-#endif
 };
 
 }  // namespace display
diff --git a/ui/display/mojo/BUILD.gn b/ui/display/mojo/BUILD.gn
new file mode 100644
index 0000000..76f79e1
--- /dev/null
+++ b/ui/display/mojo/BUILD.gn
@@ -0,0 +1,25 @@
+# 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.
+
+import("//mojo/public/tools/bindings/mojom.gni")
+
+mojom("interfaces") {
+  sources = [
+    "display.mojom",
+  ]
+
+  public_deps = [
+    "//ui/gfx/geometry/mojo",
+  ]
+}
+
+mojom("test_interfaces") {
+  sources = [
+    "display_struct_traits_test.mojom",
+  ]
+
+  public_deps = [
+    ":interfaces",
+  ]
+}
diff --git a/ui/display/mojo/OWNERS b/ui/display/mojo/OWNERS
new file mode 100644
index 0000000..e75daf74
--- /dev/null
+++ b/ui/display/mojo/OWNERS
@@ -0,0 +1,8 @@
+per-file *_struct_traits*.*=set noparent
+per-file *_struct_traits*.*=file://ipc/SECURITY_OWNERS
+
+per-file *.mojom=set noparent
+per-file *.mojom=file://ipc/SECURITY_OWNERS
+
+per-file *.typemap=set noparent
+per-file *.typemap=file://ipc/SECURITY_OWNERS
diff --git a/services/ui/public/interfaces/display/display.mojom b/ui/display/mojo/display.mojom
similarity index 100%
rename from services/ui/public/interfaces/display/display.mojom
rename to ui/display/mojo/display.mojom
diff --git a/services/ui/public/interfaces/display/display.typemap b/ui/display/mojo/display.typemap
similarity index 68%
rename from services/ui/public/interfaces/display/display.typemap
rename to ui/display/mojo/display.typemap
index c1a8822..69a12e7 100644
--- a/services/ui/public/interfaces/display/display.typemap
+++ b/ui/display/mojo/display.typemap
@@ -2,12 +2,11 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
-mojom = "//services/ui/public/interfaces/display/display.mojom"
+mojom = "//ui/display/mojo/display.mojom"
 public_headers = [ "//ui/display/display.h" ]
-traits_headers =
-    [ "//services/ui/public/interfaces/display/display_struct_traits.h" ]
+traits_headers = [ "//ui/display/mojo/display_struct_traits.h" ]
 sources = [
-  "//services/ui/public/interfaces/display/display_struct_traits.cc",
+  "//ui/display/mojo/display_struct_traits.cc",
 ]
 public_deps = [
   "//ui/display",
diff --git a/services/ui/public/interfaces/display/display_struct_traits.cc b/ui/display/mojo/display_struct_traits.cc
similarity index 97%
rename from services/ui/public/interfaces/display/display_struct_traits.cc
rename to ui/display/mojo/display_struct_traits.cc
index 75b241e..2e8bf96 100644
--- a/services/ui/public/interfaces/display/display_struct_traits.cc
+++ b/ui/display/mojo/display_struct_traits.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "services/ui/public/interfaces/display/display_struct_traits.h"
+#include "ui/display/mojo/display_struct_traits.h"
 
 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h"
 
diff --git a/services/ui/public/interfaces/display/display_struct_traits.h b/ui/display/mojo/display_struct_traits.h
similarity index 86%
rename from services/ui/public/interfaces/display/display_struct_traits.h
rename to ui/display/mojo/display_struct_traits.h
index 2b68adc..1526812c 100644
--- a/services/ui/public/interfaces/display/display_struct_traits.h
+++ b/ui/display/mojo/display_struct_traits.h
@@ -2,11 +2,11 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SERVICES_UI_PUBLIC_INTERFACES_DISPLAY_DISPLAY_STRUCT_TRAITS_H_
-#define SERVICES_UI_PUBLIC_INTERFACES_DISPLAY_DISPLAY_STRUCT_TRAITS_H_
+#ifndef UI_DISPLAY_MOJO_DISPLAY_STRUCT_TRAITS_H_
+#define UI_DISPLAY_MOJO_DISPLAY_STRUCT_TRAITS_H_
 
 #include "ui/display/display.h"
-#include "services/ui/public/interfaces/display/display.mojom.h"
+#include "ui/display/mojo/display.mojom.h"
 
 namespace mojo {
 
@@ -60,4 +60,4 @@
 
 }  // namespace mojo
 
-#endif  // SERVICES_UI_PUBLIC_INTERFACES_DISPLAY_DISPLAY_STRUCT_TRAITS_H_
+#endif  // UI_DISPLAY_MOJO_DISPLAY_STRUCT_TRAITS_H_
diff --git a/services/ui/public/interfaces/display/display_struct_traits_test.mojom b/ui/display/mojo/display_struct_traits_test.mojom
similarity index 81%
rename from services/ui/public/interfaces/display/display_struct_traits_test.mojom
rename to ui/display/mojo/display_struct_traits_test.mojom
index 3a58081..1c20bf2 100644
--- a/services/ui/public/interfaces/display/display_struct_traits_test.mojom
+++ b/ui/display/mojo/display_struct_traits_test.mojom
@@ -4,7 +4,7 @@
 
 module display.mojom;
 
-import "services/ui/public/interfaces/display/display.mojom";
+import "ui/display/mojo/display.mojom";
 
 interface DisplayStructTraitsTest {
   [Sync]
diff --git a/services/ui/public/interfaces/display/display_struct_traits_unittest.cc b/ui/display/mojo/display_struct_traits_unittest.cc
similarity index 96%
rename from services/ui/public/interfaces/display/display_struct_traits_unittest.cc
rename to ui/display/mojo/display_struct_traits_unittest.cc
index 429d20ef..a223bdd 100644
--- a/services/ui/public/interfaces/display/display_struct_traits_unittest.cc
+++ b/ui/display/mojo/display_struct_traits_unittest.cc
@@ -4,9 +4,9 @@
 
 #include "base/message_loop/message_loop.h"
 #include "mojo/public/cpp/bindings/binding_set.h"
-#include "services/ui/public/interfaces/display/display_struct_traits_test.mojom.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "ui/display/display.h"
+#include "ui/display/mojo/display_struct_traits_test.mojom.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/geometry/size.h"
 
diff --git a/services/ui/public/interfaces/display/typemaps.gni b/ui/display/mojo/typemaps.gni
similarity index 68%
rename from services/ui/public/interfaces/display/typemaps.gni
rename to ui/display/mojo/typemaps.gni
index 29fef4a..c527c4d7 100644
--- a/services/ui/public/interfaces/display/typemaps.gni
+++ b/ui/display/mojo/typemaps.gni
@@ -2,4 +2,4 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
-typemaps = [ "//services/ui/public/interfaces/display/display.typemap" ]
+typemaps = [ "//ui/display/mojo/display.typemap" ]
diff --git a/ui/gfx/vector_icons/BUILD.gn b/ui/gfx/vector_icons/BUILD.gn
index d0676ddd..0f5abcf0 100644
--- a/ui/gfx/vector_icons/BUILD.gn
+++ b/ui/gfx/vector_icons/BUILD.gn
@@ -15,20 +15,15 @@
     "account_child_circle.icon",
     "account_circle.icon",
     "apps.icon",
-    "autologin.icon",
     "bar_close.1x.icon",
     "bar_close.icon",
     "blocked_badge.icon",
-    "bluetooth_connected.icon",
     "business.icon",
     "check_circle.1x.icon",
     "check_circle.icon",
     "close_all.icon",
     "code.icon",
     "cookie.icon",
-    "crashed_tab.icon",
-    "credit_card.1x.icon",
-    "credit_card.icon",
     "default_favicon.icon",
     "eol.icon",
     "error_circle.icon",
@@ -38,31 +33,11 @@
     "file_download_incognito.1x.icon",
     "file_download_incognito.icon",
     "file_download_shelf.icon",
-    "folder.1x.icon",
-    "folder.icon",
-    "folder_managed.1x.icon",
-    "folder_managed.icon",
-    "folder_supervised.1x.icon",
-    "folder_supervised.icon",
     "fullscreen.icon",
     "globe.icon",
     "help_outline.icon",
     "image.icon",
-    "incognito.1x.icon",
-    "incognito.icon",
     "info_outline.icon",
-    "location_bar_http.1x.icon",
-    "location_bar_http.icon",
-    "location_bar_https_invalid.1x.icon",
-    "location_bar_https_invalid.icon",
-    "location_bar_https_valid.1x.icon",
-    "location_bar_https_valid.icon",
-    "location_bar_https_valid_in_chip.1x.icon",
-    "location_bar_https_valid_in_chip.icon",
-    "location_bar_product.1x.icon",
-    "location_bar_product.icon",
-    "location_bar_star.icon",
-    "location_bar_star_active.icon",
     "location_on.icon",
     "lock.icon",
     "media_router_active.icon",
@@ -76,17 +51,10 @@
     "my_location.icon",
     "notifications.icon",
     "notifications_off.icon",
-    "omnibox_calculator.1x.icon",
-    "omnibox_calculator.icon",
-    "omnibox_extension_app.1x.icon",
-    "omnibox_extension_app.icon",
-    "omnibox_http.icon",
-    "omnibox_keyword_search.icon",
+
+    # TODO(estade): this is the same as the one in components/omnibox, but it's
+    # referenced from Ash. De-dupe this soon.
     "omnibox_search.icon",
-    "omnibox_star.1x.icon",
-    "omnibox_star.icon",
-    "overflow_chevron.1x.icon",
-    "overflow_chevron.icon",
     "paintbrush.icon",
     "pdf.1x.icon",
     "pdf.icon",
@@ -100,14 +68,11 @@
     "supervisor_account.icon",
     "supervisor_account_circle.icon",
     "sync_problem.icon",
-    "translate.icon",
     "user_account_avatar.icon",
     "videocam.icon",
     "warning.icon",
     "warning_badge.icon",
     "web.icon",
-    "zoom_minus.icon",
-    "zoom_plus.icon",
     "${branding_path_component}/product.icon",
   ]
 
diff --git a/ui/views/resources/vector_icons/vector_icons.h.template b/ui/views/resources/vector_icons/vector_icons.h.template
index b866fb8..548c3f5 100644
--- a/ui/views/resources/vector_icons/vector_icons.h.template
+++ b/ui/views/resources/vector_icons/vector_icons.h.template
@@ -23,4 +23,6 @@
 
 }
 
+#undef VECTOR_ICON_TEMPLATE_H
+
 #endif  // UI_VIEWS_RESOURCES_VECTOR_ICONS_VECTOR_ICONS_H_
diff --git a/ui/wm/core/shadow.cc b/ui/wm/core/shadow.cc
index ac8c37d..9a4b81c 100644
--- a/ui/wm/core/shadow.cc
+++ b/ui/wm/core/shadow.cc
@@ -15,16 +15,19 @@
 
 namespace {
 
-// Rounded corners are overdrawn on top of the window's content layer,
-// we need to exclude them from the occlusion area.
-const int kRoundedCornerRadius = 2;
-
 // Duration for opacity animation in milliseconds.
 const int kShadowAnimationDurationMs = 100;
 
+// Default rounded corner radius. Shadow::SetRoundedCornerRadius can
+// be used to override this for elements with a different rounded
+// corner radius.
+const int kDefaultRoundedCornerRadius = 2;
+
 }  // namespace
 
-Shadow::Shadow() : desired_elevation_(ShadowElevation::NONE) {}
+Shadow::Shadow()
+    : desired_elevation_(ShadowElevation::NONE),
+      rounded_corner_radius_(kDefaultRoundedCornerRadius) {}
 
 Shadow::~Shadow() {}
 
@@ -77,6 +80,15 @@
   }
 }
 
+void Shadow::SetRoundedCornerRadius(int rounded_corner_radius) {
+  DCHECK_GE(rounded_corner_radius, 0);
+  if (rounded_corner_radius_ == rounded_corner_radius)
+    return;
+
+  rounded_corner_radius_ = rounded_corner_radius;
+  UpdateLayerBounds();
+}
+
 void Shadow::OnImplicitAnimationsCompleted() {
   fading_layer_.reset();
   // The size needed for layer() may be smaller now that |fading_layer_| is
@@ -104,12 +116,12 @@
   const int smaller_dimension =
       std::min(content_bounds_.width(), content_bounds_.height());
   const int size_adjusted_elevation =
-      std::min((smaller_dimension - 2 * kRoundedCornerRadius) / 4,
+      std::min((smaller_dimension - 2 * rounded_corner_radius_) / 4,
                static_cast<int>(desired_elevation_));
   const auto& details =
-      gfx::ShadowDetails::Get(size_adjusted_elevation, kRoundedCornerRadius);
+      gfx::ShadowDetails::Get(size_adjusted_elevation, rounded_corner_radius_);
   gfx::Insets blur_region = gfx::ShadowValue::GetBlurRegion(details.values) +
-                            gfx::Insets(kRoundedCornerRadius);
+                            gfx::Insets(rounded_corner_radius_);
   if (size_adjusted_elevation != effective_elevation_) {
     shadow_layer_->UpdateNinePatchLayerImage(details.ninebox_image);
     // The ninebox grid is defined in terms of the image size. The shadow blurs
@@ -156,7 +168,7 @@
   // Occlude the region inside the bounding box. Occlusion uses shadow layer
   // space. See nine_patch_layer.h for more context on what's going on here.
   gfx::Rect occlusion_bounds(shadow_layer_bounds.size());
-  occlusion_bounds.Inset(-margins + gfx::Insets(kRoundedCornerRadius));
+  occlusion_bounds.Inset(-margins + gfx::Insets(rounded_corner_radius_));
   shadow_layer_->UpdateNinePatchOcclusion(occlusion_bounds);
 
   // The border is the same inset as the aperture.
diff --git a/ui/wm/core/shadow.h b/ui/wm/core/shadow.h
index f81f0af..35c57f6 100644
--- a/ui/wm/core/shadow.h
+++ b/ui/wm/core/shadow.h
@@ -46,6 +46,10 @@
   // Sets the shadow's appearance, animating opacity as necessary.
   void SetElevation(ShadowElevation elevation);
 
+  // Sets the radius for the rounded corners to take into account when
+  // adjusting the shadow layer to frame |content_bounds|. 0 or greater.
+  void SetRoundedCornerRadius(int rounded_corner_radius);
+
   // ui::ImplicitAnimationObserver overrides:
   void OnImplicitAnimationsCompleted() override;
 
@@ -66,6 +70,10 @@
   // The elevation of the shadow image that's currently set on |shadow_layer_|.
   int effective_elevation_ = 0;
 
+  // Rounded corners are drawn on top of the window's content layer,
+  // we need to exclude them from the occlusion area.
+  int rounded_corner_radius_;
+
   // The parent layer of the shadow layer. It serves as a container accessible
   // from the outside to control the visibility of the shadow.
   std::unique_ptr<ui::Layer> layer_;